/* Audio recording modal — matches RealBoard add/edit modals */

#audioRecording .audio-record-dialog {
  max-width: min(420px, calc(100vw - 32px));
  margin: 1.5rem auto;
}

#audioRecording .audio-record-content,
#audioRecording .modal-content {
  border: none !important;
  border-radius: 16px !important;
  background: #fff !important;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

#audioRecording .audio-record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #eef0f4;
}

#audioRecording .audio-record-title-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

#audioRecording .audio-record-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #dc2626;
  flex-shrink: 0;
}

#audioRecording .audio-record-icon .material-symbols-outlined {
  font-size: 24px;
}

#audioRecording .audio-record-heading h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0f172a;
  line-height: 1.3;
}

#audioRecording .audio-record-heading p {
  margin: 4px 0 0;
  font-size: 0.8125rem;
  color: #8b93a7;
}

#audioRecording .audio-record-close {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

#audioRecording .audio-record-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

#audioRecording .audio-record-close .material-symbols-outlined {
  font-size: 18px;
}

#audioRecording .audio-record-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 24px 8px;
}

#audioRecording .audio-record-visual {
  position: relative;
  width: 112px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

#audioRecording .audio-record-pulse {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 2px solid rgba(220, 38, 38, 0.28);
  opacity: 0.7;
}

#audioRecording .audio-record-body.is-live .audio-record-pulse {
  animation: audio-pulse 1.8s ease-out infinite;
}

#audioRecording .audio-record-body.is-live .audio-record-pulse.is-delayed {
  animation-delay: 0.6s;
}

#audioRecording .audio-record-mic {
  position: relative;
  z-index: 1;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(220, 38, 38, 0.28);
}

#audioRecording .audio-record-mic .material-symbols-outlined {
  font-size: 32px;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

#audioRecording .audio-record-time {
  font-size: 2rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  line-height: 1.1;
}

#audioRecording .audio-record-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #dc2626;
}

#audioRecording .audio-record-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
}

#audioRecording .audio-record-body.is-live .audio-record-dot {
  animation: audio-dot 1s ease-in-out infinite;
}

#audioRecording .audio-record-wave {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 36px;
  margin-top: 18px;
}

#audioRecording .audio-record-wave span {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: #cbd5e1;
  transform-origin: center bottom;
}

#audioRecording .audio-record-body.is-live .audio-record-wave span {
  background: #635bff;
}

#audioRecording .audio-record-hint {
  margin: 16px 0 0;
  max-width: 320px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #94a3b8;
}

#audioRecording .audio-record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px 22px 22px;
  border-top: 1px solid #eef0f4;
}

#audioRecording .audio-record-btn {
  min-width: 92px;
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  background: #635bff;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}

#audioRecording .audio-record-btn:hover:not(:disabled) {
  background: #5249f0;
}

#audioRecording .audio-record-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

#audioRecording .audio-record-btn.is-ghost {
  background: #fff;
  border: 1.5px solid #e5e7eb;
  color: #374151;
  font-weight: 500;
}

#audioRecording .audio-record-btn.is-ghost:hover {
  background: #f9fafb;
}

@keyframes audio-pulse {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  100% {
    transform: scale(1.45);
    opacity: 0;
  }
}

@keyframes audio-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

html[data-theme="dark"] #audioRecording .audio-record-content,
html[data-theme="dark"] #audioRecording .modal-content {
  background: var(--rl-surface, #1e293b) !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  border: 1px solid var(--rl-border, #334155) !important;
}

html[data-theme="dark"] #audioRecording .audio-record-header,
html[data-theme="dark"] #audioRecording .audio-record-actions {
  border-color: var(--rl-border, #334155);
}

html[data-theme="dark"] #audioRecording .audio-record-icon {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

html[data-theme="dark"] #audioRecording .audio-record-heading h4,
html[data-theme="dark"] #audioRecording .audio-record-time {
  color: #f1f5f9;
}

html[data-theme="dark"] #audioRecording .audio-record-heading p,
html[data-theme="dark"] #audioRecording .audio-record-hint {
  color: #94a3b8;
}

html[data-theme="dark"] #audioRecording .audio-record-close {
  background: #334155;
  color: #94a3b8;
}

html[data-theme="dark"] #audioRecording .audio-record-close:hover {
  background: #475569;
  color: #f1f5f9;
}

html[data-theme="dark"] #audioRecording .audio-record-wave span {
  background: #475569;
}

html[data-theme="dark"] #audioRecording .audio-record-body.is-live .audio-record-wave span {
  background: #818cf8;
}

html[data-theme="dark"] #audioRecording .audio-record-btn.is-ghost {
  background: transparent;
  border-color: #475569;
  color: #e2e8f0;
}

html[data-theme="dark"] #audioRecording .audio-record-btn.is-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}
