/* ======================================================================
 *  电子产品使用协议 /tool/screen-contract
 *  依赖 calc-common.css，支持黑夜模式与打印。
 * ====================================================================== */

.sc-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}
.sc-checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--c-text-sub);
    cursor: pointer;
    padding: 5px 0;
}
.sc-checks input { width: 16px; height: 16px; accent-color: #06b6d4; cursor: pointer; }
.sc-textarea {
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    background: var(--c-surface-soft);
    color: var(--c-text);
    font-family: inherit;
    font-size: 13px;
    line-height: 1.7;
    padding: 10px 13px;
    resize: vertical;
    outline: none;
    transition: border-color 0.15s;
}
.sc-textarea:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-soft); }

/* ---------- 预览纸 ---------- */
.sc-preview-card { display: flex; flex-direction: column; }
.sc-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}
.sc-detail-tag {
    font-size: 12.5px;
    font-weight: 800;
    color: #0891b2;
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.28);
    padding: 4px 11px;
    border-radius: 99px;
}
.sc-print-btn { height: 36px; padding: 0 16px; font-size: 13px; flex: none; }

.sc-paper {
    flex: 1;
    background: #fff;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 22px 20px;
    color: #1f2937;
    max-height: 620px;
    overflow-y: auto;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.sc-paper-title { font-size: 18px; font-weight: 900; text-align: center; margin: 0 0 10px; color: #0e7490; }
.sc-paper-lead { font-size: 12.5px; line-height: 1.85; color: #4b5563; margin: 0 0 12px; }
.sc-paper-parties { font-size: 12.5px; line-height: 1.9; margin: 0 0 12px; padding: 9px 12px; background: #f0f9ff; border-radius: 8px; }
.sc-paper h2 { font-size: 13.5px; font-weight: 800; color: #0e7490; margin: 14px 0 5px; }
.sc-paper p { font-size: 12.5px; line-height: 1.9; color: #374151; margin: 0; }
.sc-paper ul, .sc-paper ol { margin: 4px 0 0; padding-left: 20px; }
.sc-paper li { font-size: 12.5px; line-height: 1.9; color: #374151; }
.sc-paper-sign {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1.5px dashed #cbd5e1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 14px;
}
.sc-paper-sign p { font-size: 12.5px; }
.sc-paper-sign p:last-child { grid-column: 1 / -1; }

/* ---------- 屏幕上隐藏打印区 ---------- */
#scPrintArea { display: none; }

/* ---------- 打印 ---------- */
@media print {
    body * { visibility: hidden !important; }
    #scPrintArea, #scPrintArea * { visibility: visible !important; }
    #scPrintArea {
        display: block !important;
        position: absolute;
        left: 0; top: 0;
        width: 100%;
        padding: 14mm 15mm;
        background: #fff;
    }
    #scPrintArea .sc-paper {
        border: none;
        max-height: none;
        overflow: visible;
        padding: 0;
    }
    #scPrintArea .sc-paper-title { font-size: 20pt; }
    #scPrintArea .sc-paper h2 { font-size: 13pt; }
    #scPrintArea .sc-paper p,
    #scPrintArea .sc-paper li,
    #scPrintArea .sc-paper-sign p { font-size: 11pt; }
    @page { size: A4; margin: 0; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
    .sc-paper { max-height: none; }
    .sc-paper-sign { grid-template-columns: 1fr; }
}

/* ---------- 黑夜模式（纸张本身保持白底黑字） ---------- */
[data-theme="dark"] .sc-checks label { color: var(--c-text-sub); }
[data-theme="dark"] .sc-textarea { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .sc-detail-tag { background: rgba(6,182,212,0.15); border-color: rgba(6,182,212,0.4); color: #67e8f9; }
