@charset "UTF-8";

/* ===== Booking modal: responsive layout =====
   Desktop/tablet: [date] [guests] on one row, calendar below.
   Mobile: date, then calendar, then guests — each on its own row. */
.cal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "dates guests"
        "calendar calendar";
    column-gap: 0.8rem;
    align-items: start;
}

.cal-area-dates {
    grid-area: dates;
}

.cal-area-guests {
    grid-area: guests;
}

.cal-area-calendar {
    grid-area: calendar;
}

@media screen and (max-width: 767.98px) {
    .cal-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "dates"
            "calendar"
            "guests";
    }
}

/* ===== Booking modal: select dates / occupancy row ===== */
.cal-selection-box {
    width: 100%;
    margin-bottom: 1.5rem;
}

.cal-select-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 1.5px solid #158a74;
    border-radius: 12px;
    padding: 0.6rem 0.9rem;
    text-align: left;
}

.cal-select-pill.has-caret {
    cursor: pointer;
}

.cal-select-pill.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
    animation: calPillShake 0.4s;
}

@keyframes calPillShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.cal-select-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #000;
    flex: 0 0 auto;
}

.cal-select-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.cal-select-label {
    font-size: 0.7rem;
    color: #888;
}

.cal-select-value {
    font-size: 0.85rem;
    font-weight: 700;
    color: #222;
}

.cal-select-clear {
    margin-left: auto;
    border: none;
    background: none;
    color: #999;
    font-size: 0.9rem;
    cursor: pointer;
    line-height: 1;
    flex: 0 0 auto;
}

.cal-select-clear:hover {
    color: #0f6e5c;
}

.cal-select-caret {
    margin-left: auto;
    color: #999;
    font-size: 0.7rem;
    flex: 0 0 auto;
    transition: transform 0.15s ease;
}

.cal-select-pill.open .cal-select-caret {
    transform: rotate(180deg);
}

.cal-occupancy-popover {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    padding: 1rem;
    width: 240px;
    z-index: 20;
    cursor: default;
}

.cal-select-pill.open .cal-occupancy-popover {
    display: block;
}

.cal-occupancy-popover .guest-counter {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.cal-occupancy-popover .guest-type {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cal-occupancy-popover .guest-type .label {
    font-size: 0.9rem;
    color: #333;
    font-weight: 600;
}

.cal-occupancy-popover .controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.cal-occupancy-popover .controls button {
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    border: 1px solid #ccc;
    background: #fff;
    color: #158a74;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.cal-occupancy-popover .controls button:hover {
    border-color: #158a74;
}

.cal-occupancy-popover .controls button:disabled {
    color: #ccc;
    border-color: #eee;
    cursor: not-allowed;
}

.cal-occupancy-popover .controls button.hidden {
    display: none;
}

.cal-occupancy-popover .controls .count {
    min-width: 1.2rem;
    text-align: center;
    font-weight: 700;
}

.cal-occupancy-done {
    width: 100%;
    padding: 0.55rem;
    border-radius: 10px;
    border: none;
    background: #158a74;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

.cal-occupancy-done:hover {
    background: #0f6e5c;
}

/* ===== Booking modal: calendar ===== */
.cal-nav-row {
    position: relative;
    padding: 0 2.4rem;
}

.cal-nav-arrow {
    position: absolute;
    top: 0.1rem;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: none;
    background: #158a74;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cal-nav-arrow.prev {
    left: 0;
}

.cal-nav-arrow.next {
    right: 0;
}

.cal-nav-arrow:hover:not(:disabled) {
    background: #0f6e5c;
}

.cal-nav-arrow:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.cal-months-row {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    flex-wrap: wrap;
    overflow: hidden;
}

.cal-month-slot {
    display: none;
}

.cal-month-slot.active {
    display: block;
    flex: 1 1 200px;
    max-width: 230px;
    min-width: 0;
    margin-bottom: 1rem;
}

.cal-month {
    width: 100%;
}

.cal-month-title {
    font-weight: 800;
    font-size: 1.05rem;
    color: #222;
    margin-bottom: 0.9rem;
    text-align: center;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-dow {
    font-size: 0.65rem;
    color: #999;
    text-align: center;
    padding-bottom: 4px;
    font-weight: 600;
}

.cal-cell {
    position: relative;
    text-align: center;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-cell.empty {
    background: transparent;
}

.cal-cell.available {
    cursor: pointer;
}

.cal-cell.disabled {
    cursor: not-allowed;
}

.cal-day-num {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 600;
    color: #333;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.cal-cell.available:hover .cal-day-num {
    background: #d7f4ea;
    transform: scale(1.08);
}

.cal-cell.disabled .cal-day-num {
    color: #b8b8b8;
    text-decoration: line-through;
    font-weight: 500;
}

/* Check-in / check-out range highlight */
.cal-cell.in-range::before {
    content: '';
    position: absolute;
    inset: 4px 0;
    background: #d7f4ea;
    z-index: 0;
}

.cal-cell.in-range.range-start::before {
    left: 50%;
    border-radius: 999px 0 0 999px;
}

.cal-cell.in-range.range-end::before {
    right: 50%;
    border-radius: 0 999px 999px 0;
}

.cal-cell.range-start .cal-day-num,
.cal-cell.range-end .cal-day-num {
    background: #0f6e5c;
    color: #fff;
}

@media screen and (max-width: 538.98px) {
    .cal-months-row {
        gap: 0.5rem;
    }

    .cal-select-value {
        font-size: 0.8rem;
    }

    .cal-occupancy-popover {
        left: 0;
        right: 0;
        width: auto;
    }

    .cal-grid {
        gap: 2px;
    }

    .cal-cell {
        min-height: 34px;
    }
}
