/* pages.css — Full-page overlay shell + News / Hall of Fame / Jobs worker styles.
   Follows the same overlay pattern as security.css.
   All colours use CSS variables so theme + accent changes propagate automatically. */

/* ═══════════════════════════════════════════════════════════════
   OVERLAY SHELL
   (mirrors .sec-overlay pattern from security.css)
   ═══════════════════════════════════════════════════════════════ */

.page-overlay {
    position: fixed;
    top: 0;
    left: 200px;   /* sidebar width */
    right: 0;
    bottom: 0;
    z-index: 500;
    background: var(--surface-primary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;

    /* Hidden state */
    opacity: 0;
    pointer-events: none;
    transform: translateX(100%);
    transition:
        opacity   0.28s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-overlay--open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.page-overlay-shell {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* ── Top bar ─────────────────────────────────────────────────── */

.page-overlay-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 32px 16px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.page-overlay-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.page-overlay-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, color 0.15s;
}
.page-overlay-close:hover {
    background: var(--surface-secondary);
    color: var(--text-primary);
}

/* ── Scrollable body ─────────────────────────────────────────── */

.page-overlay-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.page-overlay-body::-webkit-scrollbar { width: 6px; }
.page-overlay-body::-webkit-scrollbar-track { background: transparent; }
.page-overlay-body::-webkit-scrollbar-thumb { background: var(--surface-tertiary); border-radius: 4px; }

/* ── Sidebar divider between scroll-nav and page-nav ─────────── */

.sidebar-divider--nav {
    margin: 6px 12px;
}

/* ═══════════════════════════════════════════════════════════════
   SHARED PAGE LAYOUT
   (.page-inner, .page-header, .filter-row, .filter-pill, etc.)
   ═══════════════════════════════════════════════════════════════ */

.page-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

/* Full-width variant — Jobs, Privacy, Links, and any page whose content
   benefits from using all the available panel space (no 900px cap). */
.page-inner--full {
    max-width: none;
}

/* ── Skeleton loading placeholders ──────────────────────────────────────── */

.skeleton-card {
    pointer-events: none;
}

.skel {
    background: linear-gradient(
        90deg,
        var(--surface-secondary) 25%,
        var(--surface-tertiary)  50%,
        var(--surface-secondary) 75%
    );
    background-size: 200% 100%;
    border-radius: 6px;
    animation: skel-shimmer 1.4s ease-in-out infinite;
}

@keyframes skel-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skel--title  { height: 18px; width: 55%; margin-bottom: 10px; }
.skel--line   { height: 12px; width: 100%; margin-bottom: 8px; }
.skel--short  { width: 65% !important; }
.skel--avatar { width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0; }

/* News and Hall of Fame opt out of the shared 900px cap — they use grids
   that benefit from filling the full available panel width. */
#page-overlay-news .page-inner,
#page-overlay-hall-of-fame .page-inner {
    max-width: none;
}

.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin: 0 0 8px;
}

.page-sub {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* ── Filter pills ─────────────────────────────────────────────── */

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-pill {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.filter-pill:hover {
    background: var(--surface-tertiary);
    color: var(--text-primary);
}
.filter-pill.active {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
}

/* ── Empty state ─────────────────────────────────────────────── */

.status-none {
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 32px 0;
    text-align: center;
}

/* ── Shared small button modifier ────────────────────────────── */

.btn-sm {
    padding: 6px 14px !important;
    font-size: 13px !important;
}

/* ═══════════════════════════════════════════════════════════════
   NEWS WORKER STYLES
   ═══════════════════════════════════════════════════════════════ */

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

/* ── Card ────────────────────────────────────────────────────── */

.news-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px 20px 16px;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px color-mix(in srgb, var(--accent-color) 12%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 40%, var(--border-color));
}

.news-card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.news-type-badge {
    background: color-mix(in srgb, var(--accent-color) 15%, var(--surface-tertiary));
    color: var(--accent-color);
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.news-status-badge {
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}
.news-status--upcoming   { background: color-mix(in srgb, #0A84FF 15%, transparent); color: #0A84FF; }
.news-status--live       { background: color-mix(in srgb, #30D158 15%, transparent); color: #30D158; }
.news-status--archived   { background: color-mix(in srgb, #8E8E93 15%, transparent); color: #8E8E93; }
.news-status--coming-soon { background: color-mix(in srgb, #FF9F0A 15%, transparent); color: #FF9F0A; }

.news-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-left: auto;
}

.news-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.news-summary-short {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.news-tag {
    background: var(--surface-tertiary);
    color: var(--text-tertiary);
    border-radius: 5px;
    padding: 2px 8px;
    font-size: 11px;
}

/* ── Detail view (replaces the list in-place inside the News panel) ───
   Typography for the rendered markdown itself lives in markdown.css
   (shared .markdown-body class) — this block only owns layout.
   No max-width here, same as Product Docs — content fills the already-
   unrestricted #page-overlay-news .page-inner above. */

.news-detail-body {
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════
   HALL OF FAME WORKER STYLES
   ═══════════════════════════════════════════════════════════════ */

.hof-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 16px;
}

.hof-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: transform 0.18s, box-shadow 0.18s;
}
.hof-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-color) 10%, transparent);
}

/* Accent-coloured left border per category */
.hof--bounty   { border-left: 3px solid #FF9F0A; }
.hof--donor    { border-left: 3px solid #0A84FF; }
.hof--feature  { border-left: 3px solid #BF5AF2; }
.hof--community{ border-left: 3px solid #30D158; }

.hof-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}
.hof-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hof-avatar-placeholder {
    width: 100%;
    height: 100%;
    background: color-mix(in srgb, var(--accent-color) 20%, var(--surface-tertiary));
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
}

.hof-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hof-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hof-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hof-cat-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--surface-tertiary);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 2px 8px;
    white-space: nowrap;
}

.hof-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.55;
    margin: 0;
}

.hof-ref {
    font-size: 12px;
    color: var(--accent-color);
    font-weight: 500;
}

.hof-date {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   JOBS WORKER STYLES
   ═══════════════════════════════════════════════════════════════ */

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.job-card {
    background: var(--surface-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.job-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--accent-color) 10%, transparent);
    border-color: color-mix(in srgb, var(--accent-color) 30%, var(--border-color));
}

.job-card-left {
    flex-shrink: 0;
}

.job-image {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
}

.job-image-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--accent-color) 15%, var(--surface-tertiary));
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.job-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.job-top {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.job-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.job-type-badge {
    background: color-mix(in srgb, var(--accent-color) 15%, var(--surface-tertiary));
    color: var(--accent-color);
    border-radius: 6px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.job-location {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.job-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.job-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.job-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 700px) {
    .page-overlay {
        left: 0;
        top: 56px;   /* below collapsed mobile sidebar */
    }

    .page-inner {
        padding: 24px 16px 60px;
    }

    .page-overlay-topbar {
        padding: 14px 16px 12px;
    }

    .news-grid,
    .hof-grid {
        grid-template-columns: 1fr;
    }

    .job-card {
        flex-direction: column;
        gap: 12px;
    }
}


