/* ============================================================
   PCS Lab Certificate Engine — stylesheet
   Shared across self-contained lab tools (NOT the story-template
   daily pages — those use page_builder's own certificate widget).
   Injected markup (see lab-certificate.js) uses these class names,
   so any lab that includes this file gets the same certificate
   look, ID/name fields, and save-status feedback for free.

   Uses the site's shared CSS variables (--accent, --border, etc.)
   with sane fallbacks in case a page loads this before core.css.
   ============================================================ */

.pcs-cert-wrap {
    max-width: 640px;
    margin: 36px auto 0;
    text-align: center;
}

.pcs-cert-wrap .name-field {
    max-width: 320px;
    margin: 0 auto 18px;
    text-align: left;
}

.pcs-cert-wrap .name-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.pcs-cert-wrap .name-field input[type="text"] {
    width: 100%;
    background: var(--bg, #0b1220);
    color: var(--text, #e2e8f0);
    border: 1px solid var(--border, #263449);
    border-radius: 6px;
    padding: 8px 10px;
    font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    font-size: 0.9rem;
}

.pcs-certificate {
    background: #fdfaf3;
    color: #2a2a2a;
    border: 2px solid var(--accent, #fbbf24);
    border-radius: 16px;
    padding: 36px 40px;
    font-family: var(--sans, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}

.pcs-certificate .cap {
    font-size: 2.2rem;
    margin-bottom: 8px;
}

.pcs-certificate .eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #8a8a8a;
    font-size: 0.72rem;
    margin-bottom: 8px;
}

.pcs-certificate .cert-title {
    color: #c2570f;
    font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    font-size: 1.7rem;
    font-weight: 700;
    margin: 4px 0 18px;
}

.pcs-certificate .certifies {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.pcs-certificate .student-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1a1a1a;
}

.pcs-certificate hr.solid {
    border: none;
    border-top: 1px solid #e7e0d0;
    margin: 18px 0;
}

.pcs-certificate hr.dashed {
    border: none;
    border-top: 1px dashed #ddd4c0;
    margin: 18px 0;
}

.pcs-certificate .body-text {
    color: #444;
    font-size: 0.92rem;
    line-height: 1.6;
    text-align: left;
}

.pcs-certificate .cert-item-list {
    text-align: left;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
    font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    font-size: 0.82rem;
    color: #333;
}

.pcs-certificate .cert-item-list li {
    margin-bottom: 6px;
}

.pcs-certificate .cert-footer {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.75rem;
    color: #8a8a8a;
    font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
}

.pcs-cert-print-btn {
    margin-top: 20px;
    background: var(--accent, #fbbf24);
    color: #1a1305;
    border: none;
    border-radius: 6px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.pcs-cert-print-btn:hover {
    background: #f7b100;
}

.pcs-cert-status {
    margin-top: 10px;
    font-size: 0.82rem;
    font-family: var(--mono, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace);
    min-height: 1.2em;
}

.pcs-cert-status-neutral {
    color: var(--text-dim, #94a3b8);
}

.pcs-cert-status-good {
    color: var(--accent-2, #38bdf8);
}

.pcs-cert-status-bad {
    color: var(--danger, #fb7185);
}

/* Hidden until a page calls PCSCertificate.show() */
.pcs-cert-wrap[data-pcs-cert-hidden="true"] {
    display: none;
}

/* ---------------- print ---------------- */

@media print {
    body * {
        visibility: hidden;
    }
    .pcs-cert-wrap, .pcs-cert-wrap * {
        visibility: visible;
    }
    .pcs-cert-wrap {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        margin: 0;
    }
    .pcs-cert-wrap .name-field,
    .pcs-cert-wrap .pcs-cert-print-btn {
        display: none;
    }
}
