/**
 * Tropic Bloom Booking - Mode Compact
 * Design épuré, aéré et fin :
 * - Aucune barre supérieure (.tb-timeline-container::before supprimée)
 * - Aucune boîte/bordure encapsulante autour des champs
 * - De belles marges aérées entre chaque élément
 * - Date, Personnes et bouton OK alignés sur la même ligne
 */

.tb-timeline-container.tb-compact-mode {
    max-width: 760px;
    width: 100%;
    margin: 28px auto 32px;
    padding: 0 10px;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
    font-family: var(--tb-font-body, 'Outfit', sans-serif);
    overflow: visible;
    position: relative;
}

/* Supprime la barre horizontale supérieure verte/dorée */
.tb-timeline-container.tb-compact-mode::before,
.tb-timeline-container.tb-compact-mode::after {
    display: none !important;
    content: none !important;
    height: 0 !important;
    border: none !important;
}

/* Bloc étape transparent et aéré */
.tb-timeline-container.tb-compact-mode .tb-block-step {
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    overflow: visible;
}

/* En-tête : Titre rose, sous-titre et tarifs avec marges soignées */
.tb-timeline-container.tb-compact-mode .tb-compact-header {
    text-align: center;
    margin-bottom: 24px;
}

.tb-timeline-container.tb-compact-mode .tb-compact-title {
    font-family: 'Reddit Sans Condensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 1.85rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    color: #d22886 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.25 !important;
}

.tb-timeline-container.tb-compact-mode .tb-compact-subtitle {
    font-family: var(--tb-font-body, 'Outfit', sans-serif) !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    color: var(--tb-emerald, #0A261D) !important;
    margin: 0 0 8px 0 !important;
}

.tb-timeline-container.tb-compact-mode .tb-compact-pricing-info {
    font-family: var(--tb-font-body, 'Outfit', sans-serif) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #64748b !important;
    line-height: 1.5 !important;
    margin: 0 !important;
}

.tb-timeline-container.tb-compact-mode .tb-compact-pricing-info p {
    margin: 3px 0 !important;
}

/* Ligne des champs : Date + Personnes + OK sur 1 ligne avec belles marges */
.tb-timeline-container.tb-compact-mode .tb-compact-bar-wrap {
    margin: 18px 0 14px;
}

.tb-timeline-container.tb-compact-mode .tb-compact-bar-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px; /* Marges nettes et aérées entre Date, Personnes et OK */
    background: #EDF5F0 !important; /* Fond vert sauge spa doux & frais */
    border: 1px solid rgba(10, 38, 29, 0.12) !important;
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: 0 4px 16px rgba(10, 38, 29, 0.04);
    box-sizing: border-box;
}

.tb-timeline-container.tb-compact-mode .tb-field {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.tb-timeline-container.tb-compact-mode .tb-field-date {
    flex: 1 1 50%;
}

.tb-timeline-container.tb-compact-mode .tb-field-persons {
    flex: 0 0 180px;
}

.tb-timeline-container.tb-compact-mode .tb-field-action {
    flex: 0 0 auto;
}

/* Nuitée : Arrivée / Départ / Voyageurs / OK */
.tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee {
    gap: 10px;
}

.tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-checkin,
.tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-checkout,
.tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-persons {
    flex: 1 1 0;
}

.tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-action {
    flex: 0 0 auto;
}

/* Champs de saisie fins et soignés */
.tb-timeline-container.tb-compact-mode .tb-flatpickr-date,
.tb-timeline-container.tb-compact-mode .tb-select-field {
    width: 100% !important;
    height: 44px !important;
    background: #ffffff !important;
    border: 1.5px solid #dcdad5 !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    font-size: 13.5px !important;
    font-weight: 500 !important;
    color: var(--tb-emerald, #0A261D) !important;
    font-family: inherit !important;
    box-sizing: border-box !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    transition: all 0.2s ease !important;
}

.tb-timeline-container.tb-compact-mode .tb-flatpickr-date:hover,
.tb-timeline-container.tb-compact-mode .tb-select-field:hover {
    border-color: #b0aba1 !important;
}

.tb-timeline-container.tb-compact-mode .tb-flatpickr-date:focus,
.tb-timeline-container.tb-compact-mode .tb-select-field:focus {
    border-color: #d22886 !important;
    box-shadow: 0 0 0 3px rgba(210, 40, 134, 0.12) !important;
    outline: none !important;
}

.tb-timeline-container.tb-compact-mode .tb-select-field {
    padding-right: 34px !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%230A261D' d='M1 1l4 4 4-4' stroke='%230A261D' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
}

/* Bouton OK */
.tb-compact-btn-ok {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 30px;
    background: var(--tb-emerald, #0A261D);
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(10, 38, 29, 0.18);
    transition: all 0.2s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.tb-compact-btn-ok:hover {
    background: #d22886;
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(210, 40, 134, 0.35);
}

.tb-compact-btn-ok:active {
    transform: translateY(0);
}

/* Disponibilité dynamique en direct sous la ligne avec marge */
.tb-timeline-container.tb-compact-mode .tb-compact-avail-wrap {
    margin-top: 14px;
    margin-bottom: 8px;
    text-align: center;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 14px;
    background: transparent;
    border: none;
    font-family: var(--tb-font-body, 'Outfit', sans-serif);
    font-size: 13.5px;
    font-weight: 500;
    color: #065f46;
    transition: all 0.2s ease;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-badge.unavailable {
    color: #b91c1c;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-badge.loading {
    color: #64748b;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25);
    animation: tbPulseDot 2s infinite ease-in-out;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-badge.unavailable .tb-compact-avail-dot {
    background: #ef4444;
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
    animation: none;
}

.tb-timeline-container.tb-compact-mode .tb-compact-avail-badge.loading .tb-compact-avail-dot {
    background: #94a3b8;
    box-shadow: none;
}

@keyframes tbPulseDot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.25);
        opacity: 0.7;
    }
}

/* Feedback d'erreur ou redirection */
.tb-compact-feedback {
    margin-top: 10px;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    text-align: center;
    line-height: 1.4;
}

.tb-compact-feedback.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.tb-compact-feedback.loading {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
    color: #be185d;
}

.tb-compact-field-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* Responsive : passage vertical sous 640px */
@media (max-width: 640px) {
    .tb-timeline-container.tb-compact-mode .tb-compact-bar-row {
        flex-direction: column;
        gap: 10px;
    }

    .tb-timeline-container.tb-compact-mode .tb-field-date,
    .tb-timeline-container.tb-compact-mode .tb-field-persons,
    .tb-timeline-container.tb-compact-mode .tb-field-action,
    .tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-checkin,
    .tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-checkout,
    .tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-persons,
    .tb-timeline-container.tb-compact-mode .tb-compact-bar-nuitee .tb-field-action {
        flex: 1 1 100%;
        width: 100%;
    }

    .tb-compact-btn-ok {
        width: 100%;
    }
}

/* ── Jours Flatpickr Indisponibles et Réservations en cours ── */
.flatpickr-day.tb-day-unavailable,
.flatpickr-day.flatpickr-disabled:not(.tb-day-past) {
    background: rgba(241, 245, 249, 0.6) !important;
    color: #94a3b8 !important;
    text-decoration: line-through !important;
    cursor: not-allowed !important;
    opacity: 0.45 !important;
    border-color: transparent !important;
}

.flatpickr-day.tb-day-partially-booked::before {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 6px;
    height: 6px;
    background: #eab308;
    border-radius: 50%;
    box-shadow: 0 0 3px rgba(234, 179, 8, 0.8);
    pointer-events: none;
    z-index: 2;
}

.flatpickr-day.selected.tb-day-partially-booked::before {
    background: #ffffff;
    box-shadow: 0 0 3px rgba(255, 255, 255, 0.9);
}
