/* TTPlayer styles. Colours come from --ink, --muted, --accent, --surface (fallbacks below). */
.tt-player {
  min-width: 0;
  max-width: 100%;
  color: var(--ink, #1F2428);
  font: 500 15px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

.tt-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.tt-play {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-2, #E9EDF2);
  color: var(--ink, #1F2428);
  font: inherit;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.tt-play:active { transform: scale(0.96); }
@media (hover: hover) { .tt-play:hover { background: var(--line, #DFE4EA); } }
.is-playing .tt-play { animation: tt-ring 2s ease-out infinite; }
@keyframes tt-ring { from { box-shadow: 0 0 0 0 rgba(30, 79, 216, 0.45); } to { box-shadow: 0 0 0 12px rgba(30, 79, 216, 0); } }

.tt-icon {
  position: relative;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.tt-icon > span {
  position: absolute;
  inset: 0;
  transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease;
}

.tt-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}

.tt-i-pause { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.is-playing .tt-i-play { opacity: 0; transform: scale(0.25); filter: blur(4px); }
.is-playing .tt-i-pause { opacity: 1; transform: none; filter: blur(0); }

.tt-spin {
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  animation: tt-spin 0.8s linear infinite;
}
.is-loading .tt-i-play,
.is-loading .tt-i-pause { opacity: 0; }
.is-loading .tt-spin { opacity: 1; }

.tt-wave {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  cursor: pointer;
  touch-action: none;
  user-select: none;
}

.tt-wave canvas {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
}

.tt-play:focus-visible,
.tt-wave:focus-visible {
  outline: 2px solid var(--accent, #1E4FD8);
  outline-offset: 3px;
}

.tt-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin-top: 8px;
  color: var(--muted, #5C6670);
  font-size: 13px;
}

.tt-status { color: var(--ink, #1F2428); }

.tt-ticket {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
  min-width: 0;
  border-bottom: 1px solid rgba(31, 36, 40, 0.14);
}

.tt-ticket li {
  padding: 10px 0;
  border-top: 1px solid rgba(31, 36, 40, 0.14);
  color: var(--muted, #5C6670);
  overflow-wrap: anywhere;
  transition: color 250ms ease;
}

.tt-ticket li.is-said { color: var(--ink, #1F2428); }
.tt-ticket li.tt-sent { display: none; }  /* nothing to announce until the call ends */
.tt-ticket li.tt-sent.is-said { display: block; color: var(--accent, #1E4FD8); font-weight: 600; }

@keyframes tt-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .tt-player *, .tt-player *::before, .tt-player *::after {
    transition: none !important;
    animation: none !important;
  }
}
