/* NEET Notes Hub - read-aloud player (Kokoro, in-browser only).
   Palette: black #0B0B0B, yellow #FFD400, red #E10600, white, grey #9A9A9A.
   No gradients, no glass, no shadows, no new colours. Same buttons and
   borders as the chapter actions. The player bar is fixed to the bottom
   of the screen and wraps at 360px. */

/* The Listen button sits in the chapter-actions nav, styled exactly like
   the other chapter-action links. */
.chapter-actions button.tts-listen-btn{display:inline-block;padding:8px 12px;background:var(--panel);border:2px solid var(--rule2);color:var(--ink);text-decoration:none;font-weight:600;text-transform:uppercase;font-size:13px;letter-spacing:.03em;line-height:1.2;cursor:pointer;font-family:inherit}
.chapter-actions button.tts-listen-btn:hover{color:var(--yellow)}
.chapter-actions button.tts-listen-btn[aria-expanded="true"]{background:var(--yellow);border-color:var(--yellow);color:#0B0B0B}

/* Space for the fixed bar so it never covers the notes or the footer. */
body.tts-open{padding-bottom:280px}

/* The player bar: fixed to the bottom, full width, panel background,
   yellow top border. */
.tts-root{position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--panel);border-top:2px solid var(--yellow);color:var(--ink)}
.tts-bar{max-width:960px;margin:0 auto;padding:12px 16px 14px}
.tts-bar h3{margin:0 0 8px;font-size:15px}
.tts-bar p{margin:0 0 8px;font-size:14px;line-height:1.5;color:var(--soft)}
.tts-bar p.tts-status{color:var(--ink);font-weight:600}
.tts-error{border:2px solid var(--red);background:var(--panel2);color:var(--ink);padding:8px 10px;margin:0 0 10px;font-size:14px;line-height:1.5}
.tts-error:empty{display:none}

/* Buttons: the same look as the chapter actions. */
.tts-btn{display:inline-block;padding:8px 12px;background:var(--panel2);border:2px solid var(--rule2);color:var(--ink);font-weight:600;text-transform:uppercase;font-size:13px;letter-spacing:.03em;line-height:1.2;cursor:pointer;font-family:inherit}
.tts-btn:hover{color:var(--yellow)}
.tts-btn:disabled{opacity:.45;cursor:default;color:var(--grey)}
.tts-btn.primary{background:var(--yellow);border-color:var(--yellow);color:#0B0B0B}
.tts-btn.primary:hover{color:#0B0B0B;background:#ffe14d}
.tts-btn.danger{border-color:var(--red);color:var(--ink)}
.tts-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 10px}
.tts-row:last-child{margin-bottom:0}

/* Progress bars: solid yellow fill on a rule-coloured track. */
.tts-track{flex:1 1 160px;min-width:120px;height:8px;background:var(--rule2)}
.tts-fill{display:block;height:100%;width:0;background:var(--yellow)}
.tts-dl-text,.tts-prog-text{font-size:13px;color:var(--grey);white-space:nowrap}
.tts-section-label{font-size:13px;color:var(--soft);flex:1 1 100%}

/* Settings: voice, speed and quality pickers. */
.tts-field{display:flex;flex-direction:column;gap:4px;min-width:0}
.tts-field label{font-size:12px;color:var(--grey);text-transform:uppercase;letter-spacing:.04em}
.tts-field select{max-width:100%;padding:8px;background:var(--panel2);border:2px solid var(--rule2);color:var(--ink);font-size:14px;font-family:inherit}
.tts-field select:focus{outline:2px solid var(--yellow);outline-offset:1px}
.tts-field.voice{flex:2 1 220px}
.tts-field.speed{flex:0 1 96px}
.tts-field.quality{flex:1 1 180px}

/* The minimum-spec panel: facts before the download starts. */
.tts-spec-list{margin:0 0 10px;padding:0;list-style:none;border-left:4px solid var(--yellow);padding-left:12px}
.tts-spec-list li{font-size:14px;line-height:1.5;color:var(--soft);margin-bottom:4px}
.tts-spec-list li b{color:var(--ink)}
.tts-spec-warn{border:2px solid var(--red);background:var(--panel2);padding:8px 10px;margin:0 0 10px;font-size:14px;line-height:1.5}
.tts-note{font-size:13px;color:var(--grey)}

/* Sentence highlight: the sentence being read gets the yellow
   selection treatment. Headings and table rows get the same idea
   without breaking their own layout. */
.tts-s.tts-active{background:var(--yellow);color:#0B0B0B}
h2.tts-active-h{background:var(--yellow);color:#0B0B0B}
tr.tts-active td{background:var(--panel2)}
tr.tts-active td:first-child{border-left:4px solid var(--yellow)}

@media (max-width:640px){
  .tts-bar{padding:10px 12px 12px}
  .tts-field.voice{flex:1 1 100%}
  .tts-field.speed{flex:1 1 30%}
  .tts-field.quality{flex:1 1 60%}
  body.tts-open{padding-bottom:320px}
}
