/* The verifier's own layout on eBRS's tokens: a compact header, plain hero and footer, none of eBRS's chrome. */

.verifier-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    background: var(--ebrs-color-canvas);
    color: var(--ebrs-color-fg);
    font-family: var(--ebrs-font-sans);
}

.verifier-no-scroll {
    overflow: hidden;
}

.verifier-skip {
    position: absolute;
    left: var(--ebrs-space-md);
    top: var(--ebrs-space-xs);
    z-index: 1100;
    padding: var(--ebrs-space-xs) var(--ebrs-space-md);
    background: var(--ebrs-color-surface);
    border-radius: var(--ebrs-radius-md);
}

.verifier-container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--ebrs-space-md);
}

.verifier-main {
    flex: 1 0 auto;
}

/* Header */
.verifier-header {
    background: var(--ebrs-color-surface);
    border-bottom: 1px solid var(--ebrs-color-border);
}

.verifier-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ebrs-space-md);
    flex-wrap: wrap;
}

.verifier-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-sm);
    color: var(--ebrs-color-fg-strong);
    text-decoration: none;
    font-weight: var(--ebrs-font-weight-semibold);
    font-size: var(--ebrs-font-size-lg);
}

.verifier-brand:hover {
    color: var(--ebrs-color-accent-emphasis);
}

.verifier-brand__logo {
    height: 44px;
    width: auto;
}

.verifier-nav {
    display: flex;
    align-items: center;
    gap: var(--ebrs-space-md);
}

.verifier-nav__verify {
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    border-radius: var(--ebrs-radius-md);
    padding: var(--ebrs-space-xs) var(--ebrs-space-md);
    font-weight: var(--ebrs-font-weight-medium);
}

.verifier-nav__verify:hover,
.verifier-nav__verify:focus-visible {
    background: var(--ebrs-color-accent-hover);
    color: var(--ebrs-color-fg-on-accent);
}

.verifier-nav__external {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ebrs-color-fg);
    text-decoration: none;
    font-weight: var(--ebrs-font-weight-medium);
}

.verifier-nav__external i {
    font-size: var(--ebrs-font-size-xs);
}

.verifier-nav__external:hover {
    color: var(--ebrs-color-accent-emphasis);
}

@media (max-width: 575.98px) {
    .verifier-brand__name {
        font-size: var(--ebrs-font-size-md);
    }

    .verifier-nav {
        width: 100%;
        justify-content: space-between;
    }
}

/* Hero */
.verifier-hero {
    background: var(--ebrs-color-surface);
    border-bottom: 1px solid var(--ebrs-color-border);
    padding: clamp(32px, 8vh, 72px) 0;
}

.verifier-hero__title {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: var(--ebrs-font-weight-bold);
    color: var(--ebrs-color-fg-strong);
    margin-bottom: var(--ebrs-space-sm);
}

.verifier-hero__lead {
    font-size: var(--ebrs-font-size-lg);
    color: var(--ebrs-color-fg-muted);
    margin-bottom: var(--ebrs-space-lg);
}

.verifier-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ebrs-space-sm);
}

.verifier-hero__primary {
    width: auto;
}

.verifier-hero__secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
    border: 1px solid var(--ebrs-color-border-strong);
    background: var(--ebrs-color-surface);
    color: var(--ebrs-color-fg-strong);
    border-radius: var(--ebrs-radius-md);
    font-weight: var(--ebrs-font-weight-medium);
}

.verifier-hero__secondary:hover {
    border-color: var(--ebrs-color-accent);
    color: var(--ebrs-color-accent-emphasis);
}

/* Home sections */
.verifier-sections {
    display: flex;
    flex-direction: column;
    gap: var(--ebrs-space-lg);
    padding-top: var(--ebrs-space-xl);
    padding-bottom: var(--ebrs-space-xl);
}

.verifier-section {
    background: var(--ebrs-color-surface);
    border: 1px solid var(--ebrs-color-border);
    border-radius: 12px;
    padding: var(--ebrs-space-lg);
}

.verifier-section h2 {
    font-size: var(--ebrs-font-size-xl);
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
    margin-bottom: var(--ebrs-space-sm);
}

.verifier-section p:last-child,
.verifier-list:last-child,
.verifier-steps:last-child {
    margin-bottom: 0;
}

.verifier-list,
.verifier-steps {
    padding-left: 1.25rem;
}

.verifier-list li,
.verifier-steps li {
    margin-bottom: 6px;
}

.verifier-trust {
    border-left: 4px solid var(--ebrs-color-accent);
}

.verifier-ebrs-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ebrs-space-md);
    flex-wrap: wrap;
}

.verifier-ebrs-card__link {
    display: inline-flex;
    align-items: center;
    gap: var(--ebrs-space-xs);
}

.verifier-ebrs-card p {
    margin-bottom: 0;
}

.verifier-faq dt {
    font-weight: var(--ebrs-font-weight-semibold);
    color: var(--ebrs-color-fg-strong);
    margin-top: var(--ebrs-space-sm);
}

.verifier-faq dt:first-child {
    margin-top: 0;
}

.verifier-faq dd {
    margin: 4px 0 0;
    color: var(--ebrs-color-fg-muted);
}

/* Where to find the details: a drawn sample, so no real document is ever shown. */
.verifier-sample {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ebrs-space-lg);
    align-items: flex-start;
}

.verifier-sample__document {
    position: relative;
    flex: 0 0 auto;
    width: 340px;
    max-width: 100%;
    margin: 0;
    padding: var(--ebrs-space-md);
    padding-right: 96px;
    min-height: 140px;
    background: var(--ebrs-color-surface-sunken);
    border: 1px dashed var(--ebrs-color-border-strong);
    border-radius: var(--ebrs-radius-md);
    font-size: var(--ebrs-font-size-sm);
}

.verifier-sample__qr {
    position: absolute;
    top: var(--ebrs-space-md);
    right: var(--ebrs-space-md);
    width: 64px;
    height: 64px;
    background:
        repeating-linear-gradient(90deg, var(--ebrs-color-fg-strong) 0 6px, transparent 6px 12px),
        repeating-linear-gradient(0deg, var(--ebrs-color-fg-strong) 0 6px, transparent 6px 12px);
    background-blend-mode: difference;
    border: 4px solid var(--ebrs-color-fg-strong);
}

.verifier-sample__line {
    margin-bottom: 6px;
}

.verifier-sample__line span,
.verifier-sample__qr span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    font-size: var(--ebrs-font-size-xs);
    font-weight: var(--ebrs-font-weight-bold);
}

.verifier-sample__qr span {
    position: absolute;
    top: -12px;
    left: -12px;
}

.verifier-sample__legend {
    flex: 1 1 280px;
    padding-left: 1.25rem;
    margin: 0;
}

.verifier-note {
    margin: var(--ebrs-space-md) 0 0;
    padding: var(--ebrs-space-sm) var(--ebrs-space-md);
    background: var(--ebrs-color-info-subtle);
    border-left: 4px solid var(--ebrs-color-info);
    border-radius: var(--ebrs-radius-md);
}

/* Verification page */
.verifier-error {
    padding: var(--ebrs-space-sm);
    border-radius: var(--ebrs-radius-md);
    background: var(--ebrs-color-danger-subtle);
    color: var(--ebrs-color-danger);
    font-weight: var(--ebrs-font-weight-medium);
    white-space: pre-line;
}

.verifier-loading {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .6);
}

.verifier-loading.d-none {
    display: none;
}

.verifier-loading__spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--ebrs-color-border);
    border-top-color: var(--ebrs-color-accent);
    border-radius: 50%;
    animation: verifier-spin .8s linear infinite;
}

@keyframes verifier-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Most of the screen on desktop, less on phones; svh stays steady as the address bar moves. */
.verification-document-viewer {
    height: 85vh;
    min-height: 420px;
}

@media (max-width: 767.98px) {
    .verification-document-viewer {
        height: 75vh;
        height: 75svh;
        min-height: 360px;
    }
}

.verification-document-viewer:fullscreen {
    height: 100vh;
    border-radius: 0;
}

/* Where the browser has no element full screen (iPhone Safari), the viewer fills the window. */
.verification-document-viewer.verification-document-viewer--full-screen {
    position: fixed;
    inset: 0;
    z-index: 1050;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    border-radius: 0;
    border: 0;
}

/* Footer: eBRS's public footer wording, the verifier's own markup. */
.verifier-footer {
    background: var(--ebrs-color-accent);
    color: var(--ebrs-color-fg-on-accent);
    padding: var(--ebrs-space-lg) 0;
    margin-top: auto;
}

.verifier-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--ebrs-space-md);
    text-align: center;
}

.verifier-footer p {
    margin: 0 0 4px;
}

.verifier-footer__copyright {
    color: var(--ebrs-green-100);
    font-size: var(--ebrs-font-size-sm);
}

.verifier-footer__links {
    display: flex;
    justify-content: center;
    gap: var(--ebrs-space-md);
}

.verifier-footer a {
    color: var(--ebrs-color-fg-on-accent);
}

.verifier-error-page {
    padding: var(--ebrs-space-xl) var(--ebrs-space-md);
}
