/* draft_cheatsheet_v4.css — printed draft board (see draft_cheatsheet_v4.js)
   Two audiences: the on-screen preview (themed, app modal family) and the
   PAGE (always ink-on-white — a cheat sheet is printed, and a dark-themed
   preview that prints as a black rectangle is the classic failure here). */

#draftCheatSheetModal .dcs-backdrop {
    position: fixed; inset: 0; z-index: 1999;
    background: var(--jt-overlay-bg); backdrop-filter: var(--jt-overlay-blur);
}
#draftCheatSheetModal .dcs-shell {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center; pointer-events: none;
}
#draftCheatSheetModal .dcs-modal {
    pointer-events: auto; display: flex; flex-direction: column;
    background: var(--jt-modal-bg); border: 1px solid var(--jt-modal-border);
    border-radius: 12px; box-shadow: var(--jt-modal-shadow);
    width: min(1000px, 95vw); height: min(860px, 93vh); overflow: hidden;
}
#draftCheatSheetModal .dcs-header {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; flex: none;
    border-bottom: 1px solid var(--jt-border-primary); cursor: grab;
}
#draftCheatSheetModal .dcs-title { font-size: .95rem; font-weight: 800; white-space: nowrap; }
#draftCheatSheetModal .dcs-league {
    font-size: .7rem; color: var(--jt-text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#draftCheatSheetModal .dcs-spacer { flex: 1; }
#draftCheatSheetModal .dcs-close {
    width: 26px; height: 26px; border: none; background: transparent;
    color: var(--jt-text-secondary); font-size: 1rem; cursor: pointer; border-radius: 6px;
}
#draftCheatSheetModal .dcs-close:hover { background: var(--jt-bg-hover); color: var(--jt-text-primary); }
[data-theme="light"] #draftCheatSheetModal .dcs-header .ra-btn,
[data-theme="light"] #draftCheatSheetModal .dcs-header .jt-mp-minimize-btn {
    background: var(--jt-bg-tertiary); color: var(--jt-text-secondary);
    border-color: var(--jt-border-primary);
}

/* ── controls ── */
#draftCheatSheetModal .dcs-ctrl,
#draftCheatSheetModal .dcs-posbar {
    display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
    padding: 8px 14px; flex: none; border-bottom: 1px solid var(--jt-border-primary);
}
#draftCheatSheetModal .dcs-posbar { background: var(--jt-bg-secondary); padding: 6px 14px; }
#draftCheatSheetModal .dcs-lbl {
    font-size: .62rem; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; color: var(--jt-text-muted);
}
#draftCheatSheetModal .dcs-sep { width: 1px; height: 18px; background: var(--jt-border-primary); }
#draftCheatSheetModal .dcs-auto {
    font-size: .62rem; font-weight: 700; color: var(--jt-accent-amber-text);
}
#draftCheatSheetModal .dcs-seg { display: inline-flex; border-radius: 6px; overflow: hidden; }
#draftCheatSheetModal .dcs-seg button,
#draftCheatSheetModal .dcs-ctrl select,
#draftCheatSheetModal .dcs-pchip {
    background: var(--jt-bg-tertiary); color: var(--jt-text-secondary);
    border: 1px solid var(--jt-border-secondary);
    padding: 3px 9px; font-size: .7rem; font-weight: 600; cursor: pointer;
}
#draftCheatSheetModal .dcs-seg button { border-radius: 0; border-right-width: 0; }
#draftCheatSheetModal .dcs-seg button:last-child { border-right-width: 1px; }
#draftCheatSheetModal .dcs-seg button.on {
    background: var(--jt-accent-purple); border-color: var(--jt-accent-purple); color: #fff;
}
#draftCheatSheetModal .dcs-ctrl select { border-radius: 6px; }
#draftCheatSheetModal .dcs-pchip { border-radius: 5px; font-size: .66rem; padding: 2px 8px; }
#draftCheatSheetModal .dcs-pchip.on {
    background: var(--jt-accent-blue); border-color: var(--jt-accent-blue); color: #fff;
}
#draftCheatSheetModal .dcs-chk {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .68rem; color: var(--jt-text-secondary); cursor: pointer;
}

/* ── the page ──
   Deliberately NOT themed. This is a preview of paper; it stays ink-on-white in
   both themes so what the user sees is what comes out of the printer. */
#draftCheatSheetModal .dcs-body {
    flex: 1; overflow-y: auto; padding: 16px;
    background: var(--jt-bg-deep);
}
#draftCheatSheetModal .dcs-page {
    background: #fff; color: #111; border-radius: 4px;
    padding: 22px 24px 24px; margin: 0 auto; max-width: 820px;
    font: 10px/1.35 system-ui, -apple-system, sans-serif;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .35);
}
#draftCheatSheetModal .dcs-page-head {
    display: flex; align-items: flex-end; gap: 12px;
    border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 4px;
}
#draftCheatSheetModal .dcs-page-head h4 { font-size: 16px; margin: 0; }
#draftCheatSheetModal .dcs-meta {
    margin-left: auto; text-align: right; font-size: 9px; color: #4b5563; line-height: 1.45;
}
#draftCheatSheetModal .dcs-prov { font-size: 9px; color: #4b5563; margin-bottom: 12px; }
#draftCheatSheetModal .dcs-prov b { color: #111; }

/* Printed on the page on purpose: if the board goes to paper without values,
   the paper should say so too. */
#draftCheatSheetModal .dcs-warn {
    margin: 0 0 10px; padding: 6px 9px; font-size: 9.5px;
    background: #fef3c7; color: #92400e;
    border-left: 3px solid #b45309; border-radius: 3px;
}
#draftCheatSheetModal .dcs-cols { column-count: 3; column-gap: 18px; }
#draftCheatSheetModal .dcs-cols--flat { column-count: 2; }
#draftCheatSheetModal .dcs-block { break-inside: avoid; margin-bottom: 11px; }
#draftCheatSheetModal .dcs-block h5 {
    font-size: 11px; margin: 0 0 3px; text-transform: uppercase; letter-spacing: .06em;
    border-bottom: 1.5px solid #111; padding-bottom: 2px; display: flex;
}
#draftCheatSheetModal .dcs-block h5 .ct { margin-left: auto; font-weight: 500; color: #6b7280; letter-spacing: 0; }

/* break-after on the label so a tier rule never orphans at a column foot */
#draftCheatSheetModal .dcs-tier {
    font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
    color: #6b7280; background: #f3f4f6; padding: 1px 4px; margin: 4px 0 2px;
    border-left: 2px solid #9ca3af; break-after: avoid;
}
#draftCheatSheetModal .dcs-pr {
    display: flex; align-items: baseline; gap: 4px; padding: 1.5px 0;
    border-bottom: 1px dotted #e5e7eb; break-inside: avoid;
}
#draftCheatSheetModal .dcs-bx {
    width: 8px; height: 8px; border: 1px solid #6b7280; border-radius: 1px; flex-shrink: 0;
}
#draftCheatSheetModal .dcs-rk {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8.5px; color: #6b7280; min-width: 15px; text-align: right;
}
#draftCheatSheetModal .dcs-nm {
    font-weight: 600; font-size: 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#draftCheatSheetModal .dcs-tm,
#draftCheatSheetModal .dcs-by { font-size: 8px; color: #6b7280; white-space: nowrap; }
#draftCheatSheetModal .dcs-val {
    margin-left: auto; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 8.5px; color: #374151; white-space: nowrap;
}
/* auction: suggested, then the user's own max in italic beside it */
#draftCheatSheetModal .dcs-val i { font-style: italic; color: #111; margin-left: 4px; }

/* Off the board prints STRUCK, not omitted — a board that silently drops
   rostered players can't be trusted when a keeper gets cut mid-draft. */
#draftCheatSheetModal .dcs-off .dcs-nm {
    color: #9ca3af; text-decoration: line-through; font-style: italic;
}
#draftCheatSheetModal .dcs-off .dcs-bx { border-color: #d1d5db; background: #f3f4f6; }
#draftCheatSheetModal .dcs-off .dcs-tm,
#draftCheatSheetModal .dcs-off .dcs-by,
#draftCheatSheetModal .dcs-off .dcs-val { color: #9ca3af; }

#draftCheatSheetModal .dcs-foot {
    margin-top: 10px; border-top: 1px solid #d1d5db; padding-top: 5px;
    font-size: 8px; color: #6b7280; display: flex;
}
#draftCheatSheetModal .dcs-foot .r { margin-left: auto; }
#draftCheatSheetModal .dcs-empty {
    padding: 30px; text-align: center; color: #6b7280; font-size: 12px;
}

/* ── print ──
   ReportActions' Print is window.print() over the report's own @media print
   CSS — no dynamic stylesheet injection. Everything except the page itself is
   chrome and goes away; the page unwraps to fill the sheet. */
@media print {
    body > *:not(#draftCheatSheetModal) { display: none !important; }
    #draftCheatSheetModal .dcs-backdrop,
    #draftCheatSheetModal .dcs-header,
    #draftCheatSheetModal .dcs-ctrl,
    #draftCheatSheetModal .dcs-posbar { display: none !important; }
    #draftCheatSheetModal .dcs-shell,
    #draftCheatSheetModal .dcs-modal,
    #draftCheatSheetModal .dcs-body {
        position: static !important; inset: auto !important;
        width: auto !important; height: auto !important; max-width: none !important;
        overflow: visible !important; border: 0 !important; box-shadow: none !important;
        background: #fff !important; padding: 0 !important; display: block !important;
    }
    #draftCheatSheetModal .dcs-page {
        box-shadow: none !important; border-radius: 0 !important;
        max-width: none !important; padding: 0 !important; font-size: 9.5px;
    }
    /* Position blocks and tier rules must survive the page break, not just the
       column break — a tier header alone at the foot of page 1 is the bug. */
    #draftCheatSheetModal .dcs-block { break-inside: avoid; page-break-inside: avoid; }
    #draftCheatSheetModal .dcs-tier  { break-after: avoid; page-break-after: avoid; }
    #draftCheatSheetModal .dcs-pr    { break-inside: avoid; page-break-inside: avoid; }
    @page { margin: 12mm 10mm; }
}
