/* ============================================================
   notification.css — StudentSite notification bell + dropdown
   Scoped under .home-page (same convention as home.css), reuses
   the brand CSS variables already defined there.
   ============================================================ */

.home-page .hp-notif { position: relative; }

.home-page .hp-notif-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    color: var(--on-surface-variant);
    font-size: 20px;
    transition: background .15s, color .2s;
}
.home-page .hp-notif-trigger:hover {
    background: rgba(0, 0, 0, .06);
    color: var(--primary);
}

.home-page .hp-notif-mute {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-left: 4px;
    border: none;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
    color: var(--on-surface-variant);
    font-size: 16px;
}
.home-page .hp-notif-mute:hover {
    background: rgba(0, 0, 0, .06);
    color: var(--primary);
}

.home-page .hp-notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #d32f2f;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.home-page .hp-notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 360px;
    max-width: 92vw;
    max-height: 60vh;
    overflow-y: auto;
    background: var(--surface-lowest);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .15);
    z-index: 200;
    display: none;
    font-size: 13px;
}
.home-page .hp-notif-panel.is-open { display: block; }

@media (max-width: 767px) {
    /* .hp-notif-panel's absolute right:0 assumes the trigger sits near the
       right edge of a wide nav (true on desktop). On mobile the bell sits
       near the middle/left of a cramped nav-trail, so a right-anchored
       360px panel overflows far past the left edge of the viewport,
       clipping its own content. Anchor to the viewport instead. */
    .home-page .hp-notif-panel {
        position: fixed;
        top: 88px;
        left: 16px;
        right: 16px;
        width: auto;
        max-width: none;
        max-height: calc(100vh - 104px);
    }
    /* Same containing-block trap as the hamburger drawer (see home.css):
       .hp-nav's backdrop-filter would otherwise confine this fixed panel
       to the 80px-tall nav bar instead of the viewport. */
    .home-page .hp-nav:has(.hp-notif-panel.is-open) {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.home-page .hp-notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid var(--outline-variant);
    position: sticky;
    top: 0;
    background: var(--surface-lowest);
}
.home-page .hp-notif-title { font-weight: 700; color: var(--on-surface); }
.home-page .hp-notif-mark-all { border: none; background: none; color: var(--primary); cursor: pointer; font-size: 12px; }

.home-page .hp-notif-item { padding: 10px 12px; border-bottom: 1px solid var(--outline-variant); cursor: pointer; }
.home-page .hp-notif-item:hover,
.home-page .hp-notif-item.is-unread { background: var(--surface-container); }
.home-page .hp-notif-item-head { display: flex; align-items: center; gap: 6px; }
.home-page .hp-notif-dot { width: 8px; height: 8px; border-radius: 50%; background: #d32f2f; flex: 0 0 auto; }
.home-page .hp-notif-item-title { font-weight: 700; color: var(--on-surface); }
.home-page .hp-notif-item-content {
    white-space: pre-wrap;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    color: var(--on-surface-variant);
}
.home-page .hp-notif-item-note { font-style: italic; font-size: 11px; color: var(--on-surface-variant); }
.home-page .hp-notif-item-time { font-size: 10px; color: var(--on-surface-variant); margin-top: 2px; }
.home-page .hp-notif-empty { text-align: center; padding: 20px; color: var(--on-surface-variant); }

.home-page .hp-notif-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-page .hp-notif-modal {
    background: var(--surface-lowest);
    border-radius: 12px;
    max-width: 480px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    padding: 20px;
    position: relative;
}
.home-page .hp-notif-modal-close { position: absolute; top: 8px; right: 12px; border: none; background: none; font-size: 24px; cursor: pointer; }
.home-page .hp-notif-modal-title { margin: 0 24px 0 0; color: var(--on-surface); }
.home-page .hp-notif-modal-content { white-space: pre-wrap; margin-top: 10px; color: var(--on-surface); }
.home-page .hp-notif-modal-note { font-style: italic; color: var(--on-surface-variant); margin-top: 8px; }
