/*
 * Restricted check-in dates render with a neutral (not unavailable-grey) appearance.
 * Booked-stay combos are excluded here — they get the booked (red) treatment below.
 * Only cells that can actually start or end a stay keep the neutral styling:
 * .pass-through (mid-stay nights of a bookable range) and *-available combos.
 * .trapped cells get the red treatment below — trapped means no valid stay can
 * ever include the night, so selectable-green invites clicks that only error.
 */
.homelocal-range-calendar .day-of-month.unavailable.checkin-restricted,
.homelocal-availability-calendar .day-of-month.checkin-blocked:not(.checkout-booked):not(.checkin-booked):not(.checkout-blocked):not(.trapped),
.homelocal-availability-calendar .day-of-month.checkin-blocked.checkout-blocked.pass-through {
    color: #000 !important;
    opacity: 1 !important;
}

/*
 * Booked stays and dead (trapped) nights render fully red, exactly like
 * checkin-booked/checkout-booked days. Mid-booking days arrive from the API as
 * available:0 / checkin:0 / checkout:0 and fall through to blocked (not booked)
 * classes. Trapped cells are included: the API can mark a night available:0 yet
 * the JS still classes it .trapped when an adjacent checkout/checkin passes the
 * trapped gate (the "booked shows green" escape reported 2026-07-28), and an
 * available:1 trapped gap night is unbookable anyway (min-stay), so green would
 * still error on click. Invariant after this rule: green means clickable.
 */
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-blocked,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-booked,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-booked.checkout-blocked {
    /* The YOOtheme custom-CSS layer (theme.1.css) paints every .checkin-blocked /
       .checkout-blocked cell green, and the day halves (::before/::after) sit at
       z-index:-1 BEHIND the cell background — so the cell background, not the
       halves, decides the visible color and must be overridden here too. */
    background-color: var(--homelocal-availability-calendar-bg_booked) !important;
    color: var(--homelocal-availability-calendar-color_booked) !important;
    opacity: 1;
}

.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-blocked::before,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-blocked::after,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-booked::before,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-booked::after,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-booked.checkout-blocked::before,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-booked.checkout-blocked::after {
    background-color: var(--homelocal-availability-calendar-bg_booked);
}

.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-blocked .price,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-blocked.checkout-booked .price,
.homelocal-availability-calendar .week .day.day-of-month:not(.disabled):not(.selected):not(.selectable):not(.pass-through):not(.pass-through-temp).checkin-booked.checkout-blocked .price {
    display: none;
}

/* Shared hover tooltip bubble — created on demand by calendar-rules.js ensureTip(). */
#homelocal-calendar-tip {
    position: absolute;
    z-index: 999999;
    display: none;
    max-width: 260px;
    padding: 8px 12px;
    background: #222;
    color: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    pointer-events: none;
}
#homelocal-calendar-tip .tip-content {
    font-size: 13px;
    line-height: 1.4;
}

/*
 * A selected range is one uniform green. Selected days that also carry
 * checkin-blocked (Sundays) or checkout-blocked stayed light green because the
 * theme rule `.day-of-month.checkin-blocked, .day-of-month.checkout-blocked
 * { background-color: #e4f4d9 !important }` comes after `.day-of-month.selected`
 * (client feedback doc, 2 Oct 2026, p.7). Booked-day red rules above are all
 * :not(.selected) and stay untouched.
 */
.homelocal-availability-calendar .week .day.day-of-month.selected.checkin-blocked,
.homelocal-availability-calendar .week .day.day-of-month.selected.checkout-blocked {
    background-color: var(--homelocal-availability-calendar-bg_selected, #b7db9f) !important;
}

/* Same conflict inside the explorer date-picker popup. */
.homelocal-range-calendar .week .day.day-of-month.selected.checkin-blocked,
.homelocal-range-calendar .week .day.day-of-month.selected.checkout-blocked {
    background-color: var(--homelocal-range-calendar-bg_color_selected, #f7f7f7) !important;
}
