/* ═══════════════════════════════════════════════════════════════
   Release Validation Result Page  —  rv-result-page.css
   Full-height layout: header + subheader fixed, only rows scroll
   ═══════════════════════════════════════════════════════════════ */

/* Loading / error */
.rvp-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60vh;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.85rem;
}

/* ── Lock outer layout when result page is active ────────────── */
/* Prevents the browser/layout from scrolling — only rvp-table-scroll scrolls */
.page:has(.rvp-page) {
    height: 100vh;
    overflow: hidden;
}
.page:has(.rvp-page) main {
    overflow: hidden;
    height: 100%;
}
.page:has(.rvp-page) article {
    overflow: hidden !important;
    padding: 0 !important;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* ── Full-height page shell ──────────────────────────────────── */
.rvp-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: #f1f5f9;
}

/* ── Top sticky header ───────────────────────────────────────── */
.rvp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 1.25rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    z-index: 50;
}

.rvp-header-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.rvp-title-icon {
    font-size: 1rem;
    color: #1d4ed8;
    flex-shrink: 0;
}

.rvp-title-main {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}

.rvp-title-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
    font-size: 0.7rem;
    color: #64748b;
    line-height: 1.3;
}

.rvp-sep {
    color: #cbd5e1;
    font-size: 0.65rem;
    margin: 0 0.1rem;
}

.rvp-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

/* Action buttons shared base */
.rvp-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 5px;
    border: 1px solid;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    line-height: 1.4;
}

.rvp-btn-back  { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.rvp-btn-back:hover  { background: #f1f5f9; color: #1e293b; }
.rvp-btn-html  { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.rvp-btn-html:hover  { background: #dbeafe; }
.rvp-btn-csv   { color: #166534; background: #f0fdf4; border-color: #bbf7d0; }
.rvp-btn-csv:hover   { background: #dcfce7; }

/* ── Sub-header: status strip + compact stats ────────────────── */
.rvp-subheader {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.rvp-status-strip {
    display: flex;
    align-items: center;
    padding: 0.45rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    flex: 1;
    min-width: 0;
}
.rvp-status-strip.compliant      { color: #166534; background: #f0fdf4; }
.rvp-status-strip.action-required{ color: #991b1b; background: #fef2f2; }
.rvp-status-strip.info           { color: #1d4ed8; background: #eff6ff; }

.rvp-stats-strip {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0 1rem;
    flex-shrink: 0;
    border-left: 1px solid #e2e8f0;
}

.rvp-stat {
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
}

.rvp-stat-num {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    line-height: 1;
}
.rvp-stat-lbl {
    font-size: 0.65rem;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.rvp-stat-ok   .rvp-stat-num { color: #16a34a; }
.rvp-stat-miss .rvp-stat-num { color: #dc2626; }

.rvp-stat-div {
    width: 1px;
    height: 1.5rem;
    background: #e2e8f0;
}

/* ── Scrollable content area ─────────────────────────────────── */
.rvp-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* ── Sticky tab bar ──────────────────────────────────────────── */
.rvp-tab-bar {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
    padding: 0 0.75rem;
    gap: 0;
}

.rvp-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}
.rvp-tab:hover { color: #1e293b; }
.rvp-tab.active {
    color: #1d4ed8;
    border-bottom-color: #1d4ed8;
}

.rvp-tab-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    padding: 0 0.3rem;
    height: 1.1rem;
    font-size: 0.62rem;
    font-weight: 700;
    border-radius: 10px;
    background: #e2e8f0;
    color: #475569;
}
.rvp-tab-pill.ok   { background: #dcfce7; color: #166534; }
.rvp-tab-pill.miss { background: #fee2e2; color: #b91c1c; }

/* ── The only scrolling region ───────────────────────────────── */
.rvp-table-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;
    background: #fff;
}

/* Empty state inside scroll area */
.rvp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 3rem 1rem;
    color: #94a3b8;
    font-size: 0.82rem;
}
.rvp-empty .bi { font-size: 2rem; opacity: 0.3; }

/* ── Table ───────────────────────────────────────────────────── */
.rvp-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    color: #334155;
}

.rvp-tbl thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #f8fafc;
    padding: 0.45rem 0.7rem;
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    white-space: nowrap;
}

.rvp-tbl tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.1s;
}
.rvp-tbl tbody tr:hover { background: #f8fafc; }
.rvp-tbl tbody tr.rvp-row-miss { background: #fff5f5; }
.rvp-tbl tbody tr.rvp-row-miss:hover { background: #fee2e2; }

.rvp-tbl td {
    padding: 0.35rem 0.7rem;
    vertical-align: middle;
    line-height: 1.35;
}

.rvp-name { font-weight: 600; color: #1e293b; font-size: 0.76rem; }
.rvp-date { white-space: nowrap; color: #64748b; font-size: 0.72rem; }

/* scrollbar styling */
.rvp-table-scroll::-webkit-scrollbar { width: 6px; height: 6px; }
.rvp-table-scroll::-webkit-scrollbar-track { background: #f1f5f9; }
.rvp-table-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.rvp-table-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
