/* ============================================
   Availability Calendar — matches the design
   ============================================ */

.availability-calendar {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 0px;
    overflow: hidden;
    font-family: 'Poppins', Arial, sans-serif;
    max-width: 100%;
    margin-bottom: 10px;
}

/* ---------- Header ---------- */
.cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #fff;
    padding: 10px 14px;
    border-bottom: 1px solid #ddd;
}

.cal-header .cal-month-year {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-transform: capitalize;
}

.cal-header .cal-nav {
    display: flex;
    gap: 6px;
}

.cal-header .cal-nav button {
    background: none;
    border: 1px solid #ccc;
    border-radius: 0px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #555;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.cal-header .cal-nav button:hover {
    background: #e0e0e0;
}

/* ---------- Week-day row ---------- */
.cal-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.cal-weekdays .cal-wd {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #555;
    padding: 8px 0;
    text-transform: uppercase;
}

/* ---------- Day grid ---------- */
.cal-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    background: #e8e8e8;
}

.cal-day {
    position: relative;
    background: #fff;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 2px;
    cursor: default;
    transition: opacity 0.15s;
}

.cal-day.empty {
    background: #fff;
    cursor: default;
}

/* Day number */
.cal-day .day-num {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}

/* Price beneath the number */
.cal-day .day-price {
    font-size: 0.6rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 1px;
}

/* ---------- Status colours ---------- */
.cal-day.status-available {
    background-color: #5a9e3f;
    /* green */
}

.cal-day.status-booked {
    background-color: #8b1a1a;
    /* dark red / maroon */
}

.cal-day.status-pending {
    background-color: #d4943a;
    /* orange / amber */
}

/* Empty / outside-month cells */
.cal-day.empty .day-num,
.cal-day.empty .day-price {
    visibility: hidden;
}

/* Hover effect for clickable days */
.cal-day:not(.empty):hover {
    opacity: 0.85;
}

/* ---------- Legend ---------- */
.cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 14px;
    border-top: 1px solid #ddd;
    background: #fff;
}

.cal-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cal-legend-item .legend-swatch {
    width: 30px;
    height: 28px;
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    color: #fff;
}

.cal-legend-item .legend-swatch.swatch-available {
    background-color: #5a9e3f;
}

.cal-legend-item .legend-swatch.swatch-booked {
    background-color: #8b1a1a;
}

.cal-legend-item .legend-swatch.swatch-pending {
    background-color: #d4943a;
}

.cal-legend-item .legend-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}

.cal-legend-item .legend-dash {
    color: #999;
}

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
    .cal-day {
        min-height: 42px;
    }

    .cal-day .day-num {
        font-size: 0.9rem;
    }

    .cal-day .day-price {
        font-size: 0.55rem;
    }

    .cal-header .cal-month-year {
        font-size: 0.9rem;
    }
}
