/* Full-screen sheet preview: the on-device view a phone gets instead of a print
   dialog, and the print-sheet styling that renders inside it.
   Extracted from styles.css lines 1744-2031, 34 rules, in their original order.

   CASCADE POSITION: loaded immediately after styles.css and before
   notification-actions.css, which is the only position that preserves what the
   browser saw before.
     - Against the rest of styles.css these rules move LATER. That is safe here
       and only here: no block that currently sits after any of them declares a
       selector any of them declare (checked per rule, not per range), so no
       override changes hands. docs/STYLES-CSS-EXTRACTION-MAP.md has the method.
     - Against notification-actions.css, advanced-drill-board.css and
       runtime-identity.css they stay EARLIER, exactly as before, because all
       three are still linked after this file.
   Five rules interleaved through the original span are NOT here -- the
   .lineup-print-button rules and .shirt-print-swatch stay in styles.css, where
   they were, because they are not part of this unit. */

.sheet-preview-label {
  display: none;
}

@media (max-width: 720px) {
  .sheet-print-label {
    display: none;
  }

  .sheet-preview-label {
    display: inline;
  }
}

.lineup-print-button .sheet-preview-label::before { content: "👁\FE0E"; margin-right: 5px; }

.sheet-preview-overlay {
  position: fixed;
  inset: 0;
  /* Stay above the fixed mobile nav and settings layers (up to 10020). */
  z-index: 10030;
  display: flex;
  flex-direction: column;
  background: rgba(4, 12, 30, 0.92);
}

.sheet-preview-overlay[hidden] {
  display: none;
}

html:has(body.sheet-preview-open),body.sheet-preview-open{overflow:hidden!important}

.sheet-preview-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #061735;
  color: #ffffff;
}

.sheet-preview-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}

.sheet-preview-close {
  border: 0;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.sheet-preview-body {
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.sheet-preview-body .lineup-print-sheet {
  display: block;
  width: 100%;
  max-width: 640px;
  min-height: 0;
  box-sizing: border-box;
  background: #ffffff;
  color: #061735;
  font-family: Arial, Helvetica, sans-serif;
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}

.sheet-preview-body .practice-plan-sheet {
  display: block;
  width: 100%;
  max-width: 640px;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  background: #ffffff;
  color: #111111;
  border-radius: 12px;
  padding: 18px !important;
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45);
}

.sheet-preview-body .practice-plan-sheet table {
  table-layout: fixed;
}

.sheet-preview-body .practice-plan-sheet svg,
.sheet-preview-body .practice-plan-sheet img {
  max-width: 100%;
  height: auto;
}

.sheet-preview-body .lineup-print-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #061735;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.sheet-preview-body .lineup-print-header img {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
}

.sheet-preview-body .lineup-print-header h1 {
  margin: 0;
  font-size: 22px;
}

.sheet-preview-body .lineup-print-header p {
  margin: 2px 0;
  font-weight: 700;
}

.sheet-preview-body .lineup-print-header small {
  color: #33507d;
}

.sheet-preview-body h2 {
  font-size: 14px;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #073763;
}

.sheet-preview-body h3 {
  font-size: 13px;
  margin: 10px 0 6px;
}

.sheet-preview-body .lineup-print-player-grid,
.sheet-preview-body .lineup-print-special-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.sheet-preview-body .lineup-print-special-teams > div {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.sheet-preview-body .lineup-print-player {
  display: flex;
  align-items: baseline;
  gap: 8px;
  border: 1px solid #d3ddef;
  border-radius: 8px;
  padding: 8px 10px;
}

.sheet-preview-body .lineup-print-player span {
  min-width: 22px;
  font-weight: 800;
  color: #073763;
}

.sheet-preview-body .lineup-print-player strong {
  font-size: 14px;
}

.sheet-preview-body .lineup-print-player small {
  margin-left: auto;
  color: #5b6b85;
}

.sheet-preview-body .lineup-print-player.blank {
  opacity: 0.4;
}

.sheet-preview-body .lineup-preview-unit {
  margin: 0 0 10px;
}

.sheet-preview-body .lineup-preview-unit h3 {
  margin: 12px 0 6px;
  font-size: 13px;
  font-weight: 800;
  color: #073763;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.2;
  border-left: 4px solid #1b74e4;
  padding-left: 8px;
}

.sheet-preview-body .lineup-preview-unit .lineup-print-player-grid {
  grid-template-columns: 1fr;
  gap: 6px;
}

.sheet-preview-body .shirt-print-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.sheet-preview-body .lineup-print-footer {
  margin-top: 18px;
  border-top: 1px solid #d3ddef;
  padding-top: 12px;
  display: grid;
  gap: 12px;
}

.sheet-preview-body .lineup-print-coach-list {
  display: grid;
  gap: 2px;
}
