/**
 * Buchungsformular-Styles (PROJ-3)
 * Hauptfarben: #a8c4d8 (Hellblau) · #bfcc6b (Hellgrün)
 * Palette:     #1a1a1a · #f0f0f0 · #bfcc6b · #a8c4d8 · #c08080 · #5a5a7a
 */

/* =========================================================================
   Container
   ========================================================================= */

.rr-booking-wrap {
    max-width: 680px;
    margin: 2rem auto;
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 16px;
    color: #1a1a1a;
    line-height: 1.6;
    box-sizing: border-box;
    text-transform: lowercase;
    text-transform: lowercase;
}

.rr-booking-wrap *,
.rr-booking-wrap *::before,
.rr-booking-wrap *::after {
    box-sizing: inherit;
}

/* =========================================================================
   Keine-JS-Fallback
   ========================================================================= */

.rr-booking-noscript {
    padding: 1.25rem 1.5rem;
    background: #f0f0f0;
    border: 1px solid #a8c4d8;
    border-radius: 3px;
    color: #1a1a1a;
}

/* =========================================================================
   Erfolgsmeldung
   ========================================================================= */

.rr-success-message {
    padding: 2rem;
    text-align: center;
    background: #f0f7ee;
    border: 2px solid #bfcc6b;
    border-radius: 3px;
}

.rr-success-icon {
    display: none;
}

.rr-success-text a {
    color: #1a1a1a;
    text-decoration: underline;
}

.rr-success-text {
    font-size: 1rem;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

/* =========================================================================
   Schritte
   ========================================================================= */

.rr-step {
    margin-bottom: 1.75rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #dce8f0;
    border-radius: 3px;
}

.rr-booking-wrap .rr-step__title {
    margin: 0.4rem 0 1.25rem;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #1a1a1a;
    letter-spacing: 0.01em;
}

.rr-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    background: #a8c4d8;
    color: #1e3a4a;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* =========================================================================
   Kalender
   ========================================================================= */

.rr-calendar {
    position: relative;
}

.rr-calendar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.rr-calendar__nav {
    background: transparent;
    border: 2px solid #a8c4d8;
    border-radius: 3px;
    padding: 0.3rem 0.75rem;
    font-size: 1.3rem;
    cursor: pointer;
    color: #1e3a4a;
    line-height: 1;
    min-height: 44px;
    min-width: 44px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.rr-calendar__nav:hover:not(:disabled) {
    background: #a8c4d8;
    color: #1e3a4a;
    border-color: #a8c4d8;
}

.rr-calendar__nav:focus-visible {
    outline: 2px solid #1e3a4a;
    outline-offset: 2px;
}

.rr-calendar__nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.rr-calendar__month-label {
    font-weight: 600;
    font-size: 15px;
    color: #1a1a1a;
    min-width: 0;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rr-calendar__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}

.rr-calendar__weekdays span {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #5a5a7a;
    padding: 4px 0;
}

/* Mo (1. Spalte) und So (7. Spalte) optisch zurückhalten */
.rr-calendar__weekdays span:first-child,
.rr-calendar__weekdays span:last-child {
    color: #b0b0c0;
    font-weight: 400;
    letter-spacing: 0.05em;
}

.rr-calendar__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.rr-cal-empty {
    /* Unsichtbare Platzhalter */
}

.rr-cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 400;
    border: 2px solid transparent;
    cursor: default;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
    position: relative;
}

.rr-cal-day--bookable {
    background: #edf4f9;
    color: #1e3a4a;
    cursor: pointer;
    font-weight: 600;
    border-color: #c4dce8;
}

.rr-cal-day--bookable:hover {
    background: #bfcc6b;
    color: #1a1a1a;
    border-color: #bfcc6b;
}

.rr-cal-day--bookable:focus-visible {
    outline: 2px solid #1e3a4a;
    outline-offset: 2px;
}

.rr-cal-day--bookable.is-selected {
    background: #a8c4d8;
    color: #1e3a4a;
    border-color: #8aafc4;
}

.rr-cal-day--closed {
    color: #bbb;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 4px,
        rgba(0, 0, 0, 0.07) 4px,
        rgba(0, 0, 0, 0.07) 6px
    );
}

.rr-cal-day--past {
    color: #c8c8c8;
    background: transparent;
}

/* PROJ-16: "Gesperrt (mit Info)" – bleibt klickbar (anders als normal
   gesperrte Tage), eigene Markierung mit kleinem Info-Icon. */
.rr-cal-day--info {
    background: #fff3cd;
    color: #5a3e00;
    cursor: pointer;
    font-weight: 600;
    border-color: #e6c260;
}

.rr-cal-day--info:hover {
    background: #ffe6a0;
    border-color: #e6a817;
}

.rr-cal-day--info:focus-visible {
    outline: 2px solid #5a3e00;
    outline-offset: 2px;
}

.rr-cal-day--info.is-selected {
    background: #ffe6a0;
    border-color: #e6a817;
}

/* Tag außerhalb des öffentlichen Buchungsfensters (6 Monate) – bleibt
   klickbar wie ein Info-Tag, aber optisch neutral statt gelb, da kein
   Sonderereignis, sondern eine reguläre Fensterbegrenzung. */
.rr-cal-day--window {
    background: #eceff1;
    color: #46545c;
    border-color: #cfd8dc;
}

.rr-cal-day--window:hover {
    background: #dbe2e5;
    border-color: #b0bec5;
}

.rr-cal-day--window.is-selected {
    background: #dbe2e5;
    border-color: #90a4ae;
}

.rr-cal-day--window .rr-cal-day__info-icon {
    background: #78909c;
}

.rr-cal-day__num {
    line-height: 1;
}

.rr-cal-day__info-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e6a817;
    color: #fff;
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.rr-cal-day--today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #a8c4d8;
    border-radius: 50%;
}

.rr-calendar__loading,
.rr-calendar__error {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
}

.rr-calendar__error {
    color: #c08080;
}

/* =========================================================================
   Zeitslots
   ========================================================================= */

.rr-slots__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.rr-slots__break {
    width: 100%;
    height: 0.5rem;
}

.rr-duration-choice {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin: 0.5rem 0 0.75rem;
}

.rr-duration-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.4;
}

.rr-duration-option input[type="radio"] {
    margin-top: 0.15em;
    flex-shrink: 0;
    accent-color: #1e3a4a;
}

.rr-slots__closing-hint {
    margin-top: 0.75rem;
    padding: 0.5rem 0.9rem;
    background: #fff3cd;
    border-left: 4px solid #e6a817;
    border-radius: 3px;
    color: #5a3e00;
    font-size: 0.9rem;
}

.rr-slot-btn {
    padding: 0.4rem 1rem;
    border: 2px solid #a8c4d8;
    background: #fff;
    color: #1e3a4a;
    border-radius: 3px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.rr-slot-btn:hover {
    background: #a8c4d8;
    color: #1e3a4a;
    border-color: #a8c4d8;
}

.rr-slot-btn.is-selected {
    background: #a8c4d8;
    color: #1e3a4a;
    border-color: #8aafc4;
}

.rr-slot-btn:focus-visible {
    outline: 2px solid #1e3a4a;
    outline-offset: 2px;
}

.rr-slots__loading,
.rr-slots__empty {
    color: #5a5a7a;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* PROJ-16: Hinweistext für "Gesperrt (mit Info)"-Tage, ersetzt die
   Zeitauswahl (siehe rr-slots-info in booking-form.php / booking.js). */
.rr-slots__info {
    padding: 1rem 1.1rem;
    background: #fff3cd;
    border: 1px solid #f0d78a;
    border-left: 4px solid #e6a817;
    border-radius: 3px;
    color: #5a3e00;
}

.rr-slots__info-text {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* =========================================================================
   Formularfelder
   ========================================================================= */

.rr-field-group {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.rr-field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.rr-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.rr-label--required::after {
    content: ' *';
    color: #c08080;
}

.rr-input,
.rr-textarea {
    padding: 0.65rem 0.75rem;
    border: 1px solid #c4dce8;
    border-radius: 3px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    min-height: 44px;
}

.rr-input:focus,
.rr-textarea:focus {
    outline: none;
    border-color: #a8c4d8;
    box-shadow: 0 0 0 2px rgba(168, 196, 216, 0.35);
}

.rr-textarea {
    resize: vertical;
    min-height: 80px;
}

.rr-hint {
    font-size: 13px;
    color: #5a5a7a;
}

/* =========================================================================
   Zusammenfassung
   ========================================================================= */

.rr-summary {
    margin: 1.25rem 0;
    padding: 0.75rem 1rem;
    background: #edf4f9;
    border: 1px solid #c4dce8;
    display: flex;
    align-items: center;
    border-left: 3px solid #a8c4d8;
    border-radius: 3px;
    font-size: 15px;
    color: #1a1a1a;
}

.rr-booking-wrap .rr-summary__text {
    margin: 0;
}

/* =========================================================================
   Fehlermeldung (Formular)
   ========================================================================= */

.rr-form-error {
    padding: 0.75rem 1rem;
    background: #faf0f0;
    border: 1px solid #ddbdbd;
    border-left: 4px solid #c08080;
    border-radius: 3px;
    color: #7a3a3a;
    font-size: 14px;
    margin-bottom: 1rem;
}

/* =========================================================================
   Absende-Bereich
   ========================================================================= */

.rr-submit-wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1.25rem;
}

.rr-btn {
    padding: 0.65rem 1.75rem;
    border: 2px solid #a8c4d8;
    border-radius: 3px;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: #1e3a4a;
    cursor: pointer;
    min-height: 44px;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    text-transform: lowercase !important;
}

.rr-btn--primary {
    background: #a8c4d8;
    color: #1e3a4a;
    border-color: #a8c4d8;
}

.rr-btn--primary:hover:not(:disabled) {
    background: #8aafc4;
    border-color: #8aafc4;
    color: #1e3a4a;
}

.rr-btn--primary:focus-visible {
    outline: 2px solid #1e3a4a;
    outline-offset: 2px;
}

.rr-btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.rr-submit-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 14px;
    color: #5a5a7a;
}

.rr-note--privacy {
    margin-top: 0.75rem;
    font-size: 13px;
    color: #5a5a7a;
}

/* =========================================================================
   Spinner
   ========================================================================= */

.rr-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #dce8f0;
    border-top-color: #a8c4d8;
    border-radius: 50%;
    animation: rr-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes rr-spin {
    to { transform: rotate(360deg); }
}

/* =========================================================================
   Reduced Motion
   ========================================================================= */

@media (prefers-reduced-motion: reduce) {
    .rr-spinner {
        animation: none;
        border-top-color: #a8c4d8;
        opacity: 0.6;
    }

    .rr-cal-day,
    .rr-slot-btn,
    .rr-btn,
    .rr-calendar__nav,
    .rr-input,
    .rr-textarea {
        transition: none;
    }
}

/* =========================================================================
   Responsive
   ========================================================================= */

@media (max-width: 600px) {
    .rr-booking-wrap {
        width: 95%;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 480px) {
    .page-content {
        margin: 0 3vw !important;
        padding: 0 !important;
    }

    .rr-calendar__header {
        gap: 0.25rem;
    }

    .rr-calendar__nav {
        padding: 0.3rem 0.5rem;
        min-width: 38px;
    }

    .rr-step {
        padding: 1rem;
    }

    .rr-cal-day {
        font-size: 12px;
    }

    .rr-slot-btn {
        padding: 0.4rem 0.7rem;
        font-size: 14px;
    }

    .rr-submit-wrap {
        flex-direction: column;
        align-items: stretch;
    }

    .rr-btn {
        text-align: center;
        width: 100%;
    }
}
