/* Shared UI primitives used across scorer + public scoresheet */

@font-face{
  font-family:"Inter";
  src:url("../fonts/InterVariable.woff2") format("woff2");
  font-weight:100 900;
  font-style:normal;
  font-display:swap;
}

:root{
  --sls-font:var(--sls-theme-font, "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  --sls-text-xs:11px;
  --sls-text-small:12px;
  --sls-text-regular:14px;
  --sls-text-h1:28px;
  --sls-text-h2:22px;
  --sls-text-h3:16px;
  --sls-text-section:15px;
  --sls-text-score:clamp(30px,5vw,56px);
  --sls-text-score-compact:clamp(24px,4vw,40px);
  --sls-type-xs:var(--sls-text-xs);
  --sls-type-sm:var(--sls-text-small);
  --sls-type-base:var(--sls-text-regular);
  --sls-type-md:var(--sls-text-h3);
  --sls-type-lg:var(--sls-text-section);
  --sls-weight-label:600;
  --sls-bg:#f3f6f8;
  --sls-surface:#ffffff;
  --sls-surface-soft:#f8fafc;
  --sls-border:#d9e2ea;
  --sls-border-strong:#b7c5d1;
  --sls-text:#111827;
  --sls-muted:#5f6f7f;
  --sls-brand:var(--sls-theme-accent, #12613a);
  --sls-brand-strong:var(--sls-theme-ink, #0b4d2c);
  --sls-action:#2563a9;
  --sls-action-strong:#174f8c;
  --sls-success:#16803a;
  --sls-warning:#b7791f;
  --sls-danger:#b42318;
  --sls-info:#0e7490;
  --sls-purple:#6d28d9;
  --sls-neutral:#64748b;
  --sls-focus:rgba(37,99,169,.25);
  --sls-radius:0;
  --sls-shadow:0 2px 7px rgba(15,23,42,.16);
  --sls-shadow-soft:0 2px 7px rgba(15,23,42,.16);
  --sls-header-bg:var(--sls-brand);
  --sls-header-fg:#fff;
  --sls-border:rgba(15,23,42,.12);
  --sls-header-border:rgba(255,255,255,.18);
}

.sls-text-regular{font-size:var(--sls-text-regular);font-weight:400;line-height:1.45;}
.sls-heading-1{font-size:var(--sls-text-h1);font-weight:700;line-height:1.12;}
.sls-heading-2{font-size:var(--sls-text-h2);font-weight:700;line-height:1.16;}
.sls-heading-3{font-size:var(--sls-text-h3);font-weight:700;line-height:1.22;}
.sls-section-title{font-size:var(--sls-text-section);font-weight:700;line-height:1.25;}
.sls-score-text{font-size:var(--sls-text-score);font-weight:700;line-height:1;font-variant-numeric:tabular-nums;}

.sls-ge-scorer-body,
.sls-public-scoresheet-body{
  background:var(--sls-bg);
  color:var(--sls-text);
  font-family:var(--sls-font);
}

.sls-ge-scorer-body *,
.sls-public-scoresheet-body *,
.sls-admin-wrap *,
.sls-lineup-box *,
.sls-player-dialog *{
  box-sizing:border-box;
}

.sls-ge-ui-label{
  color:var(--sls-muted);
  font-size:var(--sls-type-xs);
  font-weight:var(--sls-weight-label);
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:0;
}

.sls-ge-ui-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:26px;
  padding:4px 9px;
  border:1px solid var(--sls-border);
  border-radius:var(--sls-radius);
  background:var(--sls-surface-soft);
  color:var(--sls-text);
  font-size:var(--sls-type-sm);
  font-weight:800;
  line-height:1.15;
}

.sls-ge-ui-panel{
  border:1px solid var(--sls-border);
  border-radius:var(--sls-radius);
  background:var(--sls-surface-soft);
}

.sls-ge-ui-heading{
  margin:0 0 10px;
  color:var(--sls-text);
  font-size:var(--sls-type-base);
  font-weight:900;
  line-height:1.2;
  text-transform:uppercase;
  letter-spacing:0;
}

.sls-public-scoresheet-wrap{
  box-sizing:border-box;
  width:100%;
  max-width:1600px;
  margin:0 auto;
  padding:12px;
}

.sls-public-live-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px 0;
  padding:10px 12px;
  background:var(--sls-surface);
  border:1px solid var(--sls-border);
  border-radius:var(--sls-radius);
  box-shadow:var(--sls-shadow-soft);
  border-top:8px solid var(--sls-brand);
}

.sls-public-live-title{font-size:18px;font-weight:900;line-height:1.2;}
.sls-public-live-sub{font-size:12px;color:var(--sls-muted);font-weight:700;}

@media (max-width:700px){
  .sls-public-scoresheet-wrap{padding:8px;}
  .sls-public-live-header{align-items:flex-start;flex-direction:column;}
  .sls-public-live-title{font-size:16px;}
}

@media print{
  html,body{background:#fff;}
  .sls-public-scoresheet-wrap{max-width:none;padding:0;}
  .sls-public-live-header{display:none;}
}

.sls-ge-card{
  box-sizing:border-box;
  background:var(--sls-surface);
  border:1px solid var(--sls-border);
  border-radius:var(--sls-radius);
  padding:12px;
  box-shadow:var(--sls-shadow-soft);
}

.sls-ge-accent,
.sls-ge-card--accent,
.sls-ge-ss__panel,
.sls-live-game__panel{
  border-top:8px solid var(--sls-accent, var(--sls-neutral));
}

.sls-ge-accent--brand{--sls-accent:var(--sls-brand);}
.sls-ge-accent--action{--sls-accent:var(--sls-action);}
.sls-ge-accent--success{--sls-accent:var(--sls-success);}
.sls-ge-accent--warning{--sls-accent:var(--sls-warning);}
.sls-ge-accent--danger{--sls-accent:var(--sls-danger);}
.sls-ge-accent--info{--sls-accent:var(--sls-info);}
.sls-ge-accent--purple{--sls-accent:var(--sls-purple);}
.sls-ge-accent--neutral{--sls-accent:var(--sls-neutral);}

.sls-ge-card--flush{
  padding:0;
  overflow:hidden;
}

.sls-ge-card--flush.sls-ge-card--accent,
.sls-ge-card--flush.sls-ge-accent,
.sls-ge-ss__panel--linescore,
.sls-live-game__panel--linescore{
  border-top-width:8px;
}

/* Linescore table (shared). */
.sls-ge-linescore-table{
  border-collapse:collapse;
  width:100%;
  font-family:inherit;
  font-size:14px;
  table-layout:fixed;
  margin:0;
}

.sls-ge-linescore-scroll{
  width:100%;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
}

.sls-ge-linescore-table th{
  background:var(--sls-brand, #12613a) !important;
  color:#fff !important;
  font-weight:900;
}

.sls-ge-linescore-table th,
.sls-ge-linescore-table td{
  padding:10px 6px;
  border-bottom:1px solid rgba(15,23,42,.08);
  text-align:center;
  vertical-align:middle;
  line-height:1.25;
  height:40px;
}

.sls-ge-linescore-table td{ background:#fff; }

.sls-ge-linescore-table th:first-child,
.sls-ge-linescore-table td:first-child{
  text-align:left;
  width:23%;
}

.sls-ge-linescore-table td:first-child{ font-weight:900; }

.sls-ge-linescore-table th:not(:first-child),
.sls-ge-linescore-table td:not(:first-child){ width:7%; }
.sls-ge-linescore-table td:not(:first-child){ font-variant-numeric:tabular-nums; }
.sls-ge-linescore-table .sls-ge-linescore-total{ font-weight:900; }

/* Ensure no extra spacing inside the flush card. */
.ge-linescore{ margin:0; padding:0; }
.sls-ge-card--flush .ge-linescore table{ margin:0; }

/* Game status module (shared between scorer, live game pages and shortcodes). */
.sls-ge-game-status-v2{
  --sls-accent:var(--sls-brand, #12613a);
  width:100%;
  max-width:100%;
  overflow:hidden;
  container-type:inline-size;
}

.sls-ge-game-status-v2 .sls-ge-game-status-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 8px;
  padding:0;
}

.sls-ge-game-status-v2 .sls-ge-game-status-head h3{
  margin:0;
}

.sls-ge-game-status-v2 .sls-ge-status-scorer{
  display:inline-flex;
  align-items:center;
  color:var(--sls-muted, #5d6b7d);
  font-size:12px;
  font-weight:700;
  line-height:1.2;
  margin:0;
  padding:0;
  text-align:right;
  white-space:nowrap;
}

.sls-ge-game-status-v2 .sls-ge-status-cells{
  display:grid;
  grid-template-columns:minmax(190px,1.7fr) repeat(3,minmax(92px,1fr));
  grid-template-rows:repeat(2,minmax(82px,1fr));
  gap:9px;
  align-items:stretch;
  min-width:0;
}

.sls-ge-game-status-v2 .sls-ge-status-cell{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  align-items:stretch;
  justify-items:center;
  min-height:82px;
  padding:9px 8px;
  border:1px solid #dfe3e8;
  background:#fff;
  text-align:center;
  min-width:0;
  overflow:hidden;
}

.sls-ge-game-status-v2 .sls-ge-status-cell--bases{
  grid-row:1 / span 2;
  min-height:176px;
}

.sls-ge-game-status-v2 .sls-ge-status-label{
  display:block;
  margin-bottom:4px;
  color:#111;
  font-size:12px;
  font-weight:700;
  line-height:1;
  justify-self:start;
  align-self:start;
  text-align:left;
}

.sls-ge-game-status-v2 .sls-ge-status-cell > :not(.sls-ge-status-label){
  align-self:center;
  justify-self:center;
}

.sls-ge-game-status-v2 .sls-ge-inning-lockup{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  color:#111;
  font-size:22px;
  line-height:1;
  font-weight:800;
}

.sls-ge-game-status-v2 .sls-ge-inning-arrow{
  width:0;
  height:0;
  border-left:7px solid transparent;
  border-right:7px solid transparent;
}

.sls-ge-game-status-v2 .sls-ge-inning-arrow.is-top{ border-bottom:12px solid #139447; }
.sls-ge-game-status-v2 .sls-ge-inning-arrow.is-bottom{ border-top:12px solid var(--sls-danger, #b42318); }

.sls-ge-game-status-v2 .sls-ge-team-logo-slot{
  display:flex;
  align-items:center;
  justify-content:center;
  width:48px;
  height:48px;
  overflow:hidden;
}

.sls-ge-game-status-v2 .sls-ge-team-logo-slot img{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
}

.sls-ge-game-status-v2 .ge-batting-initials,
.sls-ge-game-status-v2 .ge-fielding-initials{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  height:100%;
  font-size:15px;
  font-weight:800;
}

.sls-ge-game-status-v2 .ge-batting-initials[hidden],
.sls-ge-game-status-v2 .ge-fielding-initials[hidden],
.sls-ge-game-status-v2 .ge-batting-logo[hidden],
.sls-ge-game-status-v2 .ge-fielding-logo[hidden]{
  display:none !important;
}

.sls-ge-game-status-v2 .sls-ge-status-number{
  color:#111;
  font-size:24px;
  line-height:1;
  font-weight:800;
}

.sls-ge-game-status-v2 .sls-ge-status-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:100%;
  max-width:100%;
  min-width:0;
  min-height:28px;
  padding:5px 4px;
  border:1px solid var(--sls-status-color, #b42318);
  background:var(--sls-status-color, #b42318);
  color:var(--sls-status-text, #fff);
  font-size:12px;
  line-height:1;
  font-weight:800;
  text-transform:uppercase;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.sls-ge-game-status-v2 .sls-ge-status-badge.is-long{ font-size:10px; }
.sls-ge-game-status-v2 .sls-ge-status-badge.is-very-long{ font-size:9px; letter-spacing:0; }

.sls-ge-game-status-v2 .sls-ge-base-diamond{
  position:relative;
  width:138px;
  height:138px;
  margin-top:1px;
}

.sls-ge-game-status-v2 .sls-ge-base-gem{
  position:absolute;
  display:grid;
  place-items:center;
  width:54px;
  height:54px;
  border:1px solid #dfe3e8;
  background:#fff;
  color:#111;
  font-size:0;
  font-weight:800;
  line-height:1;
  transform:rotate(45deg);
  text-align:center;
  overflow:hidden;
  user-select:none;
}

.sls-ge-game-status-v2 .sls-ge-base-gem--second{top:0;left:42px;}
.sls-ge-game-status-v2 .sls-ge-base-gem--third{top:42px;left:0;}
.sls-ge-game-status-v2 .sls-ge-base-gem--first{top:42px;right:0;}
.sls-ge-game-status-v2 .sls-ge-base-gem--batter{bottom:0;left:42px;}

.sls-ge-game-status-v2 .sls-ge-base-gem::after{
  content:attr(data-label);
  display:block;
  font-size:14px;
  font-weight:800;
  transform:rotate(-45deg);
  white-space:nowrap;
}

.sls-ge-game-status-v2 .sls-ge-base-gem.is-on{
  border-color:rgba(0,0,0,.22);
}

@media (max-width:900px){
  .sls-ge-game-status-v2 .sls-ge-status-cells{
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:auto;
  }
  .sls-ge-game-status-v2 .sls-ge-status-cell--bases{
    grid-column:1 / -1;
    grid-row:auto;
  }
}

@media (max-width:560px){
  .sls-ge-game-status-v2 .sls-ge-status-cells{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@container (max-width:520px){
  .sls-ge-game-status-v2 .sls-ge-status-cells{
    grid-template-columns:minmax(112px,1.35fr) repeat(3,minmax(52px,1fr));
    grid-template-rows:repeat(2,minmax(70px,auto));
    gap:6px;
  }
  .sls-ge-game-status-v2 .sls-ge-status-cell{
    min-height:70px;
    padding:7px 6px;
  }
  .sls-ge-game-status-v2 .sls-ge-status-cell--bases{
    min-height:146px;
  }
  .sls-ge-game-status-v2 .sls-ge-status-label{
    margin-bottom:3px;
    font-size:11px;
  }
  .sls-ge-game-status-v2 .sls-ge-base-diamond{
    width:106px;
    height:106px;
  }
  .sls-ge-game-status-v2 .sls-ge-base-gem{
    width:42px;
    height:42px;
  }
  .sls-ge-game-status-v2 .sls-ge-base-gem--second{top:0;left:32px;}
  .sls-ge-game-status-v2 .sls-ge-base-gem--third{top:32px;left:0;}
  .sls-ge-game-status-v2 .sls-ge-base-gem--first{top:32px;right:0;}
  .sls-ge-game-status-v2 .sls-ge-base-gem--batter{bottom:0;left:32px;}
  .sls-ge-game-status-v2 .sls-ge-base-gem::after{
    font-size:12px;
  }
  .sls-ge-game-status-v2 .sls-ge-team-logo-slot{
    width:38px;
    height:38px;
  }
  .sls-ge-game-status-v2 .ge-batting-initials,
  .sls-ge-game-status-v2 .ge-fielding-initials{
    font-size:12px;
  }
  .sls-ge-game-status-v2 .sls-ge-status-number{
    font-size:22px;
  }
  .sls-ge-game-status-v2 .sls-ge-inning-lockup{
    gap:5px;
    font-size:20px;
  }
  .sls-ge-game-status-v2 .sls-ge-inning-arrow{
    border-left-width:6px;
    border-right-width:6px;
  }
  .sls-ge-game-status-v2 .sls-ge-inning-arrow.is-top{ border-bottom-width:10px; }
  .sls-ge-game-status-v2 .sls-ge-inning-arrow.is-bottom{ border-top-width:10px; }
  .sls-ge-game-status-v2 .sls-ge-status-badge{
    width:100%;
    min-height:24px;
    padding:4px 3px;
    font-size:10px;
  }
  .sls-ge-game-status-v2 .sls-ge-status-badge.is-long,
  .sls-ge-game-status-v2 .sls-ge-status-badge.is-very-long{
    font-size:9px;
  }
}

@container (max-width:360px){
  .sls-ge-game-status-v2 .sls-ge-status-cells{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .sls-ge-game-status-v2 .sls-ge-status-cell--bases{
    grid-column:1 / -1;
    grid-row:auto;
    min-height:132px;
  }
}

/* Spray chart (simple field) */
.sls-ge-spray-field{
  width:100%;
  aspect-ratio: 1 / 1;
  max-height:260px;
  border:1px solid var(--sls-border);
  border-radius:var(--sls-radius);
  overflow:hidden;
  background: linear-gradient(180deg, #eaf6ea 0%, var(--sls-surface-soft) 100%);
  position:relative;
}
.sls-ge-spray-field svg{width:100%; height:100%; display:block;}
.sls-ge-spray-dot{opacity:0.95;}

/* Hit location modal */
.sls-ge-hitloc-overlay{position:fixed; inset:0; background:rgba(15,23,42,0.55); display:none; align-items:center; justify-content:center; z-index:99999;}
.sls-ge-hitloc-modal{background:var(--sls-surface); border-radius:var(--sls-radius); width:min(520px, 92vw); padding:16px; box-shadow:var(--sls-shadow);}
.sls-ge-hitloc-title{font-weight:900; margin-bottom:8px;}
.sls-ge-hitloc-sub{color:var(--sls-muted); font-size:13px; margin-bottom:10px;}
.sls-ge-hitloc-actions{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:12px;}
.sls-ge-hitloc-actions .sls-ge-bigbtn{width:100%;}


.sls-ge-spray-legend{display:flex;flex-wrap:wrap;gap:10px 14px;align-items:center;margin-top:8px;font-size:12px;line-height:1.2;}
.sls-ge-spray-legend__item{display:inline-flex;align-items:center;gap:6px;color:var(--sls-text);}
.sls-ge-spray-legend__dot{width:10px;height:10px;border-radius:50%;display:inline-block;border:1px solid rgba(0,0,0,.35);box-sizing:border-box;}
.sls-ge-spray-legend__dot--1b{background:rgba(46, 125, 50, 0.85);}
.sls-ge-spray-legend__dot--2b{background:rgba(25, 118, 210, 0.85);}
.sls-ge-spray-legend__dot--3b{background:rgba(198, 40, 40, 0.85);}
.sls-ge-spray-legend__dot--hr{background:rgba(123, 31, 162, 0.85);}
.sls-ge-spray-legend__dot--foul{background:rgba(245, 158, 11, 0.85);}
.sls-ge-spray-legend__dot--dead{background:rgba(14, 165, 233, 0.85);}
.sls-ge-spray-legend__dot--fc{background:rgba(100, 116, 139, 0.85);}
.sls-ge-spray-legend__dot--out{background:rgba(90,90,90,0.80);}
.sls-ge-spray-scope{display:inline-flex;align-items:center;gap:0;margin-left:auto;border:1px solid var(--sls-border);background:#fff;}
.sls-ge-spray-scope button{appearance:none;border:0;border-left:1px solid var(--sls-border);background:#fff;color:var(--sls-text);font:inherit;font-size:12px;font-weight:700;line-height:1;padding:7px 9px;cursor:pointer;}
.sls-ge-spray-scope button:first-child{border-left:0;}
.sls-ge-spray-scope button.is-active{background:var(--sls-accent,var(--sls-brand));color:#fff;}

/* Shared minimalist UI baseline.
   Keep this at the end of the common file so scorer, public live pages and
   reusable scorecard pieces speak with the same quieter visual language. */
.sls-ge-scorer-body,
.sls-public-scoresheet-body{
  line-height:1.45;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

.sls-ge-scorer-body :where(button, input, select, textarea),
.sls-public-scoresheet-body :where(button, input, select, textarea){
  font:inherit;
}

.sls-ge-card,
.sls-ge-ss__panel,
.sls-live-game__panel,
.sls-public-live-header{
  border-color:var(--sls-border);
  box-shadow:var(--sls-shadow-soft);
}

.sls-ge-ui-heading,
.sls-ge-card h3,
.sls-ge-control-title,
.sls-ge-control-title-row,
.sls-ge-spray-title,
.sls-ge-ss__panel h3,
.sls-live-game__panel h3{
  font-family:var(--sls-font);
  font-size:13px;
  font-weight:600;
  line-height:1.3;
  letter-spacing:0;
  text-transform:none;
}

.sls-ge-ui-label,
.sls-ge-linescore-table th,
.sls-ge-linescore-table td:first-child,
.sls-ge-linescore-table .sls-ge-linescore-total{
  font-weight:600;
  letter-spacing:0;
  text-transform:none;
}

.sls-ge-ui-chip,
.sls-ge-bigbtn,
.sls-ge-adminpill{
  font-weight:600;
}

/* Inter regular typography pass for shared SLS modules. */
:root{
  --sls-type-base:var(--sls-text-regular);
  --sls-type-md:var(--sls-text-h3);
  --sls-type-lg:var(--sls-text-section);
  --sls-weight-label:400;
}

.sls-ge-scorer-body,
.sls-public-scoresheet-body{
  font-size:var(--sls-type-base);
  font-weight:400;
}

.sls-ge-scorer-body :where(p,span,li,td,th,label,button,input,select,textarea,a,strong,b),
.sls-public-scoresheet-body :where(p,span,li,td,th,label,button,input,select,textarea,a,strong,b){
  font-weight:400 !important;
}

.sls-ge-ui-heading,
.sls-ge-card h3,
.sls-ge-control-title,
.sls-ge-control-title-row,
.sls-ge-spray-title,
.sls-ge-ss__panel h3,
.sls-live-game__panel h3,
.sls-ge-linescore-table th,
.sls-ge-scorecard th{
  font-size:var(--sls-type-lg);
  font-weight:400 !important;
}

.sls-ge-linescore-table td,
.sls-ge-scorecard td,
.sls-ge-scorecard .col-name,
.sls-ge-scorecard .col-tot,
.sls-ge-ui-label,
.sls-ge-ui-chip,
.sls-ge-bigbtn,
.sls-ge-adminpill{
  font-size:var(--sls-type-base);
  font-weight:400 !important;
}

.sls-ge-bigbtn,
.sls-ge-adminpill,
.sls-ge-bigbtn :where(span,strong,b),
.sls-ge-adminpill :where(span,strong,b){
  font-weight:700 !important;
}

.sls-ge-card h3.sls-ge-section-title,
.sls-ge-section-title,
.sls-ge-section-title :where(span,strong,b){
  font-family:var(--sls-font) !important;
  font-size:var(--sls-type-lg) !important;
  font-weight:700 !important;
  line-height:1.25;
  letter-spacing:0;
  text-transform:none;
}

/* Shared table edge treatment: preserve top/bottom and internal borders only. */
.sls-ge-linescore-table :where(th,td):first-child,
.sls-ge-scorecard :where(th,td):first-child{
  border-left:0 !important;
}

.sls-ge-linescore-table :where(th,td):last-child,
.sls-ge-scorecard :where(th,td):last-child{
  border-right:0 !important;
}
