/* ═══════════════════════════════════════════════════════════════════════
   HOT BOARDS — print-defense.css  v1
   11×17 landscape — Defense Print Board
   
   Font system (matches offense):
     Numbers + Names: Barlow Condensed 900
     Bio/Stats: Barlow Condensed 700
     Notes: Barlow 500, 11px
     Names: ALL CAPS, stacked (first on top, last below, same size)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── PAGE CONTAINER ── */
.pbd-page {
  background: #fff; color: #111;
  width: 1632px; height: 1056px;
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 1fr;
  overflow: hidden; box-sizing: border-box;
  border: 2px solid #1a1a1a; border-radius: 4px;
  font-family: 'Barlow Condensed', 'Barlow', Helvetica, Arial, sans-serif;
  font-size: 10px; line-height: 1.35;
  margin-bottom: 14px;
}
.pbd-empty { padding: 40px; text-align: center; color: #999; font-size: 14px; }

/* ── Controls (screen only) ── */
.pbd-controls { display: flex; gap: 8px; margin-bottom: 10px; }
.pbd-ctrl-btn { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; padding: 6px 14px; border-radius: 5px; border: 1px solid var(--b2, #333); background: var(--s2, #181c26); color: var(--t2, #8895aa); cursor: pointer; }
.pbd-ctrl-btn:hover { border-color: var(--red, #e8341a); color: var(--t1, #f0f2f6); }
.pbd-ctrl-btn:focus-visible { outline: 2px solid var(--red, #e8341a); outline-offset: 2px; }
.pbd-print-btn { background: var(--red, #e8341a); color: #fff; border-color: transparent; }
/* Red-filled primary CTA: own hover so it doesn't inherit the secondary
   .pbd-ctrl-btn:hover (which swaps border/text on an already-filled button). */
.pbd-print-btn:hover { filter: brightness(1.07); border-color: transparent; color: #fff; }

/* ── LEFT COLUMN ── */
.pbd-left {
  border-right: 2px solid #1a1a1a;
  padding: 8px 10px;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pbd-team-hdr { border-left: 4px solid #888; padding: 4px 8px; margin-bottom: 6px; }
.pbd-team-name { font-size: 15px; font-weight: 900; letter-spacing: 1px; }
.pbd-team-sub { font-size: 9px; font-weight: 700; color: #999; letter-spacing: 2px; text-transform: uppercase; }
.pbd-section-title { font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; color: #333; border-bottom: 1px solid #1a1a1a; padding-bottom: 2px; margin-bottom: 4px; }
.pbd-ta {
  flex: 1; width: 100%; border: 1px solid #ccc; border-radius: 3px;
  padding: 4px 5px; font-family: 'Barlow', sans-serif;
  font-size: 11px; font-weight: 500; line-height: 1.45;
  color: #222; resize: none; outline: none;
}
.pbd-ta:focus { border-color: #e8341a; }
.pbd-ta-sm { max-height: 30%; }

/* PR area in sidebar */
.pbd-pr-area { flex-shrink: 0; margin-bottom: 4px; }
.pbd-pr-area .pbd-box { width: 100%; }

/* ── MAIN GRID — 6 columns, flex rows ── */
.pbd-grid {
  padding: 3px 5px;
  display: flex; flex-direction: column;
  overflow: hidden;
  height: 100%;
}
.pbd-hdrs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 1px; flex-shrink: 0; }
.pbd-hdrs span { text-align: center; font-size: 11px; font-weight: 600; color: #aaa; text-transform: uppercase; letter-spacing: 1px; }

/* Rows — flex proportional */
.pbd-row {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 3px; margin-bottom: 2px;
  min-height: 0;
}
.pbd-row-big  { flex: 4; }
.pbd-row-med  { flex: 2; }
.pbd-row-sm   { flex: 1.2; }
.pbd-row-flex { flex: 1; }

/* ═══════════════════════════════════════════════════════════════════════
   BOXES
   ═══════════════════════════════════════════════════════════════════════ */
.pbd-box {
  border: 1.5px solid #bbb; border-radius: 3px;
  padding: 4px 5px; overflow: hidden;
  cursor: grab; user-select: none; background: #fff;
  display: flex; flex-direction: column;
  box-sizing: border-box;
}
.pbd-box:hover { border-color: #666; }
.pbd-big  { border-width: 2px; border-color: #888; }

/* Empty */
.pbd-box.pbd-empty-slot { border-style: dashed; border-color: #ddd; background: transparent; cursor: default; align-items: center; justify-content: center; }
.pbd-lbl { color: #ccc; font-size: 10px; font-weight: 700; letter-spacing: 1px; }

/* Drag */
.pbd-dragging { opacity: 0.2; border-color: #e8341a; }
.pbd-dragover { border-color: #f0c040 !important; border-style: dashed !important; background: rgba(240,192,64,.06); }

/* ═══════════════════════════════════════════════════════════════════════
   CARD CONTENT
   ═══════════════════════════════════════════════════════════════════════ */

.pbd-r1 { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 2px; flex-shrink: 0; }

/* ── Jersey Number — Barlow Condensed 900 ── */
.pbd-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; flex-shrink: 0; line-height: 1;
}
.pbd-big .pbd-num { font-size: 42px; min-width: 54px; height: 52px; }
.pbd-med .pbd-num { font-size: 32px; min-width: 44px; height: 40px; }
.pbd-sm .pbd-num  { font-size: 20px; min-width: 30px; height: 26px; }

/* ── Name container ── */
.pbd-id { flex: 1; min-width: 0; overflow: hidden; }

/* ── First name ── */
.pbd-first {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; color: #333; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-transform: uppercase;
}
.pbd-big .pbd-first  { font-size: 20px; }
.pbd-med .pbd-first  { font-size: 16px; }
.pbd-sm .pbd-first   { font-size: 12px; }

/* ── Last name ── */
.pbd-last {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; color: #000; letter-spacing: 0.5px; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-transform: uppercase;
}
.pbd-big .pbd-last  { font-size: 20px; }
.pbd-med .pbd-last  { font-size: 16px; }
.pbd-sm .pbd-last   { font-size: 12px; }

/* ── Position tag ── */
.pbd-pos {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9px; font-weight: 800; color: #999;
  flex-shrink: 0; margin-top: 2px;
}

/* ── Pronunciation ── */
.pbd-ph { font-family: 'Barlow', sans-serif; font-size: 9px; color: #999; font-style: italic; }

/* ── Bio line ── */
.pbd-bio {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10.5px; font-weight: 500; color: #666;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex-shrink: 0;
}

/* ── Draft line ── */
.pbd-draft {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10px; font-weight: 600; color: #888;
  flex-shrink: 0;
}

/* ── Injury flag ── */
.pbd-inj-flag {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 9.5px; color: #c33; font-weight: 700;
  margin-top: 1px; flex-shrink: 0;
}

/* ── Badges ── */
.pbd-badges { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 1px; flex-shrink: 0; }
.pbd-bg {
  display: inline-block; padding: 1px 4px; border-radius: 2px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 7.5px; font-weight: 800; letter-spacing: .3px;
  text-transform: uppercase; line-height: 1.4;
}
.pbd-bg.b-r1{background:#fff3d0;color:#9a7000}
.pbd-bg.b-dr{background:#fff8e0;color:#a08020}
.pbd-bg.b-rk{background:#e0f5ea;color:#1a7a42}
.pbd-bg.b-pb{background:#e0edff;color:#2060b0}
.pbd-bg.b-ap{background:#ece0ff;color:#6030b0}
.pbd-bg.b-cap{background:#ffe0dd;color:#b02010}
.pbd-bg.b-dc{background:#e0edff;color:#2060b0}
.pbd-bg.b-inj{background:#ffe8e0;color:#c03020}

/* ── Stat line ── */
.pbd-stat {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 10.5px; font-weight: 700; color: #222;
  background: #f0f0f0; border-radius: 2px;
  padding: 2px 6px; margin-top: 2px; letter-spacing: .2px;
  flex-shrink: 0;
}

/* ── Notes — Barlow 500, 11px ── */
.pbd-notes {
  margin-top: 3px; padding-top: 3px;
  border-top: 1px solid #e0e0e0;
  flex: 1; overflow: hidden; min-height: 0;
}
.pbd-nl {
  font-family: 'Barlow', sans-serif;
  font-size: 11px; font-weight: 500;
  color: #333; line-height: 1.45;
}

/* ═══════════════════════════════════════════════════════════════════════
   PRINT MEDIA — 11×17 landscape
   ═══════════════════════════════════════════════════════════════════════ */
@media print {
  /* Explicit 17x11 (tabloid landscape); NO `landscape` keyword -- that combo is
     invalid CSS and gets dropped, defaulting the printer to Letter. */
  @page { size: 17in 11in; margin: 0.15in; }

  * { box-sizing: border-box !important; }

  /* Hide everything except print view */
  .pbd-controls { display: none !important; }

  .pbd-page {
    border: none !important; border-radius: 0 !important;
    margin: 0 !important; padding: 0 !important;
    width: 16.7in !important;
    height: 10.7in !important;
    max-height: 10.7in !important;
    overflow: hidden !important;
    break-after: avoid !important;
    page-break-after: avoid !important;
  }

  /* Prevent extra pages */
  .pbd-page ~ * { display: none !important; }

  .pbd-box { break-inside: avoid; cursor: default !important; }
  .pbd-box.pbd-empty-slot { border: none !important; }
  .pbd-ta { border: none !important; padding: 0 !important; }
  .pbd-page { break-before: page; page-break-before: always; }
  /* Color preservation */
  .pbd-num, .pbd-stat, .pbd-bg, .pbd-team-hdr,
  .pbd-inj-flag {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
}
