/* Any AI? Homepage voice controls — final single-row replacement (v3).
   Scoped to the existing home composer; no speech/search logic is changed. */

/* Secondary microphone: quieter than the primary choice button from first load. */
.lh-page .aiai-compact-composer .aiai-voice-button,
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="idle"],
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="listening"] {
  background:rgba(250,249,246,.42);
  border-color:#edece8;
  color:#8c9692;
  box-shadow:none;
}
.lh-page .aiai-compact-composer .aiai-voice-button svg {
  width:18px;height:18px;stroke-width:1.65;
}
@media(hover:hover) and (pointer:fine){
  .lh-page .aiai-compact-composer .aiai-voice-button[data-state="idle"]:hover {
    background:#f5f5f1;
    border-color:#e1e3dd;
    color:#5c6a64;
  }
}
/* Ensure the search action remains the clear primary affordance, even when idle. */
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="idle"],
.lh-page .aiai-compact-composer .aiai-search-action.lh-primary-button[data-state="idle"]:hover {
  background:linear-gradient(155deg,#fdfcf9 0%,#efede8 100%);
  border-color:#d7d6d0;
  color:#444e49;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.97),0 1px 3px rgba(28,34,28,.055);
}
/* Dictation uses the same action row and microphone button as typing. */
.lh-page .aiai-compact-composer .aiai-record-panel:not([hidden]) {
  display:flex;
  flex:1 1 0;
  align-items:center;
  gap:6px;
  min-inline-size:0;
  height:44px;
}
.lh-page .aiai-compact-composer .aiai-record-cancel:not([hidden]) {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  height:44px;
  margin-inline-end:auto;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  color:#67716B;
}
.lh-page .aiai-compact-composer .aiai-record-cancel svg {
  width:17px;
  height:17px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
}
@media (hover:hover) and (pointer:fine) {
  .lh-page .aiai-compact-composer .aiai-record-cancel:hover {
    background:#F0EFE9;
    color:#263C31;
  }
}
.lh-page .aiai-compact-composer .aiai-record-status,
.lh-page .aiai-compact-composer .aiai-record-time {
  min-inline-size:0;
  color:#4F6257;
  font-size:12px;
  line-height:1.25;
}
.lh-page .aiai-compact-composer .aiai-record-time {
  font-weight:600;
  font-variant-numeric:tabular-nums;
  white-space:nowrap;
}
.lh-page .aiai-compact-composer .aiai-record-time:not([hidden]) + .aiai-record-status {
  display:none;
}
.lh-page .aiai-compact-composer .aiai-record-wave {
  display:none;
  flex:0 0 auto;
  align-items:center;
  gap:3px;
  height:24px;
  margin-inline-end:3px;
}
.lh-page .aiai-compact-composer[data-aiai-mode="recording"] .aiai-record-wave {
  display:flex;
}
.lh-page .aiai-compact-composer .aiai-record-wave i {
  --aiai-bar-peak:.42;
  width:2px;
  height:22px;
  border-radius:2px;
  background:#73897C;
  transform:scaleY(calc(.17 + var(--aiai-voice-level, 0) * var(--aiai-bar-peak)));
  transition:transform 110ms ease-out;
}
.lh-page .aiai-compact-composer .aiai-record-wave i:is(:nth-child(2), :nth-child(6)) {
  --aiai-bar-peak:.62;
}
.lh-page .aiai-compact-composer .aiai-record-wave i:is(:nth-child(3), :nth-child(5)) {
  --aiai-bar-peak:.76;
}
.lh-page .aiai-compact-composer .aiai-record-wave i:nth-child(4) {
  --aiai-bar-peak:.83;
}
.lh-page .aiai-compact-composer .aiai-composer-actions .aiai-voice-button[data-state="listening"] {
  border-color:transparent;
  background:transparent;
  box-shadow:none;
  color:#FFFDF9;
}
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="listening"]::before {
  content:"";
  position:absolute;
  inset:2px;
  border-radius:50%;
  background:#163B2C;
  pointer-events:none;
}
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="listening"] svg {
  position:relative;
}
.lh-page .aiai-compact-composer .aiai-voice-button[data-state="listening"] .aiai-voice-glyph--stop {
  fill:currentColor;
}
@media (max-width:350px) {
  .lh-page .aiai-compact-composer .aiai-record-panel {
    gap:4px;
  }
  .lh-page .aiai-compact-composer .aiai-record-wave {
    gap:2px;
    margin-inline-end:0;
  }
}
@media (prefers-reduced-motion:reduce) {
  .lh-page .aiai-compact-composer .aiai-record-wave i {
    transform:scaleY(.30);
    transition:none;
  }
}
