/* ===== School Event Calendar v2 ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

/* ── wrapper ── */
.sec-calendar-wrapper {
    font-family: 'Montserrat', sans-serif;
    max-width: 820px;
    margin: 0 auto;
    background: #fff;
    /* no box-shadow per request */
    user-select: none;
}

/* ── header: nav + title ── */
.sec-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 14px;
}

.sec-cal-title {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    letter-spacing: .5px;
    text-align: center;
}

/* Custom arrow buttons matching uploaded design */
.sec-nav-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: #7B5EA7;
    border-radius: 50%;
    cursor: pointer;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .18s, transform .18s;
    flex-shrink: 0;
    padding: 0;
}
.sec-nav-btn:hover {
    background: #634792;
    transform: scale(1.08);
}
.sec-nav-btn svg { display: block; }

/* ── Month grid ── */
.sec-month-grid {
    padding: 0 12px 8px;
}

.sec-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 6px;
}
.sec-weekday {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #888;
    padding: 6px 0;
    letter-spacing: .3px;
}
.sec-wd-sun { color: #7B5EA7; }

.sec-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

/* Day cell — bigger for mobile readability */
.sec-day-cell {
    min-height: 82px;
    background: #f7f7f9;
    border-radius: 12px;
    padding: 7px 6px 5px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    position: relative;
    border: 2px solid transparent;
    overflow: hidden;
}
.sec-day-cell:hover:not(.sec-other-month) {
    background: #ede8f6;
    border-color: #c7b8e8;
}
.sec-day-cell.sec-today {
    border-color: #7B5EA7;
    background: #ede8f6;
}
.sec-day-cell.sec-selected {
    background: #7B5EA7;
    border-color: #7B5EA7;
}
.sec-day-cell.sec-other-month {
    opacity: .3;
    cursor: default;
}
.sec-day-cell.sec-sunday .sec-day-num { color: #7B5EA7; }

/* Day number — big and readable */
.sec-day-num {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1;
    margin-bottom: 5px;
}
.sec-day-cell.sec-today:not(.sec-selected) .sec-day-num { color: #7B5EA7; }
.sec-day-cell.sec-selected .sec-day-num { color: #fff; }

/* Event pills inside cells */
.sec-day-events {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sec-event-pill {
    height: 16px;
    border-radius: 4px;
    padding: 0 4px;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 16px;
    font-family: 'Montserrat', sans-serif;
}
.sec-event-more {
    font-size: 9px;
    color: #aaa;
    font-weight: 600;
}

/* On very small screens: show colored dot instead of pill text */
@media (max-width: 420px) {
    .sec-event-pill {
        height: 7px;
        font-size: 0;
        border-radius: 50%;
        width: 7px;
        padding: 0;
        display: inline-block;
        margin-right: 2px;
    }
    .sec-day-events { flex-direction: row; flex-wrap: wrap; gap: 2px; }
    .sec-day-cell { min-height: 70px; }
    .sec-day-num { font-size: 14px; }
}

/* ── Event list section ── */
.sec-event-list-section {
    padding: 20px 20px 28px;
    margin-top: 4px;
}

.sec-list-header {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2.5px solid #7B5EA7;
}
.sec-list-title {
    font-size: 17px;
    font-weight: 900;
    color: #1a1a2e;
    letter-spacing: .5px;
}
.sec-list-subtitle {
    display: none;
}

.sec-event-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.sec-list-empty {
    font-size: 14px;
    color: #ccc;
    text-align: center;
    padding: 20px;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

/* List item */
.sec-list-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 4px 8px 4px 4px;
    border-radius: 14px;
    cursor: pointer;
    transition: background .15s;
    border-left: 4px solid transparent;
}
.sec-list-item:hover { background: #f7f4fd; }
.sec-list-item.sec-list-active {
    background: #f0ecfb;
    border-left-color: #7B5EA7;
}

/* Badge = big colored square with day number */
.sec-list-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sec-list-day {
    font-size: 20px;
    font-weight: 900;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    line-height: 1;
}

.sec-list-content {
    flex: 1;
    padding-top: 4px;
}
.sec-list-event-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 2px;
    font-family: 'Montserrat', sans-serif;
}
.sec-list-time {
    font-size: 12px;
    font-weight: 600;
    color: #7B5EA7;
    margin-bottom: 2px;
}
.sec-list-desc {
    font-size: 12px;
    color: #888;
    line-height: 1.5;
    margin-top: 2px;
}

/* Responsive tweaks */
@media (max-width: 560px) {
    .sec-cal-header { padding: 14px 10px 10px; }
    .sec-month-grid { padding: 0 6px 8px; }
    .sec-days-grid  { gap: 3px; }
    .sec-day-cell   { padding: 5px 4px; border-radius: 9px; }
    .sec-day-num    { font-size: 13px; }
    .sec-list-badge { width: 44px; height: 44px; border-radius: 10px; }
    .sec-list-day   { font-size: 16px; }
    .sec-list-event-title { font-size: 13px; }
    .sec-cal-title  { font-size: 15px; }
}

/* Multi-day continuation label */
.sec-list-cont {
    font-size: 11px;
    font-weight: 600;
    color: #bbb;
    font-style: italic;
    margin-top: 1px;
}
