/* --- AOnePlayer for AIO Video - the look: its name on the player, themes, ambient light, the right-click menu.   Author: MD OMAR FARUK | www.faruk.bd | Copyright (c) 2026 --- */

/* ---------------------------------------------------------- the AOnePlayer name */
.aone-brand {
    position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; max-width: 46%;
    padding: 4px 10px 4px 5px; border-radius: 20px; background: rgba(0, 0, 0, .38);
    color: #fff !important; text-decoration: none !important; font: 700 12px/1 "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
    letter-spacing: .01em; white-space: nowrap; opacity: var(--aone-brand-o, .85); pointer-events: auto;
    transition: opacity .25s ease, background .2s ease, top .2s ease;
}
.aone-brand:hover { opacity: 1; background: rgba(0, 0, 0, .62); }
.aone-brand .aone-brand-ico, .aone-brand img { width: 18px; height: 18px; flex: 0 0 18px; display: block; border-radius: 4px; }
.aone-brand span { overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.aone-brand:not(:has(span)) { padding: 4px; }
.aone-brand.at-top-left     { left: 12px;  top: 12px; }
.aone-brand.at-top-right    { right: 12px; top: 12px; }
.aone-brand.at-bottom-left  { left: 12px;  bottom: 74px; }
.aone-brand.at-bottom-right { right: 12px; bottom: 74px; }
/* it fades with the controls, and gives way to what is more important */
.aiop.is-idle .aone-brand, .aiop.is-break .aone-brand, .aiop.is-lband .aone-brand, .aiop.is-yt-pick .aone-brand,
.aiop.is-break-on .aone-brand, .aiop:has(.aiop-card-teaser.on) .aone-brand.at-top-right { opacity: 0; pointer-events: none; }
.aiop.has-cards .aone-brand.at-top-right { top: 56px; }
.aiop.needs-sound .aone-brand.at-top-left { top: 58px; }
.aiop.is-mini .aone-brand, .aiop.is-shorts .aone-brand { padding: 4px; }
.aiop.is-mini .aone-brand span, .aiop.is-shorts .aone-brand span { display: none; }
.aiop.is-mini .aone-brand.at-top-right { right: 44px; }
@container aiop (max-width: 560px) {
    .aone-brand.at-bottom-left, .aone-brand.at-bottom-right { bottom: 66px; }
}
@container aiop (max-width: 380px) {
    .aone-brand { font-size: 11px; padding: 3px 8px 3px 4px; gap: 5px; }
    .aone-brand .aone-brand-ico, .aone-brand img { width: 16px; height: 16px; flex-basis: 16px; }
    .aone-brand.at-top-left, .aone-brand.at-top-right { top: 8px; }
    .aone-brand.at-top-left, .aone-brand.at-bottom-left { left: 8px; }
    .aone-brand.at-top-right, .aone-brand.at-bottom-right { right: 8px; }
    .aone-brand.at-bottom-left, .aone-brand.at-bottom-right { bottom: 66px; }
    .aiop.has-cards .aone-brand.at-top-right { top: 52px; }
}
@container aiop (max-width: 260px) {
    .aone-brand span { display: none; }
    .aone-brand { padding: 3px; }
}

/* ---------------------------------------------------------- themes */
.aiop.aone-themed { --aone-accent2: var(--aiop-red); }
.aiop.aone-themed .aiop-scrub .played { background: linear-gradient(90deg, var(--aiop-red), var(--aone-accent2)); }
.aiop.aone-themed .aiop-menu { background: var(--aone-menu, rgba(28, 28, 28, .96)); }
.aiop.aone-themed .aiop-btn:hover svg { fill: var(--aone-accent2); }
.aiop.aone-glow .aiop-scrub .played { box-shadow: 0 0 10px var(--aiop-red), 0 0 18px var(--aone-accent2); }
.aiop.aone-glow .aiop-start svg { filter: drop-shadow(0 0 14px var(--aiop-red)); }

/* the modern skin: a floating glass bar */
.aiop.aone-skin-modern .aiop-bar {
    margin: 0 12px 12px; padding: 2px 10px 2px; border-radius: 16px; background: var(--aone-bg, rgba(15, 15, 20, .72));
    -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}
.aiop.aone-skin-modern .aiop-shade { height: 90px; opacity: .6; }
.aiop.aone-skin-modern .aiop-menu { bottom: 72px; }
.aiop.aone-skin-modern .aiop-mark.bottom-left, .aiop.aone-skin-modern .aiop-mark.bottom-right,
.aiop.aone-skin-modern .aone-brand.at-bottom-left, .aiop.aone-skin-modern .aone-brand.at-bottom-right { bottom: 86px; }
@container aiop (max-width: 560px) {
    .aiop.aone-skin-modern .aiop-bar { margin: 0 6px 6px; padding: 0 6px; border-radius: 12px; }
    .aiop.aone-skin-modern .aiop-menu { bottom: 56px; }
    .aiop.aone-skin-modern .aiop-mark.bottom-left, .aiop.aone-skin-modern .aiop-mark.bottom-right,
    .aiop.aone-skin-modern .aone-brand.at-bottom-left, .aiop.aone-skin-modern .aone-brand.at-bottom-right { bottom: 72px; }
}

/* the minimal skin: play, sound, the line, settings, full screen */
.aiop.aone-skin-minimal .aiop-skipbtn, .aiop.aone-skin-minimal .aiop-time { display: none !important; }
.aiop.aone-skin-minimal .aiop-shade { height: 90px; }
.aiop.aone-skin-minimal .aiop-scrub .line { height: 2px; }
.aiop.aone-skin-minimal .aiop-scrub:hover .line { height: 4px; }

/* the light theme: light menus, and a light glass bar in the modern skin */
.aiop.aone-light .aiop-menu, .aiop.aone-light .aiop-menu button, .aiop.aone-light .aiop-menu .head { color: #0f172a; }
.aiop.aone-light .aiop-menu .head { border-color: rgba(15, 23, 42, .1); }
.aiop.aone-light .aiop-menu .head svg { fill: #0f172a; }
.aiop.aone-light .aiop-menu button:hover { background: rgba(15, 23, 42, .07); }
.aiop.aone-light .aiop-menu button .val, .aiop.aone-light .aiop-menu button .lbl small { color: #475569; }
.aiop.aone-light .aiop-menu button.switch:not(.on) .sw { background: rgba(15, 23, 42, .2); }
.aiop.aone-light .aiop-menu button.pick:not(.on) .tick { border-color: rgba(15, 23, 42, .35); }
.aiop.aone-light.aone-skin-modern .aiop-btn svg { fill: #0f172a; }
.aiop.aone-light.aone-skin-modern .aiop-time { color: #0f172a; }
.aiop.aone-light.aone-skin-modern .aiop-scrub .line { background: rgba(15, 23, 42, .18); }
.aiop.aone-light .aone-ctx { background: rgba(255, 255, 255, .97); }
.aiop.aone-light .aone-ctx-row { color: #0f172a !important; }
.aiop.aone-light .aone-ctx-row i svg { fill: #334155; }
.aiop.aone-light .aone-ctx-row:hover { background: rgba(15, 23, 42, .07); }
.aiop.aone-light .aone-ctx-sep { background: rgba(15, 23, 42, .12); }

/* ---------------------------------------------------------- ambient light (outside the player, behind it) */
.aone-amb-host { isolation: isolate; }
.aone-ambient {
    position: absolute; z-index: -1; display: block; pointer-events: none; border-radius: 24px;
    transform: scale(1.06); filter: blur(56px) saturate(1.6); opacity: 0; transition: opacity 1s ease;
}
.aone-ambient.on { opacity: .62; }
body.aiop-cinema .aone-ambient { display: none; }
@media (prefers-reduced-motion: reduce) { .aone-ambient { transition: none; } }

/* ---------------------------------------------------------- the right-click menu */
.aone-ctx {
    position: absolute; z-index: 40; min-width: 220px; max-width: calc(100% - 8px); max-height: calc(100% - 8px); overflow-y: auto;
    padding: 6px; border-radius: 12px; background: rgba(20, 20, 26, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .5); box-sizing: border-box; scrollbar-width: thin; animation: aone-pop .12s ease-out;
    font-family: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@keyframes aone-pop { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.aone-ctx-row {
    display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px; border: 0; border-radius: 8px;
    background: none; color: #fff !important; text-decoration: none !important; font: 400 13.5px/1.2 inherit; font-family: inherit;
    text-align: left; white-space: nowrap; cursor: pointer;
}
.aone-ctx-row:hover, .aone-ctx-row:focus-visible { background: rgba(255, 255, 255, .1); outline: none; }
.aone-ctx-row i { width: 18px; height: 18px; flex: 0 0 18px; display: grid; place-items: center; }
.aone-ctx-row i svg { width: 18px; height: 18px; fill: rgba(255, 255, 255, .8); }
.aone-ctx-row span { overflow: hidden; text-overflow: ellipsis; }
.aone-ctx-row.is-loop.on::after { content: "\2713"; margin-left: auto; padding-left: 12px; color: var(--aone-accent2, var(--aiop-red)); font-weight: 700; }
.aone-ctx-row.is-aone i svg { fill: #e83636; }
.aone-ctx-sep { height: 1px; margin: 5px 6px; background: rgba(255, 255, 255, .12); }
@container aiop (max-width: 560px) {
    .aone-ctx { min-width: 190px; padding: 4px; }
    .aone-ctx-row { padding: 6px 8px; font-size: 12.5px; }
}

/* stats for nerds (.aone-nerds: aone-stats belongs to the analytics module) */
.aone-nerds {
    position: absolute; left: 12px; top: 12px; z-index: 35; min-width: 260px; max-width: calc(100% - 24px); max-height: calc(100% - 70px); overflow: auto;
    padding: 10px 34px 10px 14px; border-radius: 12px; box-sizing: border-box; background: rgba(0, 0, 0, .82); color: #fff;
    font: 12px/1.6 ui-monospace, Consolas, monospace;
}
.aone-nerds > div > div { display: flex; justify-content: space-between; gap: 18px; }
.aone-nerds span { opacity: .7; }
.aone-nerds b { font-weight: 600; text-align: right; }
.aone-nerds-x { position: absolute; right: 4px; top: 4px; width: 26px; height: 26px; padding: 4px; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.aone-nerds-x svg { width: 18px; height: 18px; fill: #fff; }
.aone-nerds-x:hover { background: rgba(255, 255, 255, .15); }
@container aiop (max-width: 380px) { .aone-nerds { left: 6px; top: 6px; min-width: 0; font-size: 11px; } }
