/**
 * VillaWell Public Calendar Styles - Premium Redesign
 */

.villawell-public-calendar-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

.villawell-public-calendar-header {
    text-align: center;
    margin-bottom: 40px;
}

.villawell-public-calendar-header h3 {
    margin: 0;
    padding-bottom: 20px;
    font-size: 32px;
    font-family: 'Playfair Display', serif;
    color: #183b59;
    /* Deep Blue */
    position: relative;
    display: inline-block;
}

.villawell-public-calendar-header h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #C5A065;
    /* Gold */
    margin: 15px auto 0;
}

/* Legend */
.villawell-public-calendar-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 50px;
    padding: 20px 30px;
    background: #ffffff;
    border-radius: 4px;
    box-shadow: 0 5px 20px rgba(24, 59, 89, 0.05);
    border: 1px solid #e1e8ed;
}

.villawell-public-calendar-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.villawell-public-calendar-legend .legend-color {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 2px;
    /* Remove borders for cleaner look */
}

.villawell-public-calendar-legend .legend-color.available {
    background: #f4fcec;
    /* Brand Light Mint */
    border: 1px solid #dcdcdc;
}

.villawell-public-calendar-legend .legend-color.booked {
    background: #f8d7da;
    /* Soft Red for booked */
    border: 1px solid #f5c6cb;
}

.villawell-public-calendar-legend .legend-color.partial {
    background: #fff3cd;
    border: 1px solid #ffeeba;
}

.villawell-public-calendar-legend .legend-color.past {
    background: #f1f1f1;
    border: 1px solid #e1e1e1;
}

/* Months container */
.villawell-public-calendar-months {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

/* Single month Card */
.villawell-public-calendar-month {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(24, 59, 89, 0.08);
    border-top: 3px solid #C5A065;
    /* Gold Top Border */
    transition: transform 0.3s ease;
}

.villawell-public-calendar-month:hover {
    transform: translateY(-5px);
}

.villawell-public-calendar-month .month-header {
    background: #ffffff;
    /* White header */
    color: #183b59;
    /* Deep Blue Text */
    padding: 20px 15px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}

.villawell-public-calendar-month .month-header h4 {
    margin: 0;
    padding: 0;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
}

/* Calendar table */
.calendar-table {
    width: 100% !important;
    border-collapse: separate;
    /* Use separate for spacing if needed, or collapse */
    border-spacing: 2px;
    /* Small gap between cells */
    table-layout: fixed !important;
    margin: 10px 0;
}

.calendar-table thead th {
    width: 14.28571% !important;
    padding: 15px 5px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    background: transparent;
    border: none;
}

.calendar-table tbody td {
    width: 14.28571% !important;
    padding: 0;
    text-align: center;
    vertical-align: middle;
    height: 45px;
    border: none;
    /* Removed borders for cleaner look */
    border-radius: 4px;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
    font-size: 14px;
    color: #333;
}

/* Default Day */
.calendar-table tbody td.calendar-day {
    background: #fff;
}

.calendar-table tbody td.other-month {
    opacity: 0.3;
}

.calendar-table tbody td.past {
    color: #ccc;
    background: transparent;
    text-decoration: line-through;
}

/* Available */
.calendar-table tbody td.available {
    background: #f4fcec;
    /* Brand Light Mint */
    color: #183b59;
    font-weight: 500;
    cursor: pointer;
}

.calendar-table tbody td.available:hover {
    background: #183b59;
    /* Deep Blue Hover */
    color: #fff;
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(24, 59, 89, 0.2);
}

/* Booked */
.calendar-table tbody td.booked {
    background: #fdf2f3;
    /* Very soft red */
    color: #a8444e;
    /* Muted red text */
    position: relative;
    overflow: hidden;
}

/* Add diagonal stripe for booked to look elegant */
.calendar-table tbody td.booked::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: repeating-linear-gradient(45deg,
            transparent,
            transparent 5px,
            rgba(168, 68, 78, 0.05) 5px,
            rgba(168, 68, 78, 0.05) 10px);
}

/* Partial (Spa) */
.calendar-table tbody td.partial {
    background: #fff9e6;
    color: #b58900;
}

.calendar-table tbody td.partial:hover {
    transform: scale(1.1);
    z-index: 2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.calendar-table tbody td .day-number {
    display: block;
    position: relative;
    z-index: 1;
}

/* Tooltip for spa calendar */
.calendar-day-tooltip {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #183b59;
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.calendar-day-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #183b59;
}

.calendar-table tbody td:hover .calendar-day-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .villawell-public-calendar-wrapper {
        margin: 20px auto;
        padding: 0 15px;
    }

    .villawell-public-calendar-months {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .villawell-public-calendar-legend {
        gap: 15px;
        padding: 15px;
    }

    .villawell-public-calendar-header h3 {
        font-size: 26px;
    }

    .calendar-table thead th {
        font-size: 10px;
        padding: 10px 2px;
    }

    .calendar-table tbody td {
        height: 40px;
        font-size: 13px;
    }
}