/* ================================================
   Date Range Picker — Wrapper Card
   ================================================ */
.date-range-picker {
    display: inline-flex;
    padding: 16px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    outline: 1px solid var(--light1);
}

.date-range-picker__panel {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    background: var(--light2);
    border-radius: 10px;
}

/* ================================================
   Month Banner (titre centré au-dessus du calendrier)
   ================================================ */
.date-range-picker__month-banner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border-radius: 10px;
    margin-bottom: 12px;
    gap: 2px;
    align-self: center;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.date-range-picker__month-label {
    text-align: center;
    color: var(--dark1);
    font-size: 20px;
    font-family: var(--font-helvetica);
    font-weight: var(--font-weight-bold);
    line-height: 26px;
    word-wrap: break-word;
}

/* ================================================
   Two-month layout
   ================================================ */
.date-range-picker__months {
    display: inline-flex;
    gap: 12px;
    justify-content: flex-start;
    align-items: flex-start;
}

/* ================================================
   Calendar Month
   ================================================ */
.cal-month {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cal-month__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cal-month__title {
    flex: 1;
    text-align: center;
    padding: 12px 24px;
    background: var(--white);
    border-radius: 10px;
    color: var(--dark1);
    font-size: 20px;
    font-family: var(--font-helvetica);
    font-weight: var(--font-weight-bold);
    line-height: 24px;
    white-space: nowrap;
}

.cal-month__nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: var(--white);
    border: none;
    border-radius: 80px;
    box-shadow: var(--shadow-circle);
    cursor: pointer;
    color: var(--dark1);
    font-size: 14px;
    transition: opacity 0.15s ease;
}

.cal-month__nav-btn:hover {
    opacity: 0.75;
}

.cal-month__nav-spacer {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

/* ================================================
   Weekday header row
   ================================================ */
.cal-weekdays {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.cal-weekdays__cell {
    width: 56px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-weekdays__label {
    color: var(--dark1);
    font-size: 16px;
    font-family: var(--font-helvetica);
    font-weight: var(--font-weight-bold);
    line-height: 20px;
    text-align: center;
}

/* ================================================
   Month grid
   ================================================ */
.cal-month__grid {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-month__week {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* ================================================
   Day Cell
   ================================================ */
.cal-day {
    position: relative;
    width: 56px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
}

.cal-day__cell {
    position: absolute;
    left: 2px;
    top: 0;
    width: 48px;
    height: 44px;
    border-radius: 6px;
    border: 0.5px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cal-day__number {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-size: 16px;
    font-family: var(--font-helvetica);
    font-weight: var(--font-weight-bold);
    line-height: 20px;
    pointer-events: none;
    transition: color 0.15s ease;
}

/* State: default */
.cal-day--default .cal-day__cell {
    background: var(--white);
    border-color: var(--light1);
}
.cal-day--default .cal-day__number {
    color: var(--dark1);
}
.cal-day--default:hover .cal-day__cell {
    background: var(--light-warm);
    border-color: var(--main-color);
}

/* State: disabled (outside current month) */
.cal-day--disabled {
    cursor: default;
    pointer-events: none;
}
.cal-day--disabled .cal-day__cell {
    background: rgba(210, 210, 210, 0.10);
    border-color: var(--light1);
}
.cal-day--disabled .cal-day__number {
    color: var(--gray2);
}

/* State: selected (single selection / start / end) */
.cal-day--selected .cal-day__cell,
.cal-day--start .cal-day__cell,
.cal-day--end .cal-day__cell {
    background: var(--main-color-orange);
    border-color: var(--main-color-orange);
}
.cal-day--selected .cal-day__number,
.cal-day--start .cal-day__number,
.cal-day--end .cal-day__number {
    color: var(--white);
}

/* State: in-range */
.cal-day--in-range .cal-day__cell {
    background: var(--light-warm);
    border-color: transparent;
}
.cal-day--in-range .cal-day__number {
    color: var(--dark1);
}

/* ================================================
   Flexibility Selector
   ================================================ */
.flexibility-selector {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    align-self: stretch;
    margin-top: 12px;
}

.flexibility-selector__label {
    color: var(--dark1);
    font-size: 14px;
    font-family: var(--font-rubik);
    font-weight: var(--font-weight-regular);
    white-space: nowrap;
}

.flexibility-selector__options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flexibility-selector__option {
    padding: 2px 8px;
    background: var(--white);
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-button);
    color: var(--dark1);
    font-size: 14px;
    font-family: var(--font-rubik);
    font-weight: var(--font-weight-regular);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.flexibility-selector__option--active {
    background: var(--main-color);
    color: var(--dark1);
    border-color: var(--main-color);
}

.flexibility-selector__option:hover:not(.flexibility-selector__option--active) {
    background: var(--light2);
}

/* ================================================
   Footer: Clear + Validate
   ================================================ */
.date-range-picker__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    align-self: stretch;
}

.date-range-picker__clear {
    background: none;
    border: none;
    padding: 0;
    color: var(--dark1);
    font-size: 14px;
    font-family: var(--font-rubik);
    font-weight: var(--font-weight-regular);
    text-decoration: underline;
    cursor: pointer;
}


/* ================================================
   Responsive — Mobile : un mois par ligne
   ================================================ */
@media (max-width: 768px) {
    .date-range-picker {
        display: flex;
        width: 100%;
        box-sizing: border-box;
    }

    .date-range-picker__panel {
        width: 100%;
    }

    /* Empile les deux mois verticalement */
    .date-range-picker__months {
        flex-direction: column;
        width: 100%;
    }

    .cal-month {
        width: 100%;
    }

    /* Les cellules jour s'adaptent à la largeur disponible */
    .cal-weekdays,
    .cal-month__week {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
    }

    .cal-weekdays__cell,
    .cal-day {
        width: 100%;
    }

    .cal-day__cell {
        left: 1px;
        right: 1px;
        width: auto;
    }
}

/* ================================================
   Single Date Picker — overrides mois unique
   Corrige les règles two-months pour showMonths: 1
   ================================================ */

/* Ré-affiche la flèche suivant (masquée pour le 1er mois en mode 2 mois) */
.drp-calendar--single .flatpickr-months .flatpickr-month:first-child .flatpickr-next-month {
    visibility: visible;
}

/* Supprime padding-right et bordure droite du layout double-mois */
.drp-calendar--single .flatpickr-months .flatpickr-month:first-child {
    padding-right: 0;
    border-right: none;
}

.drp-calendar--single .flatpickr-rContainer:first-child {
    padding: 0;
    border-right: none;
}
