/* Gamelade Article Video Background v1.0.2 — THREE LEVELS:
   0 video (fixed, NON-negative), 1 site/page, 99990 controls.
   Do not place the background at z-index:-1: it disappears behind theme
   backgrounds/document canvas. Do not paint it over site root either. */
body.gavb-enabled.gavb-live {
    position: relative;
    isolation: isolate;
    background: transparent !important;
}
body.gavb-enabled.gavb-live > .gavb-background {
    position: fixed !important;
    z-index: 0 !important;
}
body.gavb-enabled.gavb-live > .gavb-root {
    position: relative !important;
    z-index: 1 !important;
    isolation: isolate;
}
/* Only identified containers between the page root and article have their
   opaque backgrounds cleared; global header/navigation remain styled. */
body.gavb-enabled.gavb-live .gavb-root,
body.gavb-enabled.gavb-live .gavb-transparent-shell,
body.gavb-enabled.gavb-live .gavb-scope {
    background-color: transparent !important;
    background-image: none !important;
}
/* Preserve hierarchy and clickability: article and widgets are placed above
   moving media via their page root, never by boosting each text element. */
body.gavb-enabled.gavb-live .gavb-article,
body.gavb-enabled.gavb-live .gavb-widget {
    position: relative;
    isolation: isolate;
    background: rgba(255, 255, 255, var(--gavb-glass, .86)) !important;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
/* Transparent only the structural article wrappers that the plugin
   specifically identifies, not colored callouts/ads inside the article. */
body.gavb-enabled.gavb-live .gavb-inner-shell {
    background-color: transparent !important;
    background-image: none !important;
}
body.gavb-enabled.gavb-live .gavb-scope :is(p, h1, h2, h3, h4, h5, h6, li, blockquote) {
    text-shadow: 0 0 1px rgba(255,255,255,.1);
}
.gavb-background {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 0 !important;
    overflow: hidden;
    pointer-events: none !important;
    background: #19141f;
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility .45s ease;
    contain: layout paint;
}
body.gavb-enabled.gavb-live .gavb-background {
    opacity: 1;
    visibility: visible;
}
.gavb-video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: blur(var(--gavb-blur, 2px));
    transform: scale(1.035);
}
.gavb-tint {
    position: absolute;
    inset: 0;
    background: linear-gradient(95deg, rgba(17,11,22,var(--gavb-shade,.62)), rgba(20,12,26,calc(var(--gavb-shade,.62) * .8)) 56%, rgba(17,11,22,var(--gavb-shade,.62)));
}
.gavb-controls, .gavb-restore {
    position: fixed;
    z-index: 99990;
    bottom: max(22px, env(safe-area-inset-bottom));
    right: max(22px, env(safe-area-inset-right));
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(25,10,33,.22);
    background: rgba(255,255,255,.96);
    border: 1px solid rgba(103,53,130,.18);
    color: #32183f;
    font-family: system-ui,-apple-system,'Segoe UI',sans-serif;
    font-size: 12px;
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}
.gavb-controls {
    display: flex;
    gap: 5px;
    align-items: center;
    padding: 6px 7px 6px 12px;
    max-width: calc(100vw - 24px);
}
.gavb-controls[hidden], .gavb-restore[hidden] { display: none !important; }
.gavb-label { font-weight: 750; letter-spacing: .055em; white-space: nowrap; margin-right: 3px; color: #63317d; }
.gavb-controls button, .gavb-restore {
    appearance: none;
    cursor: pointer;
    border: 1px solid #e7daeb;
    border-radius: 9px;
    padding: 8px 10px;
    background: #f8f4fa;
    color: #53256d;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.1;
    touch-action: manipulation;
}
.gavb-controls button:hover, .gavb-restore:hover { background: #eee3f4; }
.gavb-controls button:focus-visible, .gavb-restore:focus-visible { outline: 2px solid #693187; outline-offset: 2px; }
.gavb-state { font-size: 11px; color: #695d72; max-width: 120px; }
.gavb-restore { padding: 10px 14px; }
body.admin-bar .gavb-background { top: 0; }
@media(max-width:768px){
    .gavb-controls {right: 10px;bottom: max(12px,env(safe-area-inset-bottom));padding: 5px;gap: 4px;max-width: calc(100vw - 20px)}
    .gavb-label {display: none}
    .gavb-controls button {padding: 9px 8px;font-size: 11px}
    .gavb-state {display: none}
    .gavb-restore {right:10px;bottom:max(12px,env(safe-area-inset-bottom))}
}
@media(prefers-reduced-motion: reduce){
    .gavb-background {transition:none}
    .gavb-video {filter:none;transform:none}
}
