/* ====================================================================
   Online-Terminbuchung - Hub Layout
   ==================================================================== */

:root {
    --primary: #30638D;
    --primary-dark: #1B2739;
    --primary-light: #E8EFF6;
    --success: #4CAF50;
    --error: #d32f2f;
    --warning: #ff9800;
    --info: #2196F3;
    --border: #B7C7D8;
    --text: #1B2739;
    --text-muted: #666;
    --bg-light: #F5F5F5;
    --bg-white: #FFFFFF;
    --radius: 8px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 10px 30px rgba(20, 40, 60, 0.12);
    --transition: all 0.25s ease;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", sans-serif;
    color: var(--text);
    line-height: 1.5;
    background: linear-gradient(180deg, #eef3f8 0%, #f7f9fb 100%);
    font-size: 16px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover, a:focus {
    text-decoration: underline;
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 1000;
    background: #fff;
    color: var(--primary-dark);
    padding: 0.75rem 1rem;
    border-radius: 6px;
    border: 2px solid var(--primary);
}

.skip-link:focus {
    top: 1rem;
}

.booking-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 760px;
    margin: 0 auto;
    padding: 1rem;
}

.booking-header {
    text-align: center;
    margin: 1rem 0 1.25rem 0;
    padding: 1rem 1rem 0.9rem;
    background: linear-gradient(135deg, #3b658f 0%, #1f3856 100%);
    color: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.booking-logo-link {
    display: inline-block;
    max-width: min(100%, 440px);
    border-radius: 10px;
}

.booking-logo-link:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.booking-logo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.back-home-link {
    display: inline-block;
    margin-top: 0.55rem;
    color: #e8f4ff;
    font-weight: 700;
    text-decoration: underline;
}

.back-home-link:hover,
.back-home-link:focus {
    color: #ffffff;
}

.hub-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 1rem;
}

.hub-card {
    border: none;
    border-radius: var(--radius);
    padding: 1.15rem 1rem;
    text-align: left;
    background: linear-gradient(135deg, #3b658f 0%, #223a58 100%);
    color: #fff;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
}

.hub-card:hover,
.hub-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(20, 40, 60, 0.18);
    outline: none;
}

.hub-card.active {
    background: linear-gradient(135deg, #27496c 0%, #13283e 100%);
}

.hub-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.hub-text {
    display: block;
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.92;
}

.booking-form {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-bottom: 1rem;
    overflow: hidden;
}

.panel-section[hidden] {
    display: none !important;
}

.panel-section.active {
    display: block;
}

.form-section {
    border: none;
    padding: 1.5rem;
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section legend,
.panel-title {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0 0 1rem 0;
    padding: 0;
    width: 100%;
}

.section-info {
    margin: 0 0 1rem 0;
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 0.85rem 1rem;
    background: var(--primary-light);
    border-radius: 6px;
    border-left: 4px solid var(--primary);
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
}

.required {
    color: var(--error);
}

.input-control {
    display: block;
    width: 100%;
    padding: 0.8rem 0.85rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    transition: var(--transition);
    background: #fff;
}

.input-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(48, 99, 141, 0.12);
}

.input-control:disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
}

.form-row {
    display: grid;
    gap: 1rem;
}

.two-col-layout {
    grid-template-columns: repeat(2, 1fr);
}

.lookup-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
}

.help-text {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.35rem;
}

.checkbox-group {
    margin: 0;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    flex: 0 0 1.2rem;
    width: 1.2rem;
    min-width: 1.2rem;
    height: 1.2rem;
    min-height: 1.2rem;
    display: block;
    margin-top: 0.1rem;
    accent-color: var(--primary);
}

.confirmation-block {
    background: var(--primary-light);
    border: 1px solid var(--primary);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.confirmation-block h3 {
    margin: 0 0 0.8rem 0;
    color: var(--primary-dark);
}

.details-list {
    margin: 0;
    padding: 0;
}

.details-list dt {
    font-weight: 700;
    margin-top: 0.45rem;
}

.details-list dd {
    margin: 0.15rem 0 0 0;
    padding-left: 0.25rem;
}

.form-actions {
    display: flex;
    gap: 0.85rem;
    padding: 1.25rem 1.5rem;
    background: var(--bg-light);
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    flex-wrap: wrap;
}

.compact-actions {
    justify-content: flex-start;
}

.btn {
    padding: 0.9rem 1.35rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    text-align: center;
}

.btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-danger {
    background: var(--error);
    color: #fff;
}

.btn-danger:hover:not(:disabled) {
    background: #a11f1f;
}

.message {
    padding: 1rem;
    margin: 1rem 1.5rem 1.5rem 1.5rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.message-success {
    background: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success);
}

.message-error {
    background: rgba(211, 47, 47, 0.1);
    border-left-color: var(--error);
}

.message-info {
    background: rgba(33, 150, 243, 0.1);
    border-left-color: var(--info);
}

.booking-footer {
    text-align: center;
    padding: 1.5rem 1rem 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-info {
    margin: 0 0 0.8rem 0;
    line-height: 1.8;
}

.footer-info a {
    color: var(--primary);
    font-weight: 700;
}

.footer-legal {
    margin: 0;
    font-size: 0.85rem;
}

.footer-legal a {
    color: var(--text-muted);
}

@media (max-width: 720px) {
    .booking-header {
        padding: 0.75rem 0.75rem 0.7rem;
    }

    .booking-logo-link {
        max-width: 100%;
    }

    .hub-grid,
    .lookup-grid,
    .two-col-layout {
        grid-template-columns: 1fr;
    }

    .hub-card {
        text-align: center;
    }

    .form-actions {
        justify-content: stretch;
    }

    .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

[aria-invalid="true"] {
    border-color: var(--error);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.12);
}
