/* ============================================================
   Hero Date Range Picker — StayZiro
   ============================================================ */

/* ── Trigger Button (replaces the two date inputs) ── */
.hero-daterange-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 8px;
    transition: background 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.hero-daterange-trigger:hover {
    background: rgba(0, 188, 212, 0.06);
}

.hero-daterange-icon {
    display: flex;
    align-items: center;
    color: #00bcd4;
    flex-shrink: 0;
}

.hero-daterange-text {
    font-size: 0.88rem;
    font-weight: 500;
    color: #333;
    line-height: 1;
}

.hero-daterange-text .dtr-checkin,
.hero-daterange-text .dtr-checkout {
    display: inline;
}

.hero-daterange-text .dtr-sep {
    margin: 0 5px;
    color: #bbb;
}

/* ── Popover Container ── */
.hero-datepicker-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    padding: 20px;
    z-index: 1000000;
    min-width: 320px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    border: 1px solid rgba(0,0,0,0.06);
}

.hero-datepicker-popover.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* ── Calendar Header ── */
.dtp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dtp-nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: background 0.15s, color 0.15s;
}

.dtp-nav-btn:hover {
    background: #f0f9fb;
    color: #00bcd4;
}

.dtp-month-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.01em;
}

/* ── Day Names Row ── */
.dtp-day-names {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}

.dtp-day-name {
    text-align: center;
    font-size: 0.72rem;
    font-weight: 600;
    color: #aaa;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Day Grid ── */
.dtp-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.dtp-day {
    position: relative;
    text-align: center;
    padding: 7px 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.12s, color 0.12s;
    user-select: none;
    line-height: 1;
}

.dtp-day:empty {
    cursor: default;
}

.dtp-day.is-other-month {
    color: #ccc;
    pointer-events: none;
}

.dtp-day.is-past {
    color: #ddd;
    pointer-events: none;
}

.dtp-day.is-today {
    color: #00bcd4;
    font-weight: 700;
}

.dtp-day:not(.is-past):not(:empty):not(.is-other-month):hover {
    background: rgba(0, 188, 212, 0.12);
    color: #00bcd4;
}

/* Check-in / Check-out endpoints */
.dtp-day.is-checkin,
.dtp-day.is-checkout {
    background: #00bcd4 !important;
    color: #fff !important;
    border-radius: 50%;
    font-weight: 700;
    z-index: 2;
}

/* Range between dates */
.dtp-day.is-in-range {
    background: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
    border-radius: 0;
}

/* Bridge left/right edges for range */
.dtp-day.is-range-start {
    border-radius: 50% 0 0 50%;
    background: rgba(0, 188, 212, 0.1) !important;
}

.dtp-day.is-range-end {
    border-radius: 0 50% 50% 0;
    background: rgba(0, 188, 212, 0.1) !important;
}

/* When start = end (same column/position) */
.dtp-day.is-checkin.is-range-start,
.dtp-day.is-checkout.is-range-end {
    background: #00bcd4 !important;
    border-radius: 50% !important;
}

/* ── Footer with night count ── */
.dtp-footer {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #f0f0f0;
}

.dtp-nights-label {
    font-size: 0.82rem;
    color: #888;
}

.dtp-nights-label strong {
    color: #333;
}

.dtp-reset-btn {
    background: none;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 5px 14px;
    font-size: 0.8rem;
    color: #666;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.dtp-reset-btn:hover {
    border-color: #00bcd4;
    color: #00bcd4;
}

.dtp-hint {
    font-size: 0.78rem;
    color: #aaa;
    text-align: center;
    margin-top: 10px;
    min-height: 18px;
}

/* ── Mobile Responsive ── */
@media (max-width: 768px) {
    .hero-datepicker-popover {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(8px);
        min-width: 300px;
        padding: 16px;
    }

    .hero-datepicker-popover.is-open {
        transform: translateX(-50%) translateY(0);
    }

    .hero-daterange-trigger {
        padding: 2px 4px;
    }

    .hero-daterange-text {
        font-size: 0.82rem;
    }

    .dtp-day {
        font-size: 0.8rem;
        padding: 6px 0;
    }
}
