/* GreenChat voice messages — one shared visual system for capture, review and playback.
   Loaded with the app shell so the first microphone press never waits for a CSS request. */

.gc-voice-note-inline {
  --gc-vn-accent: var(--gc-accent);
  --gc-vn-danger: var(--gc-danger);
  --gc-vn-muted: var(--gc-text-muted);
  --gc-voice-drag-x: 0px;
  --gc-voice-drag-y: 0px;
  --gc-voice-cancel-progress: 0;
  --gc-voice-lock-progress: 0;
  width: 100%;
  min-width: 0;
  position: relative;
  z-index: 2;
  color: var(--gc-text);
  animation: gc-vn-enter 190ms cubic-bezier(.2,.85,.25,1) both;
  transform-origin: 50% 100%;
}

.gc-voice-note-inline[hidden],
.gc-voice-note-inline [hidden] {
  display: none !important;
}

.gc-voice-note-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 5px 10px;
  min-height: 70px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid var(--gc-border);
  border-radius: 20px;
  background: var(--gc-panel);
  box-shadow: 0 8px 24px rgba(0,0,0,.11), inset 0 1px 0 rgba(255,255,255,.055);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.gc-voice-note-capture,
.gc-voice-note-playback {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 44px;
}

.gc-voice-note-capture {
  transition: opacity 150ms ease, transform 180ms cubic-bezier(.2,.8,.2,1);
}

.gc-voice-note-visual {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  flex: 1 1 auto;
  min-width: 0;
  height: 42px;
  --gc-voice-level: .08;
}

.gc-voice-note-mic {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid color-mix(in srgb, var(--gc-vn-accent) 24%, var(--gc-border));
  border-radius: 50%;
  color: var(--gc-accent-fg);
  background: var(--gc-accent-grad);
  box-shadow: 0 3px 12px color-mix(in srgb, var(--gc-vn-accent) 18%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  transform: translateZ(0);
}

.gc-voice-note-mic .gc-icon {
  width: 19px;
  height: 19px;
}

.gc-voice-note-mic::before,
.gc-voice-note-mic::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid color-mix(in srgb, var(--gc-vn-accent) 38%, transparent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transform: scale(.82);
}

.gc-voice-note-livebars {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  width: 100%;
  min-width: 0;
  height: 38px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 95%, transparent 100%);
}

.gc-voice-note-livebar {
  display: block;
  flex: 1 1 3px;
  min-width: 2px;
  max-width: 4px;
  height: calc(5px + 26px * var(--gc-bar-level, .08) * var(--gc-bar-factor, .7));
  border-radius: 999px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gc-vn-accent) 65%, white), var(--gc-vn-accent));
  opacity: calc(.52 + var(--gc-bar-level, .08) * .48);
  transform: scaleY(.92);
  transform-origin: center;
  transition: height 90ms linear, opacity 90ms linear;
}

.gc-voice-note-meta {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-width: 76px;
  max-width: 122px;
}

.gc-voice-note-state {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  width: 100%;
  min-width: 0;
}

.gc-voice-note-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--gc-vn-muted);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-vn-muted) 12%, transparent);
}

.gc-voice-note-status {
  min-width: 0;
  overflow: hidden;
  color: var(--gc-vn-muted);
  font-size: 10px;
  font-weight: 760;
  line-height: 1.15;
  letter-spacing: .02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-voice-note-time {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.gc-voice-note-clock {
  color: var(--gc-text);
  font-size: 18px;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -.045em;
}

.gc-voice-note-limit {
  color: var(--gc-vn-muted);
  font-size: 10px;
  font-weight: 650;
}

.gc-voice-note-gesture {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 1px 1px 0;
  color: var(--gc-vn-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  animation: gc-vn-hint-in 160ms ease both;
  user-select: none;
  -webkit-user-select: none;
}

.gc-voice-note-gesture-cancel-icon {
  transform: translateX(calc(var(--gc-voice-drag-x) * .09)) scale(calc(1 + var(--gc-voice-cancel-progress) * .12));
}

.gc-voice-note-lock-glyph {
  transform: translateY(calc(var(--gc-voice-drag-y) * .09)) scale(calc(1 + var(--gc-voice-lock-progress) * .12));
}

.gc-voice-note-gesture-cancel,
.gc-voice-note-gesture-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
  transition: color 140ms ease, transform 140ms ease;
}

.gc-voice-note-gesture-cancel-icon,
.gc-voice-note-lock-glyph {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.gc-voice-note-gesture-cancel-icon .gc-icon,
.gc-voice-note-lock-glyph .gc-icon {
  width: 13px;
  height: 13px;
}

.gc-voice-note-lock-target {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  border: 1px solid var(--gc-border);
  border-radius: 7px;
  background: color-mix(in srgb, var(--gc-text) 5%, transparent);
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.gc-voice-note-close {
  position: static;
  grid-column: 2;
  grid-row: 1;
  z-index: 3;
  display: grid;
  place-items: center;
  justify-self: end;
  align-self: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--gc-border);
  border-radius: 12px;
  color: var(--gc-vn-muted);
  background: color-mix(in srgb, var(--gc-panel-solid) 82%, transparent);
  transition: color 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-note-close .gc-icon {
  width: 16px;
  height: 16px;
}

.gc-voice-note-close:active {
  color: var(--gc-danger);
  background: var(--gc-danger-soft);
  transform: scale(.94);
}

.gc-voice-note-playback {
  gap: 10px;
}

.gc-voice-note-play {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--gc-vn-accent) 28%, transparent);
  border-radius: 50%;
  color: var(--gc-accent-fg);
  background: var(--gc-accent-grad);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gc-vn-accent) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-note-play .gc-icon {
  width: 18px;
  height: 18px;
}

.gc-voice-note-play:active {
  transform: scale(.92);
}

.gc-voice-note-play:disabled {
  opacity: .55;
  filter: saturate(.6);
}

.gc-voice-note-playback-main {
  display: grid;
  flex: 1 1 auto;
  grid-template-rows: 30px auto;
  gap: 3px;
  min-width: 0;
}

.gc-voice-note-preview-wave {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5px;
  width: 100%;
  min-width: 0;
  height: 30px;
  overflow: hidden;
  border-radius: 8px;
}

.gc-voice-note-preview-bar {
  display: block;
  flex: 1 1 2px;
  min-width: 2px;
  max-width: 4px;
  height: calc(5px + 22px * var(--gc-preview-level, .18));
  border-radius: 999px;
  background: var(--gc-vn-muted);
  opacity: .42;
  transition: height 120ms ease, opacity 120ms ease, background-color 120ms ease;
}

.gc-voice-note-preview-bar.is-played {
  background: var(--gc-vn-accent);
  opacity: .96;
}

.gc-voice-note-seek {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  touch-action: pan-y;
}

.gc-voice-note-seek:focus-visible {
  outline: 2px solid var(--gc-vn-accent);
  outline-offset: -2px;
  opacity: .12;
}

.gc-voice-note-playback-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  color: var(--gc-vn-muted);
  font-size: 10px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.gc-voice-note-review-status,
.gc-voice-note-error {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--gc-vn-muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-voice-note-error {
  color: var(--gc-vn-danger);
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.gc-voice-note-actions {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  min-width: 0;
}

.gc-voice-note-record,
.gc-voice-note-retry {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  padding: 0;
  border: 1px solid var(--gc-border);
  border-radius: 50%;
  color: var(--gc-text);
  background: color-mix(in srgb, var(--gc-text) 5%, transparent);
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-note-record .gc-icon,
.gc-voice-note-retry .gc-icon {
  width: 18px;
  height: 18px;
}

.gc-voice-note-record:active,
.gc-voice-note-retry:active {
  transform: scale(.92);
}

.gc-voice-note-inline[data-phase="ready"] .gc-voice-note-record {
  color: var(--gc-accent-fg);
  border-color: transparent;
  background: var(--gc-accent-grad);
}

.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-record,
.gc-voice-note-inline.is-locked .gc-voice-note-record {
  color: #fff;
  border-color: color-mix(in srgb, var(--gc-vn-danger) 40%, transparent);
  background: var(--gc-vn-danger);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gc-vn-danger) 22%, transparent);
}

.gc-voice-note-retake {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--gc-border);
  border-radius: 12px;
  color: var(--gc-vn-muted);
  background: color-mix(in srgb, var(--gc-text) 4%, transparent);
  font-size: 11px;
  font-weight: 700;
  transition: transform 150ms ease, color 150ms ease, background 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-note-retake .gc-icon {
  width: 15px;
  height: 15px;
}

.gc-voice-note-retake:active {
  color: var(--gc-vn-danger);
  background: var(--gc-danger-soft);
  transform: scale(.94);
}

.gc-voice-note-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 42px;
  height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 13px;
  color: var(--gc-accent-fg);
  background: var(--gc-accent-grad);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gc-vn-accent) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 11px;
  font-weight: 800;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-note-send .gc-icon {
  width: 16px;
  height: 16px;
}

.gc-voice-note-send:active {
  transform: scale(.94);
}

.gc-voice-note-send:disabled,
.gc-voice-note-retake:disabled,
.gc-voice-note-record:disabled,
.gc-voice-note-retry:disabled {
  opacity: .48;
  cursor: default;
}

.gc-voice-note-progress {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gc-text) 10%, transparent);
}

.gc-voice-note-progress-fill {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--gc-vn-accent) 55%, white), var(--gc-vn-accent));
  box-shadow: 0 0 12px color-mix(in srgb, var(--gc-vn-accent) 30%, transparent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 160ms linear;
}

.gc-voice-note-inline[data-phase="starting"] .gc-voice-note-dot,
.gc-voice-note-inline[data-phase="finalizing"] .gc-voice-note-dot {
  background: var(--gc-vn-accent);
  animation: gc-vn-dot-pulse 1s ease-in-out infinite;
}

.gc-voice-note-inline[data-phase="starting"] .gc-voice-note-mic::before,
.gc-voice-note-inline[data-phase="finalizing"] .gc-voice-note-mic::before {
  animation: gc-vn-mic-ring 1.25s ease-out infinite;
}

.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-dot {
  background: var(--gc-vn-danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gc-vn-danger) 14%, transparent);
  animation: gc-vn-dot-pulse .9s ease-in-out infinite;
}

.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-mic::before,
.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-mic::after {
  border-color: color-mix(in srgb, var(--gc-vn-danger) 42%, transparent);
  animation: gc-vn-mic-ring 1.35s ease-out infinite;
}

.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-mic::after {
  animation-delay: .55s;
}

.gc-voice-note-inline[data-phase="recording"] .gc-voice-note-livebar {
  animation: gc-vn-live-breathe 1.05s ease-in-out infinite;
  animation-delay: calc(var(--gc-bar-index, 0) * -34ms);
}

.gc-voice-note-inline.is-locked .gc-voice-note-panel {
  border-color: color-mix(in srgb, var(--gc-vn-accent) 42%, var(--gc-border));
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--gc-vn-accent) 9%, transparent), transparent);
  box-shadow: 0 8px 26px rgba(0,0,0,.12), 0 0 0 1px color-mix(in srgb, var(--gc-vn-accent) 8%, transparent);
}

.gc-voice-note-inline.is-locked .gc-voice-note-status {
  color: var(--gc-vn-accent);
}

.gc-voice-note-inline.is-locked .gc-voice-note-gesture {
  display: none;
}

.gc-voice-note-inline.is-cancel-armed .gc-voice-note-panel {
  border-color: color-mix(in srgb, var(--gc-vn-danger) 55%, var(--gc-border));
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--gc-vn-danger) 12%, transparent), transparent);
}

.gc-voice-note-inline.is-cancel-armed .gc-voice-note-gesture-cancel {
  color: var(--gc-vn-danger);
  transform: translateX(-2px);
}

.gc-voice-note-inline.is-lock-armed .gc-voice-note-gesture-lock {
  color: var(--gc-vn-accent);
  transform: translateY(-1px);
}

.gc-voice-note-inline.is-lock-armed .gc-voice-note-lock-target {
  border-color: color-mix(in srgb, var(--gc-vn-accent) 55%, var(--gc-border));
  background: color-mix(in srgb, var(--gc-vn-accent) 14%, transparent);
  transform: scale(1.08);
}

.gc-voice-note-inline.is-finalizing .gc-voice-note-panel {
  border-color: color-mix(in srgb, var(--gc-vn-accent) 38%, var(--gc-border));
}

.gc-voice-note-inline.is-quick-sending .gc-voice-note-capture {
  opacity: .96;
}

.gc-voice-note-inline.is-quick-sending .gc-voice-note-status {
  color: var(--gc-vn-accent);
}

.gc-voice-note-inline.is-sending .gc-voice-note-panel {
  border-color: color-mix(in srgb, var(--gc-vn-accent) 34%, var(--gc-border));
}

.gc-voice-note-inline.is-preview-playing .gc-voice-note-play {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc-vn-accent) 12%, transparent), 0 4px 16px color-mix(in srgb, var(--gc-vn-accent) 22%, transparent);
}

.gc-voice-note-inline[data-phase="error"] .gc-voice-note-panel {
  border-color: color-mix(in srgb, var(--gc-vn-danger) 35%, var(--gc-border));
}

.gc-voice-note-inline[data-phase="error"] .gc-voice-note-error {
  color: var(--gc-vn-danger);
}

.gc-voice-note-close:focus-visible,
.gc-voice-note-play:focus-visible,
.gc-voice-note-record:focus-visible,
.gc-voice-note-retry:focus-visible,
.gc-voice-note-retake:focus-visible,
.gc-voice-note-send:focus-visible {
  outline: 2px solid var(--gc-vn-accent);
  outline-offset: 3px;
}

/* Received voice messages share the same transport, waveform and accent language. */
.gc-voice {
  --gc-vn-accent: var(--gc-accent);
  --gc-vn-muted: var(--gc-text-muted);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 7px 10px;
  width: min(360px, 78vw);
  min-width: min(220px, 78vw);
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, currentColor 10%, transparent);
  border-radius: 18px;
  background: color-mix(in srgb, currentColor 5%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.gc-voice.is-playing {
  border-color: color-mix(in srgb, var(--gc-vn-accent) 34%, var(--gc-border));
  background-image: linear-gradient(135deg, color-mix(in srgb, var(--gc-vn-accent) 7%, transparent), transparent);
}

.gc-voice-play {
  position: relative;
  grid-column: 1;
  grid-row: 1 / 3;
  align-self: center;
  justify-self: center;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--gc-vn-accent) 28%, transparent);
  border-radius: 50%;
  color: var(--gc-accent-fg);
  background: var(--gc-accent-grad);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--gc-vn-accent) 20%, transparent), inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
  -webkit-tap-highlight-color: transparent;
}

.gc-voice-play::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: inherit;
}

.gc-voice-play .gc-voice-glyph {
  display: block;
  width: 18px;
  height: 18px;
  margin-left: 1.5px;
}

.gc-voice-play.is-playing .gc-voice-glyph {
  margin-left: 0;
}

.gc-voice-play:active {
  transform: scale(.92);
}

.gc-voice-play:focus-visible,
.gc-speed-btn:focus-visible {
  outline: 2px solid var(--gc-vn-accent);
  outline-offset: 3px;
}

.gc-voice.is-playing .gc-voice-play {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--gc-vn-accent) 13%, transparent), 0 4px 16px color-mix(in srgb, var(--gc-vn-accent) 22%, transparent);
}

.gc-wave {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2.5px;
  width: 100%;
  height: 34px;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.gc-wave-bar {
  display: block;
  flex: 1 1 2px;
  min-width: 2px;
  max-width: 4px;
  height: 30%;
  border-radius: 999px;
  background: var(--gc-vn-muted);
  opacity: .42;
  transition: opacity 120ms ease, height 120ms ease, background-color 120ms ease;
}

.gc-wave-bar.is-played {
  background: var(--gc-vn-accent);
  opacity: .96;
}

.gc-voice-seek {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  touch-action: pan-y;
}

.gc-wave:focus-within {
  outline: 2px solid color-mix(in srgb, var(--gc-vn-accent) 65%, transparent);
  outline-offset: 2px;
}

.gc-voice-footer {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 3px 8px;
  width: 100%;
  min-width: 0;
  color: var(--gc-vn-muted);
}

.gc-voice-clock {
  min-width: 0;
  overflow: hidden;
  color: var(--gc-vn-muted);
  font-size: var(--gc-fs-12, 12px);
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gc-speed-btn {
  min-height: 25px;
  padding: 2px 8px;
  border: 1px solid var(--gc-border);
  border-radius: 9px;
  color: var(--gc-vn-muted);
  background: color-mix(in srgb, var(--gc-text) 5%, transparent);
  font-size: var(--gc-fs-11, 11px);
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.gc-speed-btn:active {
  color: var(--gc-text);
  background: color-mix(in srgb, var(--gc-text) 10%, transparent);
  transform: scale(.95);
}

.gc-voice > .gc-media-error {
  grid-column: 1 / -1;
  min-width: 0;
}

@keyframes gc-vn-enter {
  from { opacity: 0; transform: translateY(7px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes gc-vn-hint-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes gc-vn-dot-pulse {
  0%, 100% { opacity: .72; transform: scale(.92); }
  50% { opacity: 1; transform: scale(1.12); }
}

@keyframes gc-vn-mic-ring {
  0% { opacity: .58; transform: scale(.82); }
  100% { opacity: 0; transform: scale(1.42); }
}

@keyframes gc-vn-live-breathe {
  0%, 100% { transform: scaleY(.82); }
  50% { transform: scaleY(1.16); }
}

@media (max-width: 560px) {
  .gc-voice-note-panel {
    gap: 4px 8px;
    min-height: 66px;
    padding: 8px 9px;
    border-radius: 18px;
  }

  .gc-voice-note-visual {
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 7px;
  }

  .gc-voice-note-mic {
    width: 35px;
    height: 35px;
    flex-basis: 35px;
  }

  .gc-voice-note-meta {
    min-width: 66px;
    max-width: 92px;
  }

  .gc-voice-note-status {
    font-size: 9px;
  }

  .gc-voice-note-clock {
    font-size: 16px;
  }

  .gc-voice-note-actions {
    gap: 5px;
  }

  .gc-voice-note-play {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  .gc-voice-note-record,
  .gc-voice-note-retry {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .gc-voice-note-send {
    min-width: 38px;
    height: 36px;
    padding: 0 10px;
  }

  .gc-voice-note-send span,
  .gc-voice-note-retake span {
    display: none;
  }

  .gc-voice-note-retake {
    width: 36px;
    height: 36px;
    padding: 0;
  }

  .gc-voice-note-gesture {
    font-size: 9px;
  }

  .gc-voice {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 6px 8px;
    width: min(340px, 84vw);
    min-width: min(210px, 84vw);
    padding: 9px 10px;
    border-radius: 18px;
  }

  .gc-voice-play {
    width: 40px;
    height: 40px;
  }

  .gc-wave {
    height: 32px;
  }
}

@media (max-width: 380px) {
  .gc-voice-note-panel {
    gap: 3px 6px;
    padding-inline: 8px;
  }

  .gc-voice-note-visual {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 6px;
  }

  .gc-voice-note-mic {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .gc-voice-note-meta {
    min-width: 58px;
    max-width: 76px;
  }

  .gc-voice-note-clock {
    font-size: 15px;
  }

  .gc-voice-note-livebars {
    gap: 2px;
  }

  .gc-voice-note-livebar {
    flex-basis: 2.5px;
  }

  .gc-voice {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 5px 7px;
    padding: 8px;
  }

  .gc-voice-play {
    width: 38px;
    height: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gc-voice-note-gesture-cancel-icon,
  .gc-voice-note-lock-glyph {
    transform: none !important;
  }

  .gc-voice-note-inline,
  .gc-voice-note-gesture,
  .gc-voice-note-dot,
  .gc-voice-note-mic::before,
  .gc-voice-note-mic::after,
  .gc-voice-note-livebar {
    animation: none !important;
  }

  .gc-voice-note-panel,
  .gc-voice-note-capture,
  .gc-voice-note-close,
  .gc-voice-note-play,
  .gc-voice-note-record,
  .gc-voice-note-retry,
  .gc-voice-note-retake,
  .gc-voice-note-send,
  .gc-voice-note-progress-fill,
  .gc-voice,
  .gc-voice-play,
  .gc-speed-btn {
    transition: none !important;
  }
}
