/* Print-packet shell — moved verbatim from WorkOrderPrint.razor's inline <style>
   (CSS-unification Phase 1, batch 3). Blazor does not reliably scope inline/.razor.css
   for print-composed components, so this lives as a head-linked global file.
   Generic (non-.print-packet-prefixed) selectors are scoped under .print-packet-container
   to avoid collisions with other head-linked packet CSS files. .no-print stays global
   (app-wide print utility — this is its sole definition). The whole .print-packet-container
   always renders inside [data-force-light] on both mount paths (Print Workstation and the
   Innovint-shell inline preview), so --pp-status-danger pins to #dc2626 here (zero-change). */

.print-packet-container {
    display: block;
}

/* Toast Message */
.print-packet-container .toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1e293b;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Content area: toggle + print packet */
.print-packet-area {
    flex: 1;
    min-width: 0;
}

/* Print Packet rendered as a true-size sheet of paper.
   Content lays out at the true Letter width so column widths / wrapping match the
   PDF, then the whole sheet is scaled down to fit the preview pane via zoom
   (sheet-scale.js sets the --sheet-scale CSS variable inline).
   PORTRAIT: width 816px (8.5in at 96dpi), L/R padding 68px gives 816 - 136 = 680px
   content, which equals the PDF content width. PRESERVE the 680px content width:
   do not change width or L/R padding without re-deriving against the PDF.
   zoom is declared here (not inline) so the @media print reset below wins for
   printing / PDF capture. Landscape overrides width/padding in .landscape-mode. */
.print-packet {
    width: 816px;
    min-height: 1056px;
    margin: 0 auto;
    padding: 58px 68px;
    background: white;
    color: #1f2937;
    color-scheme: light;
    box-sizing: border-box;
    box-shadow: 0 2px 12px rgba(0,0,0,0.18);
    border: 1px solid #d1d5db;
    zoom: var(--sheet-scale, 1);
}

.print-packet-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #9ca3af;
    font-size: 14px;
}

.print-packet-sections {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.print-packet-container .section-wrapper {
    position: relative;
}

/* Hide section X button - appears on hover */
.print-packet-container .section-hide-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.15s ease;
    z-index: 5;
}

.print-packet-container .section-hide-btn svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
}

.print-packet-container .section-wrapper:hover .section-hide-btn {
    opacity: 1;
}

.print-packet-container .section-hide-btn:hover {
    background: #fef2f2;
    border-color: #fca5a5;
}

.print-packet-container .section-hide-btn:hover svg {
    color: var(--pp-status-danger);
}

.print-packet-container .restore-all-btn {
    padding: 2px 10px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.print-packet-container .restore-all-btn:hover {
    background: #d97706;
}

/* Inline placeholder shown in-place of a hidden section */
.print-packet-container .section-hidden-placeholder {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    padding: 10px 14px;
    background: #fffbeb;
    border: 1px dashed #fde68a;
    border-radius: 8px;
    color: #92400e;
}

.print-packet-container .section-hidden-icon {
    width: 18px;
    height: 18px;
    color: #d97706;
    flex-shrink: 0;
}

.print-packet-container .section-hidden-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.print-packet-container .section-hidden-label {
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
}

.print-packet-container .section-hidden-sub {
    font-size: 11px;
    color: #b45309;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.print-packet-container .section-hidden-restore {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    padding: 4px 10px;
    background: white;
    border: 1px solid #fde68a;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: #92400e;
    cursor: pointer;
    transition: all 0.15s ease;
}

.print-packet-container .section-hidden-restore:hover {
    background: #fef3c7;
    border-color: #f59e0b;
}

.print-packet-container .section-hidden-restore svg {
    width: 12px;
    height: 12px;
}

/* All sections hidden state */
.print-packet-container .all-sections-hidden {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: #9ca3af;
    font-size: 14px;
}

.print-packet-container .unknown-section {
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    color: #6b7280;
    font-size: 12px;
    text-align: center;
}

.print-packet-footer {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
}

/* Landscape page for movement sections */
@page landscape-page {
    size: letter landscape;
    margin: 0.25in;
}

/* Landscape sheet = Letter rotated: 1056 x 816 @96dpi.
   LANDSCAPE L/R PADDING IS A STARTING GUESS (68px => 920px content). Playwright's
   Format/Margin likely override @page landscape-page (preferCSSPageSize is off), so
   the actual landscape PDF margins are unconfirmed. VERIFY against a real downloaded
   landscape PDF and adjust this L/R padding so the content widths match. */
.print-packet.landscape-mode {
    page: landscape-page;
    width: 1056px;
    min-height: 816px;
    max-width: none;
    padding: 38px 68px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-packet-container {
        display: block !important;
    }

    .print-packet-area {
        flex: none;
    }

    .print-packet {
        width: auto;
        min-height: 0;
        max-width: none;
        padding: 0;
        margin: 0;
        border: none;
        box-shadow: none;
        background: white;
        zoom: 1;
    }

    .print-packet.landscape-mode {
        width: auto;
        min-height: 0;
        max-width: none;
        padding: 0;
    }

    .print-packet-container .section-wrapper {
        page-break-inside: avoid;
    }

    .print-packet-footer {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 8px 16px;
        background: white;
        border-top: 1px solid #000;
    }
}
