/*
 * SolComedian V13.6.9
 * Ergonomic Layout — Phase 1
 * Presentation only.
 * No authentication, payment or microphone logic changes.
 */

/* General visual spacing */
main {
  padding-bottom: 28px;
}

/* Preserve the approved hero artwork and proportions */
.brand-hero {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Compact conversation when no messages exist */
#messages:empty {
  height: 190px !important;
  min-height: 190px !important;
}

/* Keep a comfortable conversation once messages appear */
#messages:not(:empty) {
  min-height: 230px;
}

/* Make the message composer easier to find */
.text-composer {
  margin-top: 12px;
  border-radius: 16px;
}

.text-composer > summary {
  min-height: 32px;
}

/* Better organization of bottom actions */
footer {
  gap: 10px 12px;
}

footer #new,
footer #export {
  min-height: 44px;
}

/* Mobile improvements */
@media (max-width: 700px) {
  main {
    padding-left: 12px;
    padding-right: 12px;
  }

  #messages:empty {
    height: 150px !important;
    min-height: 150px !important;
  }

  footer #new,
  footer #export {
    flex: 1 1 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-composer {
    scroll-behavior: auto;
  }
}

/* V13.6.9 — PHASE 2 : VOICE LAYOUT */

/* Voice controls: consistent layout on desktop and mobile */
.voice-bar {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px !important;
  align-items: stretch !important;
}

/* Microphone visualization comes first */
.voice-bar > #waveShell {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  width: 100%;
  min-width: 0;
  margin: 0;
}

/* Main scene control takes the full width */
.voice-bar > .hands-free-help-layout-v123 {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  width: 100%;
  min-width: 0;
  max-width: none !important;
  align-items: stretch !important;
  gap: 10px !important;
  margin: 0 !important;
}

.voice-bar #handsFreeToggle {
  width: 100% !important;
  min-height: 58px;
  margin: 0 !important;
  font-size: clamp(1rem, 2vw, 1.12rem);
  line-height: 1.35;
  text-align: center;
  white-space: normal;
}

/* Manual voice controls appear below the main action */
.voice-bar > #record,
.voice-bar > #stop {
  grid-row: 3 !important;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0 !important;
  white-space: normal;
}

.voice-bar > #record {
  grid-column: 1 !important;
}

.voice-bar > #stop {
  grid-column: 2 !important;
}

/* Keep the existing instructions readable */
.voice-bar #handsFreeHelp {
  width: 100%;
  max-width: none !important;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

/* Compact active character without changing the artwork */
.active-performer {
  gap: 12px;
}

.active-performer-copy {
  min-width: 0;
}

/* Preserve mobile touch targets */
@media (max-width: 700px) {
  .voice-bar {
    gap: 10px !important;
  }

  .voice-bar #handsFreeToggle {
    min-height: 54px;
  }

  .voice-bar > #record,
  .voice-bar > #stop {
    min-height: 52px;
    padding: 10px 8px;
  }
}

@media (max-width: 380px) {
  .voice-bar {
    gap: 8px !important;
  }

  .voice-bar #handsFreeToggle {
    font-size: 1rem;
  }
}

/* V13.6.9 — Phase 3 : compact scene */

.voice-bar {
  gap: 10px !important;
}

.voice-bar > .hands-free-help-layout-v123 {
  gap: 8px !important;
}

.voice-bar #sol-scene-guide-v13684 {
  width: 100%;
  max-width: 100% !important;
  box-sizing: border-box;
  margin-top: 0 !important;
  padding: 12px 14px !important;
}

.voice-bar #handsFreeHelp {
  font-size: .82rem !important;
  line-height: 1.4 !important;
  margin: 0 !important;
}

.voice-bar > #record,
.voice-bar > #stop {
  min-height: 50px;
}

@media (max-width: 700px) {
  .voice-bar #sol-scene-guide-v13684 {
    padding: 10px 12px !important;
  }
}

/* V13.6.9 — PHASE 4 FINAL POLISH */

/* Less empty space around the scene */
.voice-bar {
  padding: 12px !important;
  gap: 10px !important;
}

/* Full-width scene guidance */
.voice-bar #sol-scene-guide-v13684 {
  width: 100%;
  max-width: none !important;
  margin: 0 !important;
  padding: 11px 14px !important;
  border-radius: 12px;
}

/*
 * Hide duplicate visual instructions only when
 * the newer scene guide is present.
 * Keep the original text in the DOM for JS compatibility.
 */
.voice-bar
.hands-free-help-layout-v123:has(#sol-scene-guide-v13684)
#handsFreeHelp {
  display: none !important;
}

/* Keep manual controls easy to tap */
.voice-bar > #record,
.voice-bar > #stop {
  min-height: 52px;
  border-radius: 13px;
}

/* Compact conversation actions */
.audio-recovery-tools {
  gap: 8px 12px;
  margin: 8px 0 10px;
}

#messages:empty {
  height: 170px !important;
  min-height: 170px !important;
}

@media (max-width: 700px) {
  .voice-bar {
    padding: 10px !important;
  }

  #messages:empty {
    height: 145px !important;
    min-height: 145px !important;
  }
}

/* V13.6.9.1 — Masquer le coût estimé dans le footer */
footer #stats {
  display: none !important;
}
