/* feat-20261021-buzzar-voice-discovery: "Talk to Sami" entry points and the full-screen voice overlay */

/* ---------- Entry points ---------- */
.bzr-voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  height: 14px;
}

.bzr-voice-wave i {
  display: block;
  width: 2px;
  height: 100%;
  border-radius: 2px;
  background: currentColor;
  transform-origin: center;
  animation: bzr-voice-wave 1.1s ease-in-out infinite;
}

.bzr-voice-wave i:nth-child(1) {
  animation-delay: -0.9s;
}

.bzr-voice-wave i:nth-child(2) {
  animation-delay: -0.6s;
}

.bzr-voice-wave i:nth-child(3) {
  animation-delay: -0.3s;
}

.bzr-voice-wave i:nth-child(4) {
  animation-delay: -0.75s;
}

@keyframes bzr-voice-wave {
  0%,
  100% {
    transform: scaleY(0.3);
  }

  50% {
    transform: scaleY(1);
  }
}

.bzr-voice-cta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px 20px;
  min-width: 0;
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--c-border);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--c-surface);
}

.bzr-voice-cta-orb {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--canvas));
  color: var(--accent-text);
  box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 12%, transparent);
}

.bzr-voice-cta-orb .bzr-voice-wave {
  height: 28px;
  gap: 4px;
}

.bzr-voice-cta-orb .bzr-voice-wave i {
  width: 4px;
}

.bzr-voice-cta h2 {
  margin: 0 0 4px;
  font-size: 23.5px;
  letter-spacing: -0.4px;
  line-height: 1.2;
}

.bzr-voice-cta p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.bzr-voice-cta .primary {
  grid-column: 1 / -1;
  justify-self: start;
}

.bzr-advisor-talk {
  margin: 8px 0 0;
  color: var(--muted);
}

.bzr-advisor-talk button {
  margin-left: 6px;
}

@media (min-width: 720px) {
  .bzr-voice-cta {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .bzr-voice-cta .primary {
    grid-column: auto;
    justify-self: end;
  }
}

/* ---------- Overlay ---------- */
body.bzr-voice-open {
  overflow: hidden;
}

.bzr-voice {
  --v-bg-a: #03061a;
  --v-bg-b: #050a24;
  --v-glow: rgba(10, 179, 214, 0.12);
  --v-panel: rgba(20, 20, 26, 0.82);
  --v-line: rgba(255, 255, 255, 0.14);
  --v-user: #37d6c4;
  --v-sami: #f5a623;
  position: fixed;
  inset: 0;
  z-index: var(--z-voice, 1000);
  display: grid;
  /* max-content: scroll-container panels contribute 0 to auto tracks, which squeezed the stack into the viewport. */
  grid-template-rows: auto max-content auto;
  align-content: start;
  gap: 12px;
  padding: 16px;
  overflow-y: auto;
  color: var(--fg);
  background:
    radial-gradient(ellipse at 50% 38%, var(--v-glow), transparent 55%),
    linear-gradient(160deg, var(--v-bg-a), var(--v-bg-b));
}

html[data-theme='light'] .bzr-voice {
  --v-bg-a: #f6f2e8;
  --v-bg-b: #dfe8f6;
  --v-glow: rgba(245, 166, 35, 0.28);
  --v-panel: rgba(255, 255, 255, 0.86);
  --v-line: rgba(0, 0, 0, 0.14);
  --v-user: #0a7d70;
  --v-sami: #925800;
}

.bzr-voice:focus {
  outline: none;
}

.bzr-voice button:focus-visible,
.bzr-voice a.bzr-voice-open:focus-visible,
.bzr-voice input:focus-visible,
.bzr-voice h3:focus-visible {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.bzr-voice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bzr-voice-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  min-width: 0;
}

.bzr-voice-title {
  margin: 0;
  font-size: 21.5px;
  letter-spacing: -0.3px;
}

.bzr-voice-live {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    'stage'
    'board'
    'talk';
  grid-template-rows: max-content max-content max-content;
  gap: 12px;
  min-height: 0;
}

.bzr-voice-live[hidden],
.bzr-voice-confirm[hidden],
.bzr-voice-notice[hidden] {
  display: none;
}

.bzr-voice-stage {
  grid-area: stage;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.bzr-voice-canvas {
  display: block;
  width: 100%;
  max-width: min(70vh, 640px);
  aspect-ratio: 1;
  height: auto;
}

.bzr-voice-persona {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.bzr-voice-status {
  min-height: 1.5em;
  margin: 0;
  font-size: 23.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.bzr-voice[data-mode='user'] .bzr-voice-status {
  color: var(--v-user);
}

.bzr-voice[data-mode='sami'] .bzr-voice-status {
  color: var(--v-sami);
}

.bzr-voice-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0;
  padding: 0;
  list-style: none;
}

.bzr-voice-step {
  padding: 3px 10px;
  border: 1px solid var(--v-line);
  border-radius: 999px;
  background: var(--v-panel);
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.bzr-voice-step[data-state='done'] {
  color: var(--fg);
  border-color: color-mix(in srgb, var(--accent) 50%, var(--v-line));
}

.bzr-voice-step[data-state='current'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.bzr-voice-panel {
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  overflow-y: auto;
  border: 1px solid var(--v-line);
  border-radius: calc(var(--radius) * 1.25);
  background: var(--v-panel);
}

.bzr-voice-panel h3 {
  margin: 0;
  font-size: 16.5px;
}

.bzr-voice-talk {
  grid-area: talk;
  display: flex;
  flex-direction: column;
  min-height: 220px;
  max-height: min(50vh, 420px);
  overflow: hidden;
}

/* Empty state: the hint fills the panel and centres, so the box never collapses. */
.bzr-voice-talk-empty {
  display: grid;
  flex: 1 1 auto;
  place-items: center;
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--v-line);
  border-radius: 10px;
  color: var(--muted);
  line-height: 1.5;
  text-align: center;
}

.bzr-voice-talk-empty[hidden] {
  display: none;
}

.bzr-voice-board {
  grid-area: board;
}

/* Empty: collapse the list so the hint fills the panel. */
.bzr-voice-transcript:empty {
  flex: 0;
}

.bzr-voice-transcript {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  list-style: none;
}

.bzr-voice-turn {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--fg) 6%, transparent);
}

.bzr-voice-turn[data-role='user'] {
  background: color-mix(in srgb, var(--v-user) 12%, transparent);
}

.bzr-voice-turn[data-role='user'] .bzr-voice-who {
  color: var(--v-user);
}

.bzr-voice-turn[data-role='assistant'] {
  background: color-mix(in srgb, var(--v-sami) 12%, transparent);
}

.bzr-voice-turn[data-role='assistant'] .bzr-voice-who {
  color: var(--v-sami);
}

.bzr-voice-turn[data-final='false'] .bzr-voice-said {
  opacity: 0.8;
  font-style: italic;
}

.bzr-voice-who {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.bzr-voice-said {
  margin: 0;
  line-height: 1.5;
}

.bzr-voice-meter {
  display: grid;
  gap: 4px;
}

.bzr-voice-meter-label {
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
}

.bzr-voice-progress {
  width: 100%;
  height: 8px;
  accent-color: var(--accent);
}

.bzr-voice-cards {
  display: grid;
  gap: 8px;
}

.bzr-voice-card {
  padding: 10px 12px;
  border: 1px dashed var(--v-line);
  border-radius: 10px;
  opacity: 0.7;
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    border-color 0.4s ease;
}

.bzr-voice-card[data-filled='true'] {
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--v-line));
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  opacity: 1;
  animation: bzr-voice-in 0.5s ease both;
}

.bzr-voice-card h4 {
  margin: 0 0 4px;
  color: var(--accent-text);
  font-size: 13.5px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.bzr-voice-card-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}

.bzr-voice-facts {
  display: grid;
  gap: 4px;
  margin: 0;
}

.bzr-voice-fact {
  display: grid;
  gap: 0;
}

.bzr-voice-fact dt {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}

.bzr-voice-fact dd {
  margin: 0;
  overflow-wrap: anywhere;
  line-height: 1.4;
}

.bzr-voice-fact.is-fresh dd {
  animation: bzr-voice-fresh 1.8s ease both;
}

@keyframes bzr-voice-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes bzr-voice-fresh {
  from {
    background: color-mix(in srgb, var(--accent) 45%, transparent);
  }

  to {
    background: transparent;
  }
}

.bzr-voice-solutions {
  display: grid;
  gap: 8px;
}

.bzr-voice-solutions[hidden] {
  display: none;
}

.bzr-voice-summary {
  margin: 0;
  color: var(--muted);
}

.bzr-voice-picks {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bzr-voice-pick {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
  animation: bzr-voice-in 0.5s ease both;
}

.bzr-voice-pick h4 {
  margin: 0;
  font-size: 16.5px;
}

.bzr-voice-pick p,
.bzr-voice-pick-why,
.bzr-voice-pick-caveat {
  margin: 0;
  line-height: 1.45;
}

.bzr-voice-pick-caveat {
  color: var(--muted);
  font-size: 14.5px;
}

.bzr-voice .bzr-fit {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 24%, transparent);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 700;
}

.bzr-voice-note {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
}

/* ---------- Confirm and notice ---------- */
.bzr-voice-confirm,
.bzr-voice-notice {
  display: grid;
  align-content: start;
  gap: 12px;
  width: min(100%, 880px);
  max-height: 100%;
  margin: 0 auto;
  padding: 18px;
  overflow-y: auto;
  border: 1px solid var(--v-line);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--v-panel);
}

.bzr-voice-confirm h3,
.bzr-voice-notice h3 {
  margin: 0;
  font-size: 23.5px;
  letter-spacing: -0.3px;
}

.bzr-voice-lead {
  margin: 0;
  color: var(--muted);
}

.bzr-voice-confirm-form {
  display: grid;
  gap: 14px;
}

.bzr-voice-fieldset {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
}

.bzr-voice-fieldset legend {
  padding: 0 6px;
  font-weight: 700;
}

.bzr-voice-fields {
  display: grid;
  gap: 10px;
}

.bzr-voice-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.bzr-voice-field input {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--fg);
  font: inherit;
  font-size: 16.5px;
  font-weight: 400;
}

.bzr-voice-choices {
  display: grid;
  gap: 8px;
}

.bzr-voice-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
  cursor: pointer;
}

.bzr-voice-choice:has(input:checked) {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

.bzr-voice-choice:focus-within {
  outline: 2px solid var(--accent-text);
  outline-offset: 2px;
}

.bzr-voice-choice-body {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.bzr-voice-choice-row {
  display: grid;
  gap: 6px;
}

.bzr-voice a.bzr-voice-open {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  color: var(--accent-text);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.bzr-voice a.bzr-voice-open::after {
  content: '\00a0\2192';
}

.bzr-voice a.bzr-voice-open:hover {
  text-decoration-thickness: 2px;
}

.bzr-voice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.bzr-voice-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

/* ---------- Wider screens: transcript | voice | board ---------- */
@media (min-width: 960px) {
  .bzr-voice {
    grid-template-rows: auto minmax(0, 1fr) auto;
    padding: 20px 28px;
  }

  .bzr-voice-live {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: 'talk stage board';
    grid-template-rows: minmax(480px, auto);
    align-items: stretch;
  }

  .bzr-voice-canvas {
    width: min(100%, 70vh, 640px);
  }

  /* The stage sets the row height; both panels fill it and scroll inside (size containment hides their content from sizing). */
  .bzr-voice-panel {
    max-height: none;
    contain: size;
  }

  .bzr-voice-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  .bzr-voice-wave i,
  .bzr-voice-card,
  .bzr-voice-card[data-filled='true'],
  .bzr-voice-pick,
  .bzr-voice-fact.is-fresh dd {
    animation: none;
    transition: none;
  }

  .bzr-voice-wave i {
    transform: scaleY(0.7);
  }

  .bzr-voice {
    background:
      radial-gradient(ellipse at 50% 38%, var(--v-glow), transparent 55%),
      linear-gradient(160deg, var(--v-bg-a), var(--v-bg-b));
  }
}

/* The B is additive light, so on the light theme it sits on its own deep navy plate. */
html[data-theme='light'] .bzr-voice-canvas {
  border-radius: 24px;
  background: #03061a;
}

/* feat-20261101-buzzar-sami-b-orb: a hairline cyan rim so the hologram plate reads as a panel in both themes. */
.bzr-voice-canvas {
  border-radius: 24px;
  box-shadow:
    inset 0 0 0 1px rgb(45 226 230 / 14%),
    inset 0 0 48px rgb(25 200 224 / 7%);
}

/* feat-20261029-buzzar-evaluation-layer: the recommended combination and listing answers on the discovery board */
.bzr-voice-combo,
.bzr-voice-answer {
  display: grid;
  gap: 8px;
  overflow-wrap: anywhere;
}

.bzr-voice-combo[hidden],
.bzr-voice-answer[hidden] {
  display: none;
}

.bzr-voice-combo-groups {
  display: grid;
  gap: 10px;
}

.bzr-voice-combo-group {
  display: grid;
  gap: 6px;
}

.bzr-voice-combo h4,
.bzr-voice-combo h5,
.bzr-voice-combo p,
.bzr-voice-combo ul,
.bzr-voice-answer h3,
.bzr-voice-answer p {
  margin: 0;
}

.bzr-voice-combo-gaps ul {
  padding-left: 18px;
}

.bzr-voice-source {
  font-size: 12.5px;
  color: var(--muted);
}

.bzr-voice-answer-text {
  white-space: pre-line;
  line-height: 1.45;
}

/* feat-20261101-buzzar-sami-b-orb round 4: the Solution step takes over the board column once a combination arrives. */
.bzr-sol {
  grid-area: board;
  display: grid;
  align-content: start;
  gap: 12px;
  overflow-wrap: anywhere;
  border-color: color-mix(in srgb, var(--v-user) 55%, var(--v-line));
  box-shadow:
    0 0 0 1px rgb(45 226 230 / 10%),
    0 0 36px rgb(25 200 224 / 12%);
}

.bzr-sol[hidden],
.bzr-sol-open[hidden],
.bzr-voice-live:not([data-view='solution']) .bzr-sol,
.bzr-voice-live[data-view='solution'] .bzr-voice-board {
  display: none;
}

.bzr-sol-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bzr-sol h3,
.bzr-sol h4,
.bzr-sol h5,
.bzr-sol p {
  margin: 0;
}

.bzr-sol-hero {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--v-user) 60%, var(--v-line));
  border-radius: 12px;
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--v-user) 16%, transparent),
    color-mix(in srgb, var(--v-user) 4%, transparent)
  );
}

.bzr-sol-kicker,
.bzr-sol-role {
  justify-self: start;
  padding: 2px 8px;
  border: 1px solid var(--v-user);
  border-radius: 999px;
  color: var(--v-user);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.bzr-sol-summary {
  font-size: 17px;
  line-height: 1.4;
}

.bzr-sol-covers,
.bzr-sol-note,
.bzr-sol-next,
.bzr-sol-caveat,
.bzr-sol-gaps li {
  color: var(--muted);
  line-height: 1.45;
}

.bzr-sol-gaps ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.bzr-sol-items {
  display: grid;
  gap: 8px;
}

.bzr-sol-item {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--v-line);
  border-radius: 10px;
  animation: bzr-voice-in 0.5s ease both;
}

.bzr-sol-item-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.bzr-sol-provider {
  color: var(--muted);
  font-size: 14px;
}

.bzr-sol-item h5 {
  font-size: 16.5px;
}

.bzr-sol-item a {
  justify-self: start;
}

.bzr-sol-open,
.bzr-sol-request {
  justify-self: start;
}

.bzr-sol-sku {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.bzr-sol-sku-mp {
  padding: 1px 8px;
  border: 1px solid var(--v-user);
  border-radius: 999px;
  color: var(--v-user);
  font-size: 12.5px;
  font-weight: 600;
}

.bzr-sol-sku-price {
  font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .bzr-sol-item {
    animation: none;
  }
}
