/* SIRMV certificate pages. Builds on style.css tokens and components. */

/* Brand theme from the server-validated branding (data-brand-theme on .cert-page). Default: navy. */
.cert-page { --cert-brand: var(--navy); }
.cert-page[data-brand-theme="teal"] { --cert-brand: #0f5c63; }
.cert-page[data-brand-theme="maroon"] { --cert-brand: #6b1d2a; }

.cert-page .cert-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
}
.cert-page .cert-subnav a {
    color: var(--cert-brand);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
}
.cert-page .cert-subnav a[aria-current="page"],
.cert-page .cert-subnav a:hover { background: var(--cert-brand); color: #fff; }

.cert-page .cert-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
}
.cert-page .cert-card h2,
.cert-page .cert-card h3 { color: var(--cert-brand); margin-bottom: 0.75rem; }
.cert-page .cert-card p,
.cert-page .cert-card li { color: var(--muted); line-height: 1.7; font-size: 0.97rem; }
.cert-page .cert-card ol,
.cert-page .cert-card ul { padding-left: 1.25rem; margin: 0.5rem 0 0.75rem; }
.cert-page .cert-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.cert-notice {
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
    line-height: 1.6;
    border-left: 4px solid;
}
.cert-notice--error { background: #fef2f2; color: #7f1d1d; border-color: #dc2626; }
.cert-notice--info { background: #eff6ff; color: #1e3a8a; border-color: #2563eb; }
.cert-notice--success { background: #f0fdf4; color: #14532d; border-color: #16a34a; }

.cert-field { margin-bottom: 1.25rem; }
.cert-field label { display: block; font-weight: 600; color: var(--cert-brand); margin-bottom: 0.4rem; }
.cert-field input {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
}
.cert-field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.cert-field small { display: block; margin-top: 0.4rem; color: var(--muted); font-size: 0.85rem; }
.cert-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }

.cert-table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.cert-table th,
.cert-table td {
    text-align: left;
    padding: 0.75rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.cert-table th { color: var(--cert-brand); font-weight: 700; }
.cert-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
}
.cert-badge--valid { background: #dcfce7; color: #14532d; }
.cert-badge--invalid { background: #fee2e2; color: #7f1d1d; }

.cert-verify-outcome {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.cert-verify-outcome--valid { color: #14532d; }
.cert-verify-outcome--invalid,
.cert-verify-outcome--revoked,
.cert-verify-outcome--replaced { color: #7f1d1d; }
.cert-details dt { font-weight: 600; color: var(--cert-brand); margin-top: 0.75rem; }
.cert-details dd { margin: 0.15rem 0 0; color: var(--muted); word-break: break-word; }

@media (max-width: 640px) {
    .cert-page .cert-card { padding: 1.25rem; }
    .cert-page .cert-table th,
    .cert-page .cert-table td { padding: 0.6rem 0.25rem; font-size: 0.88rem; }
}
