/* ═══════════════════════════════════════════════════════════════
   ETerminal Product Datasheet & A4 Print Engine Stylesheet
   ═══════════════════════════════════════════════════════════════ */

/* ─── Screen Preview Presentation ──────────────────────────── */
.datasheet-canvas-container {
    background-color: #f1f5f9;
    min-height: 100vh;
    padding: 2rem 1rem 4rem 1rem;
}

.datasheet-a4-page {
    width: 100%;
    max-width: 210mm;
    min-height: 297mm;
    margin: 0 auto 2rem auto;
    background: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 16mm 18mm;
    position: relative;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1e293b;
}

/* Page Break Divider for Multi-page view on screen */
.datasheet-page-break {
    page-break-before: always;
    break-before: page;
}

/* Sticky Screen Action Toolbar */
.datasheet-action-toolbar {
    position: sticky;
    top: 4.5rem;
    z-index: 40;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* ─── Typography & Document Components ─────────────────────── */
.datasheet-doc-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #0f172a;
}

.datasheet-section-title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px solid #0284c7;
    padding-bottom: 0.35rem;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.datasheet-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    line-height: 1.35;
}

.datasheet-table th {
    background-color: #f8fafc;
    color: #334155;
    font-weight: 700;
    text-align: left;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.datasheet-table td {
    padding: 0.45rem 0.65rem;
    border: 1px solid #e2e8f0;
    color: #334155;
}

.datasheet-table tr:nth-child(even) {
    background-color: #f8fafc/50;
}

.tor-badge-pass {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 0.15rem 0.45rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.7rem;
}

.spec-grid-item {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem;
}

/* ─── A4 Exact Print Stylesheet ────────────────────────────── */
@media print {
    @page {
        size: A4 portrait;
        margin: 10mm 12mm 12mm 12mm;
    }

    html, body {
        background: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 11pt !important;
        color: #000000 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Hide Web UI Chrome */
    header, footer, nav, .datasheet-action-toolbar, .site-header, .site-footer, #mobile-menu, .no-print {
        display: none !important;
    }

    .datasheet-canvas-container {
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .datasheet-a4-page {
        max-width: 100% !important;
        width: 100% !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        page-break-after: auto;
    }

    .datasheet-page-break {
        page-break-before: always !important;
        break-before: page !important;
        margin-top: 15mm !important;
    }

    .avoid-page-break, tr, .spec-grid-item, .datasheet-table, .signature-block {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    /* Print Header & Footer Rules */
    .print-header {
        display: block !important;
    }

    .print-footer {
        display: block !important;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
    }

    /* Ensure crisp vector text and borders */
    a {
        text-decoration: none !important;
        color: inherit !important;
    }

    .shadow-sm, .shadow-md, .shadow-lg, .shadow-xl {
        box-shadow: none !important;
    }
}
