/* =============================================================================
   FYSH — Public EPC verification status badge + popup
   CR: fysh-epc-status-badge-2026-09-28
   Shown on a live listing when its EPC has failed the official register check
   (an expired certificate). Tokens only; 4px FYSH corner radius on the panel.
============================================================================= */

/* ── Red status badge (in the spec strip) ──────────────────────────────────── */
.epc-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-pill);
    color: var(--danger);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.4;
    cursor: pointer;
    vertical-align: middle;
    transition: background var(--ease), color var(--ease);
}
.epc-status-badge i { font-size: 12px; }
.epc-status-badge:hover { background: var(--danger); color: var(--white); }
.epc-status-badge:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }

/* ── Overlay + modal ───────────────────────────────────────────────────────── */
.epc-status-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 35, 64, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    animation: epcs-fade var(--ease);
}
.epc-status-overlay[hidden] { display: none; }

.epc-status-modal {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    padding: 24px 22px 20px;
    background: var(--surface-0);
    border: 1px solid var(--border);
    border-top: 4px solid var(--danger);
    border-radius: 4px;
    box-shadow: var(--shadow-lg);
    animation: epcs-pop var(--ease-out);
}

.epc-status-close {
    position: absolute;
    top: 10px;
    right: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--faint);
    font-size: 18px;
    cursor: pointer;
    transition: color var(--ease), background var(--ease);
}
.epc-status-close:hover { color: var(--navy); background: var(--surface-2); }

.epc-status-head { margin-bottom: 12px; padding-right: 28px; }
.epc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    background: var(--danger-bg);
    color: var(--danger);
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
}
.epc-status-pill i { font-size: 13px; }
.epc-status-title {
    margin: 12px 0 0;
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--navy);
}

.epc-status-lead {
    margin: 0 0 14px;
    font-family: var(--font-body);
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--slate);
}

.epc-status-facts {
    list-style: none;
    margin: 0 0 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
}
.epc-status-facts li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.45;
    color: var(--slate);
}
.epc-status-facts li i { flex: 0 0 auto; margin-top: 1px; width: 20px; text-align: center; color: var(--danger); font-size: 16px; }
.epc-status-facts strong { color: var(--navy); }

.epc-status-note {
    margin: 0 0 18px;
    padding: 10px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
}

.epc-status-actions { display: flex; gap: 10px; flex-wrap: wrap; }

@keyframes epcs-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes epcs-pop {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .epc-status-overlay, .epc-status-modal { animation: none; }
    .epc-status-badge { transition: none; }
}
@media (max-width: 380px) {
    .epc-status-modal { padding: 22px 16px 16px; }
    .epc-status-title { font-size: 18px; }
    .epc-status-actions .wb-btn { width: 100%; }
}

/* ── Self-contained buttons (public page has no workbench button styles) ─────── */
.epc-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.epc-status-btn--primary { background: var(--blue); color: var(--white); }
.epc-status-btn--primary:hover { background: var(--blue-dark); }
.epc-status-btn--ghost { background: transparent; border-color: var(--border-strong); color: var(--slate); }
.epc-status-btn--ghost:hover { background: var(--surface-2); }
.epc-status-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
