/* BPW Layout Tester (v1.6.0) — incremental, non-invasive overrides */

/* ---------- Hide Play (Start Session) button entirely ---------- */
.bpw-controls [data-action="create-session"]{ display:none !important; }

/* ---------- Accordions (details/summary) ---------- */
.bpw-accordion{
  border:1px solid #e5e7eb; border-radius:12px; background:#fff; margin: 0 0 12px;
}
.bpw-accordion > summary{
  list-style:none; cursor:pointer; padding:12px 14px;
  display:flex; align-items:center; gap:8px;
  font:600 14px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
}
.bpw-accordion > summary::-webkit-details-marker{ display:none; }
.bpw-accordion > summary::after{
  content:""; margin-left:auto; inline-size:10px; block-size:10px;
  border-inline-end:2px solid currentColor; border-block-end:2px solid currentColor;
  transform: rotate(-45deg); transition: transform .2s ease; opacity:.7;
}
.bpw-accordion[open] > summary::after{ transform: rotate(135deg); }
.bpw-accordion .bpw-count{ color:#64748b; font-weight:600; }
.bpw-accordion-body{ padding:0 12px 12px; }

/* Summary “Last: …” when collapsed */
.bpw-accordion > summary .bpw-summary-last{
  margin-left:8px; color:#64748b; font-weight:600; word-break: break-word;
}
@media (max-width:900px){
  .bpw-accordion > summary{ flex-wrap:wrap; row-gap:4px; }
  .bpw-accordion > summary .bpw-count{ order:3; margin-left:0; }
}

/* ---------- History panel & count (max 10 items) ---------- */
.bpw-history-panel{
  max-block-size: min(60svh, 520px);
  overflow:auto; overscroll-behavior: contain; padding-right: 8px;
}
.bpw-accordion .bpw-history li:nth-child(n+11){ display:none !important; }
.bpw-panels-mobile .bpw-history li:nth-child(n+11){ display:none !important; }

/* Remove timestamps */
.bpw-accordion .bpw-history small,
.bpw-panels-mobile .bpw-history small{ display:none !important; }

/* ---------- Current Wheel Items: 1 column, full text ---------- */
.bpw-accordion .bpw-items-list{
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px;
}
.bpw-accordion .bpw-items-list .bpw-label{
  display:block !important;
  -webkit-line-clamp: unset !important;
  line-clamp: unset !important;
  max-height: none !important;
  white-space: normal !important;
  overflow: visible !important;
}

/* ---------- Mobile panels under controls ---------- */
.bpw-panels-mobile{ display:none; margin-top: 6px; }
@media (max-width: 900px){
  .bpw-right{ display: none !important; }
  .bpw-panels-mobile{ display:block !important; }
  .bpw-controls{ margin-top: 10px; }
}

/* ---------- Compact mobile icon toolbar (no Play icon) ---------- */
.bpw-mobile-toolbar{ display:none; justify-content:center; gap:10px; margin-top:8px; }
@media (max-width: 900px){
  .bpw-mobile-toolbar{ display:flex !important; }
  .bpw-controls .bpw-btn{ display:none !important; }
  .bpw-controls [data-action="spin"]{ display:none !important; } /* tap wheel to spin */
}
.bpw-ico-btn{
  width:44px; height:44px; border-radius:10px;
  border:1px solid #e5e7eb; background:#fff; color:#111827;
  display:flex; align-items:center; justify-content:center;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.bpw-ico-btn svg{ width:22px; height:22px; }
.bpw-ico-btn.is-disabled{ opacity:.5; cursor:not-allowed; }
.bpw-ico-btn:focus{ outline: 2px solid #2563eb; outline-offset:2px; }

/* Sound icon slash */
.bpw-ico-sound svg .slash{ display:none; }
.bpw-ico-sound.is-off svg .slash{ display:block; }

/* Help link */
.bpw-help-link{
  display:none; margin:6px auto 0; background:none; border:none;
  color:#2563eb; text-decoration:underline; font:600 13px system-ui; cursor:pointer;
}
@media (max-width:900px){ .bpw-help-link{ display:inline; } }

/* ---------- Overlays (Instructions + Play) ---------- */
.bpw-help-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.5);
  z-index:99999; display:flex; align-items:center; justify-content:center; padding:16px;
}
.bpw-help-card{
  background:#fff; border-radius:14px; padding:16px; max-width:560px; width:100%;
  box-shadow:0 20px 60px rgba(0,0,0,.3); color:#0f172a; font:500 14px system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial;
}
.bpw-help-card h3{ margin:0 0 8px; font:800 18px/1.2 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial; }
.bpw-help-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-top:8px; }
.bpw-help-row{ display:flex; align-items:center; gap:10px; border:1px solid #e5e7eb; border-radius:10px; padding:10px; }
.bpw-help-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:12px; }
.bpw-help-note{ margin-top:10px; padding:10px; border:1px solid #fde68a; background:#fffbeb; border-radius:10px; color:#92400e; }
.bpw-help-actions .bpw-btn-mini{
  padding:8px 12px; border-radius:10px; border:1px solid #e5e7eb;
  background:#111827; color:#fff; font:700 13px system-ui; cursor:pointer;
}

/* ---------- Center toast ---------- */
.bpw-center-toast{
  position:fixed; left:50%; top:50%; transform:translate(-50%, -50%);
  z-index:99998; background:rgba(17,24,39,.92); color:#fff;
  padding:12px 16px; border-radius:12px; font:800 14px system-ui;
  box-shadow:0 14px 30px rgba(0,0,0,.25); text-align:center;
}

/* ---------- (Legacy) green Play state styles kept (not used now) ---------- */
.bpw-controls [data-action="create-session"].is-playing,
.bpw-controls [data-action="create-session"].is-playing:disabled,
.bpw-ico-start.is-playing{
  background:#16a34a !important;
  border-color:#16a34a !important;
  color:#fff !important;
  opacity:1 !important;
  filter:none !important;
}
