/* PBP Editor Styles (Consolidated) */

/* Toolbar & Layout */
.spsls-pbp-toolbar {
  background:#f7f9fb;
  border:1px solid #e2e8f0;
  padding:10px 12px;
  border-radius:6px;
  margin-bottom:14px;
  font-size:13px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.spsls-pbp-scoreboard {
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:center;
}
.spsls-pbp-controls {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.spsls-pbp-status {
  font-size:12px;
  min-height:18px;
  color:#222;
}
.spsls-pbp-status.error { color:#b3261e; }

/* Plays list */
.pbp-playlist {
  list-style:decimal;
  padding-left:22px;
  margin:0;
}
.pbp-playlist li {
  padding:4px 2px;
  border-bottom:1px solid #eee;
  font-size:13px;
  line-height:1.35;
}
.pbp-playlist li:last-child { border-bottom:none; }
.pbp-playlist code {
  background:#eef2f7;
  padding:1px 4px;
  border-radius:3px;
  font-size:11px;
}

/* Bases display */
.b-base {
  display:inline-block;
  width:14px;
  text-align:center;
  font-weight:600;
}

/* Section wrapper (template injector) */
.spsls-pbp-section {
  margin:28px 0;
}
.spsls-pbp-section .spsls-scorebook {
  background:#fff;
  border:1px solid #e2e8f0;
  padding:14px;
}

/* Self-injected (should not normally appear now) */
.spsls-scorebook.spsls-self-injected {
  border:2px dashed #94a3b8;
  background:#fff;
  padding:14px;
  margin:28px 0;
}

/* Fallback note (if any legacy markup remains) */
.spsls-fallback-note,
.spsls-pbp-fallback-note {
  font-size:11px;
  opacity:.55;
  margin-top:4px;
}

/* PUBLIC VIEW: Hide editing / mutation controls for non-logged-in visitors.
   - Start PA
   - Pitch buttons
   - Finalize
   - Delete Last
   (Refresh & exports are left visible; remove if you want them hidden too.) */
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-start,
body:not(.logged-in) .spsls-pbp-toolbar button[class^="pbp-pitch-"],
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-finalize,
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-delete-last {
  display:none;
}

/* (Optional) Hide export & refresh for public too:
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-refresh,
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-export-json,
body:not(.logged-in) .spsls-pbp-toolbar button.pbp-export-csv {
  display:none;
}
*/

/* Accessibility focus outline */
.spsls-pbp-toolbar button:focus {
  outline:2px solid #2563eb;
  outline-offset:2px;
}

/* Responsive */
@media (max-width:640px){
  .spsls-pbp-scoreboard { gap:10px; }
  .spsls-pbp-controls { gap:4px; }
  .spsls-pbp-toolbar { padding:10px; }
}