/* The "Signed by:" frame and the clinician's completed-document view.
 *
 * Loaded by app.html (the clinician's view of a signed document) and
 * client-portal.html (the client's certificate). The frame rules and the four
 * self-hosted signature faces are the same ones the guided signing screen uses
 * while signing (app.html, GUIDED SIGNING CSS); scripts/signature-frame.test.js
 * checks the two stay identical. Fonts and licences: public/assets/fonts/.
 */

@font-face {
    font-family: "Mrs Saint Delafield";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/assets/fonts/mrs-saint-delafield-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Herr Von Muellerhoff";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/assets/fonts/herr-von-muellerhoff-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "La Belle Aurore";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/assets/fonts/la-belle-aurore-latin-400-normal.woff2") format("woff2");
}

@font-face {
    font-family: "Homemade Apple";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("/public/assets/fonts/homemade-apple-latin-400-normal.woff2") format("woff2");
}

.gs-style-mrs-saint-delafield { font-family: "Mrs Saint Delafield", cursive; font-size: 46px; line-height: 1.1; }

.gs-style-herr-von-muellerhoff { font-family: "Herr Von Muellerhoff", cursive; font-size: 48px; line-height: 1.1; }

.gs-style-la-belle-aurore { font-family: "La Belle Aurore", cursive; font-size: 28px; line-height: 1.3; }

.gs-style-homemade-apple { font-family: "Homemade Apple", cursive; font-size: 22px; line-height: 1.5; }

.gs-signed {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    box-sizing: border-box;
    max-width: 100%;
    padding: 0 18px 6px 16px;
    color: #1B1F23;
}

.gs-signed::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 0;
    left: 0;
    width: 30px;
    border: 1.5px solid #8A8F94;
    border-right: none;
    border-bottom: none;
}

.gs-signed-label {
    margin: 0 0 4px 20px;
    white-space: nowrap;
    font-size: 10px;
    line-height: 12px;
    color: #6B7075;
}

.gs-signed-sig {
    color: #1B1F23;
    overflow-wrap: anywhere;
}

.gs-signed-img {
    display: block;
    max-width: 240px;
    max-height: 64px;
    width: auto;
    height: auto;
}

.gs-signed-ref {
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
    font-size: 10.5px;
    line-height: 1.3;
    letter-spacing: 0.04em;
    color: #6B7075;
}

.gs-signed-time {
    font-size: 10px;
    line-height: 1.3;
    color: #6B7075;
}

.gs-signed-initial {
    padding: 0 14px 4px 14px;
}

.gs-signed-initial .gs-signed-sig {
    font-size: 30px;
}

.gs-signed-initial .gs-signed-img {
    max-width: 96px;
    max-height: 36px;
}

/* ---- The clinician's view of a completed document (app.html viewCompletedDocument) ---- */

#viewDocModal.vcd-scrim {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    overflow-y: auto;
    background: rgba(27, 31, 35, 0.5);
}

.vcd-card {
    box-sizing: border-box;
    max-width: 800px;
    max-height: 90vh;
    margin: 50px auto;
    padding: 30px;
    overflow-y: auto;
    border-radius: 12px;
    background: #FFFFFF;
    color: #2B2F33;
    font-family: var(--font-sans, Inter, system-ui, sans-serif);
}

.vcd-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.vcd-title {
    margin: 0;
    font-size: 22px;
}

.vcd-x {
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: none;
    font-size: 24px;
    cursor: pointer;
}

.vcd-facts {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    background: #F7F3EC;
}

.vcd-facts p {
    margin: 4px 0;
}

.vcd-h3 {
    margin: 24px 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #486141;
    font-size: 17px;
}

.vcd-answer {
    padding: 12px 0;
    border-bottom: 1px solid #ECE8E0;
}

.vcd-answer-key {
    color: #6B7075;
    font-weight: 600;
}

.vcd-answer-value {
    margin: 5px 0 0 0;
    overflow-wrap: anywhere;
}

.vcd-empty {
    color: #6B7075;
    font-style: italic;
}

.vcd-sign {
    margin-top: 16px;
    padding: 16px 20px;
    border: 1px solid #D9D4C9;
    border-radius: 8px;
    background: #FFFFFF;
}

.vcd-sign-note {
    margin-top: 10px;
    font-size: 12px;
    color: #6B7075;
}

.vcd-cert {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid #D9D4C9;
    border-radius: 12px;
    background: #F7F3EC;
}

.vcd-cert-title {
    margin: 0 0 16px 0;
    text-align: center;
    font-size: 18px;
}

.vcd-cert-row {
    margin-bottom: 14px;
}

.vcd-cert-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #6B7075;
}

.vcd-cert-value {
    display: block;
    overflow-wrap: anywhere;
}

.vcd-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.vcd-foot {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #D9D4C9;
    text-align: center;
    font-size: 12px;
    color: #6B7075;
}

.vcd-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 28px;
}

@media (max-width: 768px) {
    .vcd-card {
        margin: 0;
        max-height: none;
        min-height: 100%;
        border-radius: 0;
        padding: 20px 16px;
    }
}
