/**
 * css/shell/miniplayer.css
 * The floating playback bar shown over the document while it is being read.
 *
 * It holds the app's real #listenBtn and #ttsStop (moved in by
 * js/shell/miniplayer.js), so the styling here has to cover those two
 * elements by id rather than by a class of the shell's own.
 *
 * Dependencies: css/shell/tokens.css, css/shell/chrome.css.
 */

.ts-miniplayer { display: none; }

body.ts-shell .ts-miniplayer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  /* Sits directly above the reading-progress bar, which sits on the tab bar. */
  bottom: calc(var(--ts-bottom-reserve) + 0.75rem);
  z-index: 8200;
  padding: 0.5rem;
  border: 1px solid var(--ts-border);
  border-radius: 999px;
  background: rgba(20, 20, 24, 0.96);
  box-shadow: var(--ts-shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
body.ts-shell .ts-miniplayer[hidden] { display: none; }

/* Focus mode hides every other bar; the player follows suit, since the whole
   point of that mode is nothing but the page. */
body.ts-shell.app-fullscreen .ts-miniplayer { display: none !important; }

.ts-mini-controls {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

/* The hosted buttons, restyled for the pill. Same elements, same handlers —
   only their size and shape differ from the Listen screen. */
.ts-miniplayer #listenBtn {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.5rem 0.75rem;
  border: 0;
  border-radius: 999px;
  background: var(--ts-accent);
  color: var(--ts-accent-ink);
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ts-miniplayer #listenBtn:disabled { opacity: 0.5; }

.ts-miniplayer #ttsStop {
  flex: 0 0 auto;
  width: auto;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(239, 68, 68, 0.5);
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.16);
  color: #f87171;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.ts-miniplayer #ttsStop:disabled { opacity: 0.45; }

.ts-mini-expand {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ts-text-dim);
  cursor: pointer;
  /* Points up: tapping it opens the full Listen screen. */
  transform: rotate(180deg);
  -webkit-tap-highlight-color: transparent;
}
.ts-mini-expand svg { width: 1.25rem; height: 1.25rem; }

/* Keep the last lines of the document clear of the floating bar. */
body.ts-shell.ts-mini-open #outputContent { padding-bottom: 5.5rem !important; }
