/* "Recent Notifications" sidebar (Views/Shared/_govjobsidebar.cshtml), shared by the listing
   pages, job details, and the by-state / by-education / by-profession pages. Self-contained:
   it does not rely on gov-list-page.css, since most of those pages don't load it. Colors are
   tokens on .gsb so the dark theme (html[data-theme="dark"]) only swaps the tokens. */

.gsb {
    --gsb-red: #d9232d;
    --gsb-card: #fff;
    --gsb-text: #1f2328;
    --gsb-muted: #5f6873;
    --gsb-line: #eceef1;
    --gsb-hover: #fff5f5;
    --gsb-skeleton: #eef0f3;
    --gsb-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
}

html[data-theme="dark"] .gsb {
    --gsb-card: #1e293b;
    --gsb-text: #f1f5f9;
    --gsb-muted: #cbd5e1;
    --gsb-line: #334155;
    --gsb-hover: #243349;
    --gsb-skeleton: #2b3a50;
    --gsb-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.gsb-ad {
    margin-bottom: 16px;
}

.gsb-card {
    background: var(--gsb-card);
    border: 1px solid var(--gsb-line);
    border-radius: 14px;
    box-shadow: var(--gsb-shadow);
    overflow: hidden;
    color: var(--gsb-text);
}

/* ---------- Header ---------- */
.gsb-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #e0313a 0%, #c41e27 50%, #9c141c 100%);
    color: #fff;
}

.gsb-head-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    font-size: .9rem;
}

.gsb-title {
    flex: 1 1 auto;
    margin: 0;
    font-family: 'Montserrat', 'Montserrat Fallback', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.gsb-live {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.gsb-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4ade80;
    animation: gsb-pulse 2s infinite;
}

@keyframes gsb-pulse {
    0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); }
    70% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0); }
    100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .gsb-dot { animation: none; }
}

/* ---------- List ---------- */
.gsb-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

    .gsb-list > li {
        border-bottom: 1px solid var(--gsb-line);
    }

        .gsb-list > li:last-child {
            border-bottom: none;
        }

    .gsb-list a {
        display: block;
        padding: 11px 16px;
        transition: background .12s ease;
    }

        .gsb-list a:hover,
        .gsb-list a:focus-visible {
            background: var(--gsb-hover);
            text-decoration: none;
        }

.gsb-item-title {
    display: block;
    font-size: .88rem;
    line-height: 1.45;
    color: var(--gsb-text);
    overflow-wrap: anywhere;
}

.gsb-list a:hover .gsb-item-title {
    color: var(--gsb-red);
}

.gsb-badge {
    display: inline-block;
    margin-top: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.5;
    /* Latest Job and anything unrecognised */
    background: #e8f0fe;
    color: #1d4ed8;
}

    .gsb-badge.is-result { background: #e6f6ec; color: #15803d; }
    .gsb-badge.is-admit { background: #f1e9fe; color: #7e22ce; }
    .gsb-badge.is-answer { background: #e0f5f5; color: #0f766e; }
    .gsb-badge.is-admission { background: #fef3e2; color: #b45309; }
    .gsb-badge.is-syllabus { background: #fdecee; color: #b91c1c; }

html[data-theme="dark"] .gsb-badge { background: rgba(96, 165, 250, .16); color: #93c5fd; }
html[data-theme="dark"] .gsb-badge.is-result { background: rgba(74, 222, 128, .14); color: #86efac; }
html[data-theme="dark"] .gsb-badge.is-admit { background: rgba(192, 132, 252, .16); color: #d8b4fe; }
html[data-theme="dark"] .gsb-badge.is-answer { background: rgba(45, 212, 191, .14); color: #5eead4; }
html[data-theme="dark"] .gsb-badge.is-admission { background: rgba(251, 191, 36, .14); color: #fcd34d; }
html[data-theme="dark"] .gsb-badge.is-syllabus { background: rgba(248, 113, 113, .14); color: #fca5a5; }

/* Placeholder rows shown until the list loads. */
.gsb-skeleton {
    padding: 13px 16px;
}

    .gsb-skeleton span {
        display: block;
        height: 10px;
        border-radius: 5px;
        background: var(--gsb-skeleton);
        animation: gsb-shimmer 1.2s ease-in-out infinite alternate;
    }

        .gsb-skeleton span + span {
            width: 55%;
            margin-top: 8px;
        }

@keyframes gsb-shimmer {
    from { opacity: 1; }
    to { opacity: .45; }
}

@media (prefers-reduced-motion: reduce) {
    .gsb-skeleton span { animation: none; }
}

.gsb-msg {
    padding: 18px 16px;
    font-size: .86rem;
    color: var(--gsb-muted);
    text-align: center;
}

/* ---------- Footer ---------- */
.gsb .gsb-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    border-top: 1px solid var(--gsb-line);
    font-size: .85rem;
    font-weight: 700;
    color: var(--gsb-red);
    transition: background .12s ease;
}

    .gsb .gsb-foot:hover {
        background: var(--gsb-hover);
        text-decoration: none;
    }
