/* ==========================================================================
   Booking page (booking.html) + shared form styles used by admin.html
   ========================================================================== */

/* ---------- Simple navbar (no hamburger) ---------- */
.navbar-simple .nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-simple .nav-cta {
    margin: 0;
}

/* ---------- Page layout ---------- */
.booking-page {
    position: relative;
    max-width: 1200px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 8rem 1.25rem 4rem;
}

.booking-header .section-subtitle {
    margin-bottom: 2.5rem;
}

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    align-items: start;
    gap: 2rem;
}

.booking-steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-width: 0;
}

.booking-step {
    padding: 1.75rem;
}

.booking-step:hover,
.booking-summary:hover,
.booking-success:hover {
    transform: none;
}

.booking-step.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.step-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    color: var(--primary);
    font-size: 1.35rem;
}

.step-badge {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    background: var(--gold-gradient);
    color: var(--dark);
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 900;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.35);
}

/* ---------- 1. Service options ---------- */
.service-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.9rem;
}

.service-option {
    position: relative;
    cursor: pointer;
}

.service-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.service-option-body {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    height: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-option-body > i {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: rgba(255, 215, 0, 0.1);
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.15rem;
    transition: all 0.3s ease;
}

.service-option-name {
    display: block;
    color: var(--light);
    font-weight: 700;
    line-height: 1.3;
}

.service-option-duration {
    display: block;
    color: var(--accent);
    font-size: 0.9rem;
}

.service-option:hover .service-option-body {
    border-color: rgba(255, 215, 0, 0.5);
}

.service-option input:focus-visible + .service-option-body {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.service-option input:checked + .service-option-body {
    background: rgba(255, 215, 0, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.25);
}

.service-option input:checked + .service-option-body > i {
    background: var(--gold-gradient);
    color: var(--dark);
}

/* "Andere Leistung" call box */
.call-box {
    display: flex;
    gap: 1.25rem;
    margin-top: 1.25rem;
    padding: 1.25rem;
    background: rgba(255, 215, 0, 0.06);
    border: 1px solid var(--primary);
    border-radius: 12px;
    animation: fadeInUp 0.4s ease-out;
}

.call-box > i {
    color: var(--primary);
    font-size: 2rem;
}

.call-box h3 {
    margin-bottom: 0.4rem;
    color: var(--primary);
}

.call-box p {
    margin-bottom: 1rem;
    color: var(--accent);
}

/* ---------- 2. Month calendar ---------- */
.calendar {
    max-width: 520px;
    margin: 0 auto;
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.calendar-title {
    color: var(--light);
    font-size: 1.25rem;
    text-align: center;
}

.calendar-nav {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.calendar-nav:hover:not(:disabled) {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.3);
}

.calendar-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.calendar-weekdays,
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.calendar-weekdays {
    margin-bottom: 0.4rem;
}

.calendar-weekdays span {
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.calendar-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    min-height: 42px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 215, 0, 0.35);
    border-radius: 10px;
    color: var(--light);
    font-family: inherit;
    cursor: pointer;
    transition: all 0.25s ease;
}

.calendar-day-number {
    font-size: 1.05rem;
    font-weight: 700;
}

.calendar-day:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary);
}

.calendar-day.is-today {
    box-shadow: inset 0 0 0 2px rgba(193, 154, 107, 0.7);
}

.calendar-day.selected {
    background: var(--gold-gradient);
    border-color: var(--primary);
    color: var(--dark);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.calendar-day:disabled {
    background: transparent;
    border-color: transparent;
    color: rgba(255, 255, 255, 0.25);
    cursor: not-allowed;
}

.calendar-day.is-closed:disabled {
    background: rgba(255, 255, 255, 0.04);
}

.calendar-day.is-vacation:disabled {
    background: repeating-linear-gradient(-45deg,
        rgba(178, 34, 34, 0.18) 0 6px,
        rgba(178, 34, 34, 0.06) 6px 12px);
    border-color: rgba(178, 34, 34, 0.45);
    color: rgba(255, 200, 200, 0.6);
}

.calendar-day-tag {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 1rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.legend-dot.vacation {
    background: rgba(178, 34, 34, 0.5);
}

/* ---------- 3. Time slots ---------- */
.slot-legend {
    display: flex;
    gap: 1.25rem;
    margin: -0.5rem 0 1rem;
    color: var(--accent);
    font-size: 0.9rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-inline-end: 0.3rem;
    border-radius: 50%;
    vertical-align: -1px;
}

.legend-dot.free {
    border: 2px solid var(--primary);
}

.legend-dot.taken {
    background: rgba(255, 255, 255, 0.15);
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.6rem;
}

.slot-message {
    grid-column: 1 / -1;
    padding: 1rem;
    color: var(--accent);
    text-align: center;
}

.slot-button {
    padding: 0.75rem 0.4rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 215, 0, 0.45);
    border-radius: 10px;
    color: var(--primary);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
}

.slot-button:hover:not(:disabled) {
    background: rgba(255, 215, 0, 0.1);
    border-color: var(--primary);
}

.slot-button.selected {
    background: var(--gold-gradient);
    color: var(--dark);
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.35);
}

.slot-button:disabled {
    background: rgba(255, 255, 255, 0.04);
    border-color: transparent;
    color: rgba(255, 255, 255, 0.3);
    text-decoration: line-through;
    cursor: not-allowed;
}

/* ---------- 4. Form fields (shared with admin) ---------- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-field span {
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field .optional {
    font-size: 0.85rem;
    font-style: normal;
    opacity: 0.75;
}

.success-email {
    margin: -0.75rem 0 1.5rem;
    color: var(--primary) !important;
    font-weight: 700;
}

.form-field input,
.form-field select {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--light);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-field input::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    margin-top: 1.25rem;
    color: var(--light);
    font-size: 0.95rem;
    opacity: 0.9;
    cursor: pointer;
}

.form-check input {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    accent-color: #DAA520;
}

.form-error {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    background: rgba(178, 34, 34, 0.15);
    border: 1px solid rgba(178, 34, 34, 0.6);
    border-radius: 10px;
    color: #ffb4b4;
    font-size: 0.95rem;
}

/* ---------- Summary ---------- */
.booking-summary {
    position: sticky;
    top: 7rem;
    padding: 1.75rem;
}

.booking-summary h2 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.35rem;
}

.booking-summary dl div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px dotted rgba(193, 154, 107, 0.3);
}

.booking-summary dt {
    color: var(--accent);
}

.booking-summary dd {
    color: var(--light);
    font-weight: 700;
    text-align: end;
}

.submit-button {
    justify-content: center;
    width: 100%;
    margin-top: 1.5rem;
    font-family: inherit;
    cursor: pointer;
}

.submit-button:disabled {
    filter: grayscale(0.8);
    opacity: 0.45;
    box-shadow: none;
    cursor: not-allowed;
    animation: none;
    transform: none;
}

.summary-hint {
    margin: 0.75rem 0;
    color: var(--accent);
    font-size: 0.9rem;
    text-align: center;
}

.summary-call {
    width: 100%;
    padding: 0.9rem 1rem;
    font-size: 1.05rem;
}

.booking-layout {
    scroll-margin-top: 7rem;
}

.summary-hint a,
.success-note a,
.booking-alert a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

/* ---------- Alerts & success ---------- */
.booking-alert {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 1.25rem;
    border-color: var(--primary);
    color: var(--light);
}

.booking-alert i {
    color: var(--primary);
    font-size: 1.6rem;
}

/* ---------- Choice: online vs. phone ---------- */
.booking-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.choice-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    color: var(--light);
    text-decoration: none;
}

.choice-card:hover {
    border-color: var(--primary);
    box-shadow: var(--gold-glow);
}

.choice-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    background: rgba(255, 215, 0, 0.12);
    color: var(--primary);
    border-radius: 50%;
    font-size: 1.5rem;
}

.choice-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.choice-text strong {
    color: var(--primary);
    font-size: 1.25rem;
}

.choice-text span {
    color: var(--accent);
    font-size: 0.95rem;
}

.choice-arrow {
    color: var(--primary);
    font-size: 1.2rem;
}

/* Phone card stands out with a gold border and ringing icon */
.choice-call {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(26, 26, 26, 0.92));
    border: 2px solid var(--primary);
}

.choice-call .choice-icon {
    background: var(--gold-gradient);
    color: var(--dark);
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.4);
}

.choice-call .choice-icon i {
    animation: ring 2.4s ease-in-out infinite;
}

.choice-text .choice-hours {
    color: var(--light);
    font-size: 0.85rem;
    opacity: 0.85;
}

.manage-link {
    grid-column: 1 / -1;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.2rem;
    border: 1px dashed var(--glass-border);
    border-radius: 999px;
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease;
}

.manage-link:hover {
    border-color: var(--primary);
    background: rgba(255, 215, 0, 0.06);
}

.reschedule-banner {
    margin-bottom: 2rem;
}

.reschedule-banner strong {
    color: var(--primary);
}

.reschedule-banner a {
    display: inline-block;
    margin-top: 0.3rem;
}

/* The appointment that is being moved */
.calendar-day.is-original:not(.selected),
.slot-button.is-original:not(.selected) {
    border-style: dashed;
    border-color: var(--accent);
}

/* ---------- Booking code on success ---------- */
.booking-code-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    margin: 0 auto 1.75rem;
    padding: 1.25rem;
    max-width: 420px;
    background: rgba(0, 0, 0, 0.35);
    border: 2px dashed var(--primary);
    border-radius: 14px;
}

.booking-code-label {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.booking-code {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 2.4rem;
    font-weight: 900;
    letter-spacing: 6px;
    line-height: 1.2;
}

.booking-code-hint {
    color: var(--accent);
    font-size: 0.9rem;
    line-height: 1.5;
}

.success-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.choice-text .choice-number {
    color: var(--light);
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.booking-success {
    max-width: 640px;
    margin: 0 auto;
    padding: 3rem 2rem;
    text-align: center;
    animation: fadeInUp 0.5s ease-out;
}

.success-icon {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 1.5rem;
    background: var(--gold-gradient);
    color: var(--dark);
    border-radius: 50%;
    font-size: 2.4rem;
    box-shadow: var(--gold-glow);
}

.booking-success h2 {
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-size: 2rem;
}

.booking-success p {
    color: var(--accent);
}

.success-details {
    margin: 1rem 0 1.5rem;
    white-space: pre-line;
    color: var(--light) !important;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.6;
}

.success-note {
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-choice {
        grid-template-columns: 1fr;
    }

    .booking-summary {
        position: static;
    }
}

@media (max-width: 1280px) {
    /* the simple navbar keeps its buttons visible instead of a dropdown */
    .navbar-simple .nav-actions .nav-link {
        border-bottom: none;
        padding: 0.6rem 0.8rem;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .booking-page {
        padding: 6rem 0.75rem 3rem;
    }

    .hide-sm {
        display: none;
    }

    .navbar-simple .nav-cta {
        padding: 0.6rem 0.9rem;
    }

    .booking-step,
    .booking-summary {
        padding: 1.25rem 1rem;
    }

    .step-title {
        font-size: 1.15rem;
    }

    .service-options {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .call-box {
        flex-direction: column;
        gap: 0.75rem;
    }

    .slot-grid {
        grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    }

    .booking-success {
        padding: 2rem 1.25rem;
    }

    .booking-success h2 {
        font-size: 1.6rem;
    }

    .success-actions > a {
        width: 100%;
    }

    .booking-code {
        font-size: 2rem;
        letter-spacing: 4px;
    }
}
