@charset "UTF-8";
/* CSS Document */

.wg-calendar-container {
    max-width: 100%;
    margin: 0 auto 20px;
    font-family: Arial, sans-serif;
    border: 1px solid var(--wg-medium-gray);
    border-radius: 10px;
    overflow: hidden; 
}

.wg-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--wg-light-gray);
    border-bottom: 1px solid var(--wg-medium-gray);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

/* UNIVERSAL BOLD TITLE */
.wg-calendar-title h2 {
    margin: 0;
    font-weight: bold;
}

.wg-calendar-nav a {
    text-decoration: none;
    color: inherit; 
    padding: 0 5px;
}

.wg-calendar-nav .nav-separator {
    color: var(--wg-medium-gray);
    margin: 0 5px;
}

/* Hide footer navigation by default on desktop */
.wg-calendar-footer-nav {
    display: none;
}

/* DESKTOP GRID STYLES (Default) */
.wg-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); 
}

.wg-calendar-day-header {
    text-align: center;
    padding: 8px 4px;
    background-color: var(--wg-light-gray);
    border-bottom: 1px solid var(--wg-medium-gray);
    font-weight: bold;
}

/* Corner Cell Fixes for the Bottom */
.wg-calendar-grid .wg-calendar-cell:nth-last-child(7):nth-child(7n - 6) {
    border-bottom-left-radius: 10px;
}

.wg-calendar-grid .wg-calendar-cell:nth-last-child(1):nth-child(7n) {
    border-bottom-right-radius: 10px;
}

.wg-calendar-cell {
    min-height: 120px;
    padding: 5px;
    border-right: 1px solid var(--wg-medium-gray);
    border-top: 1px solid var(--wg-medium-gray);
    position: relative;
    overflow: hidden;
    box-sizing: border-box; 
    background-color: var(--wg-white);
}

.wg-calendar-cell:nth-child(7n) {
    border-right: none;
}

.wg-calendar-cell.empty {
    background-color: var(--wg-light-gray);
}

.wg-calendar-cell.today {
    background-color: var(--wg-medium-gray);
    border: 2px solid var(--wg-red);
    padding: 3px;
}

.wg-calendar-date-number {
    text-align: right;
    margin-bottom: 5px;
    font-size: 1.25em; 
    font-weight: bold;
}

/* Default state: Hide venue name on desktop (UPDATED CLASS) */
.wg-calendar-venue-name {
    display: none;
}

.wg-event-list {
    list-style: none !important; 
    margin: 0 !important;
    padding: 0 !important;
}

.wg-event-item {
    margin: 0; 
    padding: 0;
    margin-bottom: 3px;
}

.wg-event-item a {
    display: block;
    background-color: var(--wg-light-gray); 
    color: inherit; 
    text-decoration: none;
    padding: 3px 5px;
    border-radius: 3px;
    transition: background-color 0.2s;
    overflow: hidden;
    text-overflow: ellipsis; 
    white-space: normal;
}

.wg-event-item a:hover {
    background-color: var(--wg-medium-gray);
}

.wg-event-item a strong {
    display: inline;
}

.wg-community-name {
    display: inline;
}

/* -------------------------------------- */
/* TOOLTIP STYLING (For Desktop) */
/* -------------------------------------- */
.wg-custom-tooltip {
    position: absolute;
    z-index: 99999; 
    
    background-color: #333;
    color: var(--wg-white);
    padding: 8px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    
    font-size: 0.8em;
    line-height: 1.2em;
    
    white-space: normal; 
    
    text-align: left;
    max-width: 300px;
    
    display: none;
}

/* -------------------------------------- */
/* MOBILE/TABLET AGENDA VIEW & NAVIGATION STACKING (MAX-WIDTH: 900PX) */
/* -------------------------------------- */
@media (max-width: 900px) {
    
    /* 1. HEADER STACKING */
    .wg-calendar-header {
        flex-direction: column;
        align-items: flex-start;
        padding-bottom: 5px;
    }
    
    /* Center the month title */
    .wg-calendar-title {
        width: 100%;
        text-align: center;
    }
    
    /* Place month navigation UNDER the title and center it */
    .wg-calendar-nav {
        width: 100%;
        text-align: center;
        margin-top: 5px; 
        padding-top: 5px;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }
    
    /* 2. AGENDA VIEW */
    .wg-calendar-day-header {
        display: none;
    }

    .wg-calendar-grid {
        grid-template-columns: 1fr;
    }

    .wg-calendar-cell {
        min-height: auto;
        border-right: none;
        border-left: none;
        padding: 10px;
    }
    
    .wg-calendar-cell:not(.empty) {
        border-bottom: 2px solid var(--wg-medium-gray);
    }
    
    .wg-calendar-cell.empty {
        display: none;
    }

    /* Date number and event list styling */
    .wg-calendar-date-number {
        float: left;
        margin-right: 10px;
        margin-bottom: 0;
        font-size: 1.5em;
        font-weight: bold;
    }

    .wg-calendar-events {
        overflow: hidden;
    }
    
    .wg-event-item a {
        padding: 5px 8px;
        margin-left: 0;
        margin-right: 0;
    }

    /* 3. TOOLTIP REMOVAL & VENUE DISPLAY (UPDATED CLASS) */
    .wg-custom-tooltip {
        display: none !important;
    }
    
    .wg-calendar-venue-name {
        display: inline;
        color: #666; 
    }
    
    /* 4. FOOTER NAVIGATION */
    .wg-calendar-footer-nav {
        display: block; /* Show the bottom navigation */
        text-align: center;
        padding: 10px 15px;
        background-color: var(--wg-light-gray);
        border-top: 1px solid var(--wg-medium-gray);
        border-bottom-left-radius: 10px; 
        border-bottom-right-radius: 10px;
    }

    .wg-calendar-footer-nav a {
        padding: 0 10px;
    }
}