/* --- Events page --- */

/* ── Month navigation ── */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.cal-month-label {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--al-navy);
    min-width: 240px;
    text-align: center;
    margin: 0;
}

.cal-nav-btn {
    background: none;
    border: 2px solid var(--al-navy);
    color: var(--al-navy);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.cal-nav-btn:hover {
    background-color: var(--al-navy);
    color: var(--al-white);
}

/* ── Calendar grid (desktop) ── */
.cal-grid {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--al-navy);
    color: var(--al-white);
}

.cal-header-cell {
    padding: 10px 4px;
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: #fff;
}

.cal-cell {
    min-height: 110px;
    border: 1px solid #eee;
    padding: 6px 8px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.cal-cell--empty {
    background-color: #fafafa;
}

.cal-cell--today {
    background-color: #eef5ff;
}

.cal-cell--today .cal-day-num {
    background-color: var(--al-navy);
    color: var(--al-white);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-day-num {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.cal-event-pill {
    display: block;
    width: 100%;
    text-align: left;
    background-color: var(--al-navy);
    color: var(--al-white);
    border: none;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-family: var(--font-body);
    margin-bottom: 3px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.2s;
}

.cal-event-pill:hover {
    background-color: var(--al-red);
}

/* ── Mobile list view ── */
.cal-list-ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cal-list-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    border-left: 4px solid var(--al-navy);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cal-list-item:last-child {
    border-bottom: none;
}

.cal-list-date {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    color: var(--al-navy);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.cal-list-time {
    font-size: 0.78rem;
    color: var(--al-gray);
    white-space: nowrap;
}

.cal-list-title {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--al-navy);
    cursor: pointer;
    text-align: left;
    flex: 1;
    min-width: 0;
}

.cal-list-title:hover {
    color: var(--al-red);
    text-decoration: underline;
}

/* ── Event lightbox ── */
.event-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}

.event-lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.event-lightbox {
    background: #fff;
    border-radius: 10px;
    max-width: 560px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform 0.25s;
}

.event-lightbox-overlay.active .event-lightbox {
    transform: translateY(0);
}

.event-lightbox-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.event-lightbox-close:hover {
    color: var(--al-red);
}

.event-lightbox-title {
    font-family: var(--font-heading);
    color: var(--al-navy);
    font-size: 1.5rem;
    margin: 0 0 15px;
    padding-right: 30px;
}

.event-lightbox-meta {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.event-lightbox-meta p {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #555;
}

.event-lightbox-desc {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--al-text);
    margin-bottom: 20px;
}

.event-lightbox-desc p {
    margin-bottom: 10px;
}

.event-lightbox-flyer {
    margin-bottom: 20px;
}

.event-lightbox-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.event-lightbox-actions .btn {
    display: inline-flex;
    align-items: center;
}

/* ── Hint text ── */
.cal-hint {
    font-size: 0.85rem;
    margin-bottom: 20px;
}

/* ── Empty state ── */
.cal-empty {
    font-size: 1rem;
    color: var(--al-gray);
}
