/* Apex Bio · плеер озвучки статей (02.10.2026): оболочка «звук без обрыва», мини-плеер и кнопки «Слушать» на карточках
   главной. Подключается вместе с listen.js на статьях и на главной (functions.php). */

/* ---------- оболочка «звук без обрыва» (listen.js): страница сайта в рамке поверх статьи и мини-плеер внизу (.apx-player: имя .apx-mini занято кнопками окна консультанта, chat.css) ----------
   Пока рамка открыта, сама статья под ней не прокручивается; круглая кнопка консультанта статьи прячется — в рамке своя. */
html.apx-shelled,html.apx-shelled body{overflow:hidden}
html.apx-shelled .apx-chat-fab,html.apx-shelled .apx-chat{display:none!important}
.apx-shell{position:fixed;left:0;right:0;top:0;bottom:calc(64px + env(safe-area-inset-bottom));z-index:2147483000;width:100%;
  height:calc(100% - 64px - env(safe-area-inset-bottom));border:0;background:var(--bg)}
.apx-player{position:fixed;left:0;right:0;bottom:0;z-index:2147483001;display:flex;align-items:center;gap:10px;
  height:calc(64px + env(safe-area-inset-bottom));padding:0 max(12px,env(safe-area-inset-right)) env(safe-area-inset-bottom) max(12px,env(safe-area-inset-left));
  background:oklch(17% .04 252 / .97);border-top:1px solid var(--glass-line);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);
  font-family:var(--fb);color:var(--text)}
.apx-player button{-webkit-tap-highlight-color:transparent;cursor:pointer}
.apx-player .mp{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;color:var(--ink);
  background:linear-gradient(180deg,oklch(91% .06 218) 0%,oklch(80% .11 222) 100%)}
.apx-player .mp svg{width:18px;height:18px}
.apx-player .mp .i-play{fill:currentColor;margin-left:2px}
.apx-player .mp .i-pause{display:none;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}
.apx-player.on .mp .i-play{display:none}
.apx-player.on .mp .i-pause{display:block}
.apx-player .mt{flex:1 1 auto;min-width:0;display:grid;gap:8px;padding:6px 0;border:0;background:none;color:inherit;text-align:left}
.apx-player .mt b{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font:500 .82rem/1.25 var(--fb)}
.apx-player .mtrack{position:relative;display:block;height:3px;border-radius:2px;background:oklch(96% .01 230 / .2);overflow:hidden}
.apx-player .mtrack i{position:absolute;inset:0;background:var(--sky-2);transform:scaleX(0);transform-origin:left center}
.apx-player .mx{flex:none;display:grid;place-items:center;width:44px;height:44px;padding:0;border:0;border-radius:50%;background:none;color:var(--muted)}
.apx-player .mx svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.apx-player .mp:active,.apx-player .mx:active{transform:scale(.94)}

/* мини-плеер на странице без рамки (главная): страница получает запас снизу, консультант поднимается над плеером */
html.apx-playing{--apx-chat-lift:64px}
html.apx-playing body{padding-bottom:calc(64px + env(safe-area-inset-bottom))}

/* ---------- «Слушать» на карточках «Разбираемся вместе» (front-page.php): пилюля на кадре статьи ---------- */
.a-cell{position:relative;display:grid}
.a-cell>.a{height:100%}
.a-listen{position:absolute;left:12px;top:12px;z-index:2;display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 16px 0 6px;
  border:1px solid var(--glass-line);border-radius:var(--pill);cursor:pointer;color:var(--text);
  background:oklch(15% .035 250 / .62);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px);
  font:500 .72rem/1 var(--fb);letter-spacing:.12em;text-transform:uppercase;-webkit-tap-highlight-color:transparent}
.a-listen i{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;color:var(--ink);
  background:linear-gradient(180deg,oklch(91% .06 218) 0%,oklch(80% .11 222) 100%)}
.a-listen svg{width:14px;height:14px}
.a-listen .i-play{fill:currentColor;margin-left:2px}
.a-listen .i-pause{display:none;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round}
.a-listen.on .i-play{display:none}
.a-listen.on .i-pause{display:block}
.a-listen:active{transform:scale(.96)}
@media (hover:hover){.a-listen:hover{border-color:var(--sky)}}
