/* V23 airy controls: glass, volume and a soft glow over the live background.
   Editor screen only. Remove this file to return to the V22 look. */

/* Glass pill: theme toggle */
.editor-open #theme-toggle {
  background: linear-gradient(115deg, rgba(229, 232, 214, .74), rgba(240, 235, 224, .62));
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  backdrop-filter: blur(14px) saturate(1.15);
  box-shadow: inset 0 1px rgba(255, 255, 255, .8), 0 0 0 1px rgba(255, 255, 255, .38),
    0 12px 28px -14px rgba(112, 90, 62, .34);
}
.editor-open #theme-toggle { border-radius: 16px; }
.editor-open #theme-toggle:hover {
  background: linear-gradient(115deg, rgba(222, 228, 205, .84), rgba(236, 232, 218, .74));
}

/* Main button of each screen: a lit, slightly floating capsule */
.editor-open #voice-record-slot #record,
.editor-open #voice-record-slot .recovery-actions button,
.editor-open #voice-record-slot #send-audio,
.editor-open .editor-main-slot > button.primary,
.editor-open .editor-main-slot .recovery-actions button {
  position: relative;
  isolation: isolate;
  border-radius: 32px;
  background: linear-gradient(180deg, #D7E1C9 0%, #C3D1AF 55%, #B3C39C 100%);
  color: #33412A;
  box-shadow: inset 0 1px rgba(255, 255, 255, .92), inset 0 -4px 10px rgba(92, 116, 70, .16),
    0 0 0 1px rgba(255, 255, 255, .5), 0 24px 44px -16px rgba(98, 124, 76, .55),
    0 8px 18px -8px rgba(98, 124, 76, .30), 0 0 36px rgba(218, 232, 200, .55);
  transition: box-shadow .4s ease, background .4s ease, transform .4s ease;
}
.editor-open #voice-record-slot #record:hover:enabled,
.editor-open #voice-record-slot .recovery-actions button:hover:enabled,
.editor-open #voice-record-slot #send-audio:hover:enabled,
.editor-open .editor-main-slot > button.primary:hover:enabled,
.editor-open .editor-main-slot .recovery-actions button:hover:enabled {
  background: linear-gradient(180deg, #DCE5CF 0%, #C8D5B4 55%, #B8C7A1 100%);
}
/* V42: «Прекратить ожидание» is a calm grey capsule; it does not invite a tap. */
.editor-open #voice-record-slot .recovery-actions #stop-wait,
.editor-open .editor-main-slot .recovery-actions #stop-wait {
  background: var(--button-fill);
  color: var(--muted);
  font-weight: 500;
  box-shadow: inset 0 1px rgba(255, 255, 255, .6), 0 10px 22px -16px rgba(0, 0, 0, .35);
}
.editor-open #voice-record-slot .recovery-actions #stop-wait:hover:enabled,
.editor-open .editor-main-slot .recovery-actions #stop-wait:hover:enabled { background: var(--button-hover); }
.editor-open #voice-record-slot #record > * { position: relative; z-index: 1; }
/* glossy upper half */
.editor-open #voice-record-slot #record::before {
  content: ""; position: absolute; inset: 1px 1px 48% 1px; border-radius: 31px 31px 18px 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0));
  pointer-events: none; z-index: 0;
}
/* coloured light pooled under the button */
.editor-open #voice-record-slot #record::after {
  content: ""; position: absolute; left: 10%; right: 10%; bottom: -18px; height: 30px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 178, 118, .5), rgba(150, 178, 118, 0));
  filter: blur(7px); pointer-events: none; z-index: -1;
}

/* Recording: coral, white text. 20 px semibold is large text, so 3:1 is the target;
   the middle of the gradient, where the label sits, gives about 3.2:1. */
.editor-open #voice-record-slot .recorder-panel[data-recording="true"] #record {
  background: linear-gradient(180deg, #F2917B 0%, #E36A56 52%, #D85B48 100%);
  color: #FFFFFF;
  font-size: 1.25rem;
  text-shadow: 0 1px 2px rgba(140, 40, 25, .35);
  box-shadow: inset 0 1px rgba(255, 255, 255, .78), inset 0 -4px 12px rgba(150, 45, 30, .22),
    0 0 0 1px rgba(255, 255, 255, .38), 0 26px 46px -16px rgba(226, 98, 76, .70),
    0 8px 20px -8px rgba(226, 98, 76, .38), 0 0 44px rgba(246, 162, 142, .50);
}
.editor-open #voice-record-slot .recorder-panel[data-recording="true"] #record::after {
  background: radial-gradient(closest-side, rgba(238, 120, 98, .55), rgba(238, 120, 98, 0));
}
.editor-open #voice-record-slot .record-stop {
  background: rgba(255, 255, 255, .26);
  box-shadow: inset 0 1px rgba(255, 255, 255, .65), 0 3px 10px rgba(150, 50, 30, .22);
}
.editor-open #voice-record-slot #record .record-stop rect { rx: 3px; }
.editor-open #voice-record-slot #record .record-stop { width: 46px; height: 46px; padding: 13px; }

/* The light pool under the button breathes while the live background runs.
   The button itself stays still: a moving tap target is harder to hit. */
@keyframes airy-pool { 0%, 100% { opacity: .75; transform: scaleX(.94); } 50% { opacity: 1; transform: scaleX(1.04); } }
:root[data-ambient-running="true"].editor-open #voice-record-slot #record::after { animation: airy-pool 6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
  .editor-open #voice-record-slot #record::after { animation: none !important; }
}

/* Waveform: a faint glow so the bars sit in light, not on top of it */
.editor-open #record-wave { filter: drop-shadow(0 6px 9px rgba(232, 112, 92, .26)); }

/* Dark theme counterparts (V41: the colours come from the variant, «Сумерки» or «Розовое дерево», in dark.css) */
:root[data-theme="dark"].editor-open #theme-toggle {
  background: linear-gradient(115deg, var(--toggle-a), var(--toggle-b));
  box-shadow: inset 0 1px rgba(255,255,255,.06), 0 0 0 1px rgba(255,255,255,.05), 0 12px 28px -14px rgba(0,0,0,.5);
}
:root[data-theme="dark"].editor-open #voice-record-slot #record,
:root[data-theme="dark"].editor-open #voice-record-slot .recovery-actions button,
:root[data-theme="dark"].editor-open #voice-record-slot #send-audio,
:root[data-theme="dark"].editor-open .editor-main-slot > button.primary,
:root[data-theme="dark"].editor-open .editor-main-slot .recovery-actions button {
  background: linear-gradient(180deg, var(--main-0) 0%, var(--main-1) 55%, var(--main-2) 100%);
  color: var(--primary-text);
  box-shadow: inset 0 1px rgba(255,255,255,.7), inset 0 -4px 10px rgba(0,0,0,.12),
    0 24px 44px -16px rgba(0,0,0,.6), 0 0 34px rgba(var(--main-glow), .22);
}
:root[data-theme="dark"].editor-open #voice-record-slot #record::after {
  background: radial-gradient(closest-side, rgba(var(--main-glow), .28), rgba(var(--main-glow), 0));
}
:root[data-theme="dark"].editor-open #voice-record-slot .recorder-panel[data-recording="true"] #record {
  background: linear-gradient(180deg, #F2917B 0%, #E36A56 52%, #D85B48 100%);
  color: #FFFFFF;
  box-shadow: inset 0 1px rgba(255, 255, 255, .6), inset 0 -4px 12px rgba(150, 45, 30, .25),
    0 26px 46px -16px rgba(0, 0, 0, .6), 0 0 40px rgba(240, 130, 105, .30);
}
:root[data-theme="dark"].editor-open #voice-record-slot .recovery-actions #stop-wait,
:root[data-theme="dark"].editor-open .editor-main-slot .recovery-actions #stop-wait {
  box-shadow: inset 0 1px rgba(255, 255, 255, .06), 0 10px 22px -16px rgba(0, 0, 0, .5);
}
