﻿/* ======= CALENDAR + EVENT LIST GRID ======= */
.ccCalendarCombo {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 1rem;
}

    .ccCalendarCombo .ccCalendar {
        grid-column: 1;
    }

    .ccCalendarCombo .cc-event-list {
        grid-column: 2;
    }

/* ======= CALENDAR STYLES ======= */
.ccCalendar {
    width: 100%;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
    padding-bottom: 1em;
    overflow-x: hidden;
}

    .ccCalendar *, .ccCalendar *::before, .ccCalendar *::after {
        box-sizing: border-box;
    }

    /* --- Title Bar --- */
    .ccCalendar .title {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.4em;
        padding: 0.5em 0.75em;
        border-bottom: 1px solid #ccc;
    }

        .ccCalendar .title .curMonth {
            flex-grow: 1;
            text-align: center;
            font-size: 1.5rem;
            font-weight: bold;
        }

        .ccCalendar .title .nav {
            cursor: pointer;
            user-select: none;
            font-size: 1.5rem;
            padding: 0.25em 0.5em;
        }

        .ccCalendar .title .navFull {
            display: inline;
        }

        .ccCalendar .title .navSmall {
            display: none;
        }

    /* --- Calendar Grid --- */
    .ccCalendar .cc-calendar-root {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 0.5rem;
        padding: 0 0.5rem;
        font-size: clamp(0.8rem, 2vw, 1rem);
    }

    /* --- Weekday Headers --- */
    .ccCalendar .columnHeader {
        font-weight: bold;
        text-align: center;
        padding: 0.5rem;
        min-height: 3rem;
        background: #f9f9f9;
        border-radius: 4px;
    }

    /* --- Day Cells --- */
    .ccCalendar .dayCell {
        text-align: center;
        background: #eeeeee;
        border-radius: 5px;
        min-height: 5rem;
        padding: 1rem 0.5rem;
        overflow-wrap: anywhere;
        transition: background 0.2s, color 0.2s;
    }

        .ccCalendar .dayCell:hover {
            background-color: #b30000;
            color: #fff;
        }

        .ccCalendar .dayCell.today {
            background-color: #2c4961;
            color: #fff;
            font-weight: bold;
        }

        .ccCalendar .dayCell > .date {
            display: block;
            margin-bottom: 0.25rem;
        }

    /* --- Event Dots --- */
    .ccCalendar .eventDot {
        height: 10px;
        width: 10px;
        background-color: var(--cc-blue, #005fa3);
        border-radius: 50%;
        display: inline-block;
        margin-left: 0.3em;
    }

    .ccCalendar .dayCell.today .eventDot {
        background-color: #fff;
    }

    /* --- Tooltip --- */
    .ccCalendar .dayCell .event-tooltip {
        visibility: hidden;
        opacity: 0;
        background: #333;
        color: #fff;
        border-radius: 5px;
        padding: 0.3em 0.6em;
        position: absolute;
        z-index: 10;
        transform: translateX(-50%) translateY(10px);
        transition: opacity 0.2s;
        white-space: nowrap;
        font-size: 0.8em;
    }

    .ccCalendar .dayCell.has-events:hover .event-tooltip {
        visibility: visible;
        opacity: 1;
    }

/* ======= EVENT LIST STYLES ======= */
.cc-event-list {
    container-type: inline-size;
    container-name: eventList;
}

.eventlist-item {
    display: flex;
    flex-direction: row;
    margin: 5px 10px;
    border-radius: 2px;
    box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

    .eventlist-item.feature {
        justify-content: flex-end;
        min-height: 12em;
        margin-bottom: 2em;
        background: #fff;
    }

.eventlist-item-date {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60px;
    color: #fff;
    padding: 5px;
    font-family: 'Yantramanav', sans-serif;
}

.eventlist-item-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--cc-lightGrey);
    padding: 5px;
    flex: 1 1 auto;
}

.eventlist-item-image {
    width: 25%;
    background-size: cover;
    background-position: center;
}

.eventlist-item-text {
    width: 75%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.eventlist-item-about {
    padding: 0.5em;
    max-height: 180px;
    overflow: hidden;
}

.eventlist-item-title {
    font-size: 1.3em;
    font-weight: 400;
}

.eventlist-item-details {
    padding: 5px 5px 2px 0;
    border-top: 1px solid #003b8d;
    background: var(--cc-lightGrey);
}

.eventlist-location {
    padding: 0 5px;
    font-size: 15px;
}

.eventlist-item-detail-date {
    margin: 5px 0;
    display: flex;
    align-items: center;
}

/* ======= RESPONSIVE EVENT LIST ======= */
@container eventList (max-width: 600px) {
    .eventlist-item-image {
        width: 50%;
    }

    .eventlist-item-text {
        width: 50%;
    }
}

@container eventList (max-width: 400px) {
    .eventlist-item.feature {
        flex-direction: column;
    }

    .eventlist-item-image {
        display: none;
    }

    .eventlist-item-text {
        width: 100%;
    }
}

/* ======= RESPONSIVE CALENDAR ======= */
@media (max-width: 1000px) {
    .ccCalendar .columnHeader,
    .ccCalendar .dayCell {
        min-height: 4rem;
    }
}

@media (max-width: 500px) {
    .ccCalendar .columnHeader,
    .ccCalendar .dayCell {
        min-height: 2.5rem;
    }

    .ccCalendar .title .navFull {
        display: none;
    }

    .ccCalendar .title .navSmall {
        display: inline;
    }
}
