/*
  Slugger Speaks — browser TTS voice lab on the PiDog speak page.
*/

.ss-lab {
  max-width: 520px;
  margin: 2rem auto 0;
  text-align: center;
}

.ss-heading {
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--subheader-color);
}

.ss-intro {
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  opacity: 0.85;
  line-height: 1.5;
}

.ss-step {
  margin-bottom: 1.75rem;
  padding: 1.25rem 1rem;
  border-radius: 12px;
  border: 1px solid rgb(201 194 186 / 22%);
  background:
    radial-gradient(ellipse 90% 70% at 50% 0%, rgb(201 194 186 / 8%), transparent 65%),
    rgb(20 24 28 / 35%);
  text-align: left;
}

.ss-step .ss-step-title {
  margin: 0 0 0.85rem;
  font-size: 1.5rem;
  color: var(--subheader-color);
  text-align: center;
}

.ss-preset,
.ss-btn {
  font-family: inherit;
  cursor: pointer;
}

.ss-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  opacity: 0.85;
}

.ss-name-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.5rem;
}

.ss-input,
.ss-textarea {
  box-sizing: border-box;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgb(201 194 186 / 35%);
  background: rgb(8 10 12 / 55%);
  color: inherit;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.3;
  -webkit-appearance: none;
  appearance: none;
}

.ss-textarea {
  width: 100%;
  resize: vertical;
  min-height: 5.5rem;
  line-height: 1.45;
}

.ss-name-row .ss-input {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 100%;
}

.ss-name-row .ss-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.ss-input:focus,
.ss-textarea:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 1px;
}

.ss-meta {
  display: flex;
  justify-content: flex-end;
  margin: 0.35rem 0 0.65rem;
}

.ss-counter {
  margin: 0;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  opacity: 0.75;
}

.ss-counter.is-full {
  color: var(--accent-color);
  opacity: 1;
  font-weight: 600;
}

.ss-lesson {
  margin: 2rem 0 0;
  padding: 0.7rem 0.8rem;
  border-left: 3px solid var(--accent-color);
  font-size: 0.86rem;
  line-height: 1.45;
  opacity: 0.9;
}

.ss-presets-label {
  margin: 0 0 0.5rem;
  font-size: 0.88rem;
  opacity: 0.85;
}

.ss-presets {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
}

.ss-custom-label {
  margin-top: 0.25rem;
}

.ss-preset {
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid rgb(201 194 186 / 28%);
  background: rgb(12 14 16 / 40%);
  color: inherit;
  font-size: 0.86rem;
  text-align: left;
  line-height: 1.35;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.ss-preset:hover {
  border-color: var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 12%, transparent);
}

.ss-btn {
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  border: 1px solid var(--accent-color);
  background: color-mix(in srgb, var(--accent-color) 28%, transparent);
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}

.ss-btn:hover {
  background: color-mix(in srgb, var(--accent-color) 42%, transparent);
  transform: translateY(-1px);
}

.ss-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.ss-btn-speak {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
}

.ss-status {
  min-height: 0;
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  opacity: 0.85;
  text-align: center;
}

.ss-status.is-error {
  color: #e8a0a0;
  opacity: 1;
}
