/* ── Audio tool local styles ── */

/* Inherit .conv card style from theme.css */
.audio-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px;
  margin: 0 0 18px;
  box-shadow: var(--shadow-sm);
}

.audio-section h3 {
  margin: 0 0 16px;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.audio-section h3::before {
  content: "";
  width: 6px;
  height: 18px;
  border-radius: 3px;
  background: var(--accent);
  flex: none;
}

/* Frequency row: slider takes most space, number input is compact */
.freq-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.freq-row input[type="range"] {
  flex: 1;
  min-width: 140px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  cursor: pointer;
  accent-color: var(--accent);
}
.freq-row input[type="range"]:focus {
  outline: none;
  box-shadow: none;
}

.freq-row .freq-num {
  width: 96px;
  min-width: 80px;
  flex: none;
  text-align: right;
}

.freq-display {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text-2);
  min-width: 68px;
  flex: none;
}

/* Controls row: selects + button */
.tone-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
}
.tone-controls .field {
  flex: 1;
  min-width: 130px;
  margin: 0;
}
.tone-controls .field label {
  white-space: nowrap;
}

/* Stop state for play/stop buttons */
.btn-stop {
  background: var(--danger);
  border-color: transparent;
  color: #fff;
}
.btn-stop:hover {
  background: var(--danger-soft-2);
  color: var(--danger);
}

/* Mic section */
.mic-meter-wrap {
  margin: 16px 0 8px;
}

.mic-meter-wrap .meter-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.mic-reading {
  font-family: var(--mono);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  margin-top: 12px;
}

/* Permission prompt -- using .perm-prompt from theme.css, just add margin */
.perm-prompt {
  margin-bottom: 14px;
}

/* Unavailable fallback */
.audio-unavailable {
  color: var(--text-2);
  font-size: 14.5px;
  padding: 18px 0;
}

/* Responsive */
@media (max-width: 560px) {
  .audio-section {
    padding: 16px;
  }
  .tone-controls {
    flex-direction: column;
    align-items: stretch;
  }
  .tone-controls .field {
    min-width: 0;
  }
}
