/* School Calendar Styles - Divine Light Academy */
.school-calendar-box,
.school-calendar-page-box {
    background: #fffdf5;
    border: 1.5px solid #ecd897;
    border-radius: 14px;
    padding: 1.1em 1em 1.3em;
    width: 100%;
    max-width: 420px;
    margin: 0 auto 1.5em auto;
    box-shadow: 0 4px 18px rgba(18, 60, 120, 0.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    font-family: inherit;
}

.school-calendar-title-flex {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 0.9em;
    padding-bottom: 0.6em;
    border-bottom: 1px solid #ebd9a2;
}

.school-calendar-month-title {
    font-size: 1.05em;
    font-weight: 700;
    color: #123c78;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.school-calendar-month-title:hover {
    color: #d99b26;
}

.school-calendar-nav-btn {
    background: #fdf5de;
    border: 1px solid #e0c878;
    color: #123c78;
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: all 0.15s ease;
}

.school-calendar-nav-btn:hover {
    background: #123c78;
    color: #fff;
    border-color: #123c78;
}

.school-calendar-month-dropdown {
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid #e0c878;
    background: #fff;
    color: #123c78;
    font-weight: 600;
    font-size: 0.9em;
}

.school-calendar-box table,
.school-calendar-page-box table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.school-calendar-box th,
.school-calendar-page-box th {
    color: #123c78;
    font-weight: 700;
    font-size: 0.85em;
    padding: 0.4em 0;
    text-align: center;
    text-transform: uppercase;
}

.school-calendar-box td,
.school-calendar-page-box td {
    text-align: center;
    padding: 0.45em 0.2em;
    font-size: 0.92em;
    color: #2b3b52;
    position: relative;
    border-radius: 6px;
    cursor: default;
    height: 32px;
}

.school-calendar-box td.today {
    background: #123c78;
    color: #ffffff !important;
    font-weight: bold;
    border-radius: 50%;
}

.school-calendar-box td.has-event {
    cursor: pointer;
    font-weight: 700;
    color: #123c78;
    background: rgba(217, 155, 38, 0.15);
    border-radius: 8px;
}

.school-calendar-box td.has-event:hover {
    background: #d99b26;
    color: #ffffff;
}

.school-calendar-box td.has-event.today:hover {
    background: #0d2247;
}

.calendar-event-dots {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-top: 1px;
    line-height: 1;
}

.calendar-event-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    display: inline-block;
    background: #d99b26;
}

.calendar-event-dot.holiday { background: #e02424; }
.calendar-event-dot.academic { background: #e3a008; }
.calendar-event-dot.announcement { background: #0e9f6e; }
.calendar-event-dot.event { background: #3f83f8; }
.calendar-event-dot.activity { background: #7e3af2; }

.school-calendar-admin-bar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px dashed #ebd9a2;
    font-size: 12px;
}

.school-calendar-admin-btn {
    color: #123c78;
    font-weight: 700;
    text-decoration: none;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.school-calendar-admin-btn:hover {
    text-decoration: underline;
    color: #d99b26;
}

/* Calendar Modal Popup Styles */
.calendar-event-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 34, 71, 0.55);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    padding: 14px;
    backdrop-filter: blur(2px);
}
.calendar-event-modal-overlay.open { display: flex; }

.calendar-event-modal-card {
    background: #ffffff;
    border-radius: 14px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 16px 36px rgba(18, 60, 120, 0.22);
    overflow: hidden;
    animation: calModalFadeIn 0.2s ease-out;
}
@keyframes calModalFadeIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.calendar-event-modal-header {
    background: linear-gradient(135deg, #123c78, #0d2247);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.calendar-event-modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}
.calendar-event-modal-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
}
.calendar-event-modal-close:hover { opacity: 1; }

.calendar-event-modal-body {
    padding: 16px 18px;
    max-height: 60vh;
    overflow-y: auto;
}

.calendar-event-item-card {
    border: 1px solid #e5edfa;
    background: #fbfdff;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.calendar-event-item-card:last-child { margin-bottom: 0; }
.calendar-event-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #123c78;
    margin: 0 0 6px 0;
}
.calendar-event-item-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}
.calendar-event-item-desc {
    font-size: 13px;
    color: #334155;
    line-height: 1.45;
    margin-top: 6px;
}
.calendar-badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.calendar-badge-holiday { background: #fde8e8; color: #9b1c1c; }
.calendar-badge-event { background: #e1effe; color: #1e429f; }
.calendar-badge-academic { background: #fef08a; color: #713f12; }
.calendar-badge-announcement { background: #dcfce7; color: #15803d; }
.calendar-badge-deadline { background: #ffedd5; color: #9a3412; }
.calendar-badge-activity { background: #ede9fe; color: #5b21b6; }
