﻿:root {
    --bg-color: #0d0d0d;
    --card-bg: rgba(40, 0, 0, 0.4);
    --maroon-accent: #800000;
    --border-glass: rgba(255, 255, 255, 0.1);
}

/* Base structural sections (Desktop above 992px) */
.calendar-section {
    flex: 0 0 70%; /* Increased from 50% */
    width: 70%;
    box-sizing: border-box;
}

.details-section {
    flex: 0 0 30%; /* Decreased from 50% */
    width: 30%;
    box-sizing: border-box;
}

/* Update your main layout gap to give a little more room to the right column */
.main-layout {
    display: flex;
    gap: 20px; /* Dropped from 30px to maximize column widths */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    align-items: flex-start;
    box-sizing: border-box;
}

.calendar-container {
    background: var(--bg-color);
    padding: 20px;
    border-radius: 15px;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    width: 100%; /* Forces inner container to snap to full calendar-section width */
    box-sizing: border-box;
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    color: var(--maroon-accent);
    margin-bottom: 10px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    width: 100%;
}

/* Combined & Flattened Day Cell Logic */
.day-cell {
    background: var(--card-bg);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(10px);
    aspect-ratio: 1 / 1;
    padding: 10px;
    position: relative;
    border-radius: 8px;
    transition: transform 0.2s, background 0.2s;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-sizing: border-box;
    /* ADD THESE TWO LINES TO OVERRIDE THE 101PX LIMIT */
    min-width: 0 !important;
    width: 100%;
}

    .day-cell:hover {
        background: rgba(128, 0, 0, 0.3);
        border-color: var(--maroon-accent);
    }

.day-number {
    font-size: 0.9em;
    opacity: 0.7;
}

.other-month {
    opacity: 0.3;
}

.rat-icon {
    width: 40px;
    height: 40px;
    display: block;
    margin: 10px auto;
}

/* Tooltip Logic */
.event-indicator {
    position: relative;
    cursor: pointer;
}

.tooltip {
    visibility: hidden;
    width: 160px;
    background-color: #1a1a1a;
    color: #fff;
    text-align: center;
    border: 1px solid var(--maroon-accent);
    padding: 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 999;
    bottom: 125%;
    left: 50%;
    margin-left: -80px;
    opacity: 0;
    transition: opacity 0.3s;
}

.event-indicator:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

/* Visibility toggles */
.mobile-date {
    display: none;
}

.full-date {
    display: inline;
}

/* Responsive adjustments for tablets */
@media (max-width: 992px) {
    .main-layout {
        flex-direction: column;
    }

    .calendar-section, .details-section {
        flex: 0 0 100%;
        width: 100%;
    }
}

/* Fluid Breakpoint for Mobile & Small Phones */
@media (max-width: 767px) {
    .full-date {
        display: none;
    }

    .mobile-date {
        display: inline;
    }

    .main-layout {
        flex-direction: column;
        padding: 10px;
        gap: 20px;
    }

    .calendar-section, .details-section {
        flex: 0 0 100%;
        width: 100%;
    }

    .calendar-container {
        padding: 2vw;
        border-radius: 8px;
    }

    .calendar-grid {
        gap: clamp(2px, 0.8vw, 6px);
    }

    .calendar-header {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
        margin-bottom: 5px;
    }

    .day-cell {
        padding: clamp(2px, 1vw, 6px);
        border-radius: 4px;
        aspect-ratio: 1 / 1;
    }

    .day-number.mobile-date {
        font-size: clamp(0.65rem, 2.2vw, 0.85rem);
        font-weight: bold;
    }

    .rat-icon {
        width: clamp(14px, 4.5vw, 28px);
        height: clamp(14px, 4.5vw, 28px);
        margin: 0 auto;
    }

    .tooltip {
        width: 140px;
        left: 50%;
        margin-left: -70px;
        font-size: 0.75rem;
    }
}
