/* FKN RADIO — final virtual fan renderer overrides. */

.cover-fan,
.cover-fan *,
.player-display,
.player-display * {
    -webkit-user-select: none !important;
    user-select: none !important;
}

.cover-fan img {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
}

.cover-fan {
    touch-action: pinch-zoom !important;
}

/* One transparent input surface covers the full fan band, including gaps. */
.cover-fan .fan-gesture-surface {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    max-width: none;
    transform: translateX(-50%);
    z-index: 0;
    pointer-events: auto;
    touch-action: pinch-zoom;
    background: transparent;
}

/* Painted covers can protrude beyond the fan box; let their touches bubble. */
.cover-fan.fan-flow-ready .fan-cover {
    pointer-events: auto !important;
    touch-action: pinch-zoom;
}

/* Touch keeps its compact physical cards after rotating beyond 900 CSS px. */
.cover-fan.fan-flow-touch {
    height: 275px !important;
}

.cover-fan.fan-flow-touch .fan-cover {
    width: 166px !important;
    bottom: 18px !important;
}

/* Freeze the measured recipe until a gesture and its inertia have finished. */
.cover-fan.fan-flow-locked .fan-cover {
    width: var(--fan-flow-card-width) !important;
}

/* Physical cards may travel to the center; old landscape classes cannot hide them. */
.cover-fan.fan-flow-ready.fan-flow-ribbon .fan-cover {
    display: block !important;
}

/* The resting LIVE layout uses the very same pitch and anchors as dragging. */
.cover-fan.fan-flow-ready.fan-flow-ribbon:not(.fan-water-active) .fan-cover {
    opacity: var(--fan-flow-opacity, 1) !important;
    transform:
        translateX(calc(-50% + var(--fan-flow-slot, 0) * var(--fan-track-pitch)))
        translateY(var(--fan-flow-y, 0px))
        rotateY(var(--fan-flow-ry, 0deg))
        rotateZ(var(--fan-flow-rz, 0deg))
        scale(var(--fan-flow-scale, 1)) !important;
}

.fan-flow-ribbon .fan-center { --fan-flow-slot: 0; --fan-flow-y: 0px; --fan-flow-ry: 0deg; --fan-flow-rz: 0deg; --fan-flow-scale: 1; --fan-flow-opacity: 1; }
.fan-flow-ribbon .fan-1-left { --fan-flow-slot: -1; --fan-flow-y: 14px; --fan-flow-ry: 20deg; --fan-flow-rz: -3deg; --fan-flow-scale: .82; --fan-flow-opacity: .88; }
.fan-flow-ribbon .fan-1-right { --fan-flow-slot: 1; --fan-flow-y: 14px; --fan-flow-ry: -20deg; --fan-flow-rz: 3deg; --fan-flow-scale: .82; --fan-flow-opacity: .88; }
.fan-flow-ribbon .fan-2-left { --fan-flow-slot: -2; --fan-flow-y: 38px; --fan-flow-ry: 30deg; --fan-flow-rz: -5deg; --fan-flow-scale: .62; --fan-flow-opacity: .68; }
.fan-flow-ribbon .fan-2-right { --fan-flow-slot: 2; --fan-flow-y: 38px; --fan-flow-ry: -30deg; --fan-flow-rz: 5deg; --fan-flow-scale: .62; --fan-flow-opacity: .68; }
.fan-flow-ribbon .fan-3-left { --fan-flow-slot: -3; --fan-flow-y: 62px; --fan-flow-ry: 39deg; --fan-flow-rz: -7deg; --fan-flow-scale: .45; --fan-flow-opacity: .47; }
.fan-flow-ribbon .fan-3-right { --fan-flow-slot: 3; --fan-flow-y: 62px; --fan-flow-ry: -39deg; --fan-flow-rz: 7deg; --fan-flow-scale: .45; --fan-flow-opacity: .47; }
.fan-flow-ribbon .fan-4-left { --fan-flow-slot: -4; --fan-flow-y: 82px; --fan-flow-ry: 47deg; --fan-flow-rz: -9deg; --fan-flow-scale: .32; --fan-flow-opacity: .27; }
.fan-flow-ribbon .fan-4-right { --fan-flow-slot: 4; --fan-flow-y: 82px; --fan-flow-ry: -47deg; --fan-flow-rz: 9deg; --fan-flow-scale: .32; --fan-flow-opacity: .27; }
.fan-flow-ribbon .fan-5-left { --fan-flow-slot: -5; --fan-flow-y: 98px; --fan-flow-ry: 54deg; --fan-flow-rz: -11deg; --fan-flow-scale: .23; --fan-flow-opacity: .12; }
.fan-flow-ribbon .fan-5-right { --fan-flow-slot: 5; --fan-flow-y: 98px; --fan-flow-ry: -54deg; --fan-flow-rz: 11deg; --fan-flow-scale: .23; --fan-flow-opacity: .12; }

.cover-fan.fan-water-active .fan-cover {
    /* The renderer writes transform, opacity and depth directly on each card. */
    transition: none !important;
    transition-delay: 0ms !important;
    animation: none !important;
    box-shadow: none !important;
    pointer-events: auto !important;
    will-change: transform, opacity !important;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform-style: flat;
}

/* Filter changes happen once at rest, never in the rAF hot path. */
.cover-fan.fan-water-active:not(.fan-water-moving) .fan-cover {
    filter: var(--fan-water-rest-filter, none) !important;
}

/* Moving filtered layers are expensive on iOS Safari. */
.cover-fan.fan-water-active.fan-water-moving .fan-cover {
    filter: none !important;
}

.cover-fan:not(.fan-water-active) .fan-water-clone {
    visibility: hidden !important;
    opacity: 0 !important;
}

.cover-fan.fan-water-active .fanShareOverlay {
    z-index: 200001 !important;
}


/* Fine-pointer spacing changes only horizontal artwork placement. */
.cover-fan.fan-visual-fine:not(.fan-water-active):not(.fan-flow-ribbon) .fan-cover {
    translate: calc(var(--fan-live-x, 0px) * (var(--fan-visual-spread) - 1)) 0 !important;
}

.cover-fan.fan-visual-fine.fan-water-active .fan-cover {
    translate: none !important;
}

.fan-visual-fine .fan-center { --fan-live-x: 0px; }
.fan-visual-fine .fan-1-left { --fan-live-x: -170px; }
.fan-visual-fine .fan-1-right { --fan-live-x: 170px; }
.fan-visual-fine .fan-2-left { --fan-live-x: -305px; }
.fan-visual-fine .fan-2-right { --fan-live-x: 305px; }
.fan-visual-fine .fan-3-left { --fan-live-x: -415px; }
.fan-visual-fine .fan-3-right { --fan-live-x: 415px; }
.fan-visual-fine .fan-4-left { --fan-live-x: -500px; }
.fan-visual-fine .fan-4-right { --fan-live-x: 500px; }
.fan-visual-fine .fan-5-left { --fan-live-x: -565px; }
.fan-visual-fine .fan-5-right { --fan-live-x: 565px; }

/* Only the active fine-pointer scene shares continuous physical depth. */
.cover-fan.fan-weave-depth {
    -webkit-transform-style: preserve-3d !important;
    transform-style: preserve-3d !important;
    overflow: visible !important;
    opacity: 1 !important;
    filter: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    clip: auto !important;
    clip-path: none !important;
    mask: none !important;
    -webkit-mask: none !important;
    isolation: auto !important;
    contain: layout style !important;
    mix-blend-mode: normal !important;
}

.cover-fan.fan-weave-depth .fan-cover {
    -webkit-transform-style: flat !important;
    transform-style: flat !important;
}

/* Keep the far cover's own dark artwork on its opaque sheet. Applying the
 * attenuation inside each sheet prevents the next cover bleeding through.
 */
.cover-fan.fan-weave-depth .fan-cover img {
    opacity: var(--fan-sheet-ink, 1) !important;
}

.cover-fan.fan-weave-depth .fan-cover::after {
    filter: brightness(var(--fan-sheet-ink, 1)) !important;
}

.cover-fan.fan-weave-depth .fanShareOverlay {
    translate: 0 0 12px !important;
}

/* Every compact fan uses the same curved artwork placement. Touch retains its
 * independent measured gesture pitch; only horizontal visual spacing changes.
 */
.cover-fan.fan-flow-ready.fan-flow-ribbon:not(.fan-water-active) .fan-cover {
    transform:
        translateX(calc(-50% + var(--fan-flow-arc-x, 0px) * var(--fan-visual-spread)))
        translateY(var(--fan-flow-y, 0px))
        rotateY(var(--fan-flow-ry, 0deg))
        rotateZ(var(--fan-flow-rz, 0deg))
        scale(var(--fan-flow-scale, 1)) !important;
}

.fan-flow-ribbon .fan-center { --fan-flow-arc-x: 0px; }
.fan-flow-ribbon .fan-1-left { --fan-flow-arc-x: -105px; }
.fan-flow-ribbon .fan-1-right { --fan-flow-arc-x: 105px; }
.fan-flow-ribbon .fan-2-left { --fan-flow-arc-x: -182px; }
.fan-flow-ribbon .fan-2-right { --fan-flow-arc-x: 182px; }
.fan-flow-ribbon .fan-3-left { --fan-flow-arc-x: -240px; }
.fan-flow-ribbon .fan-3-right { --fan-flow-arc-x: 240px; }
.fan-flow-ribbon .fan-4-left { --fan-flow-arc-x: -282px; }
.fan-flow-ribbon .fan-4-right { --fan-flow-arc-x: 282px; }
.fan-flow-ribbon .fan-5-left { --fan-flow-arc-x: -318px; }
.fan-flow-ribbon .fan-5-right { --fan-flow-arc-x: 318px; }

/* Resting LIVE cards keep the same opaque outer sheets as the continuous
 * renderer. Only the original outer slots are addressed; central/adjacent
 * artwork and coarse-pointer layouts retain their existing appearance.
 */
.cover-fan.fan-visual-fine:not(.fan-water-active) :is(.fan-3-left, .fan-3-right) {
    --fan-sheet-ink: .47;
    opacity: 1 !important;
    background-color: #050505 !important;
}

.cover-fan.fan-visual-fine:not(.fan-water-active) :is(.fan-4-left, .fan-4-right) {
    --fan-sheet-ink: .28;
    opacity: 1 !important;
    background-color: #050505 !important;
}

.cover-fan.fan-visual-fine:not(.fan-water-active) :is(.fan-5-left, .fan-5-right) {
    --fan-sheet-ink: .13;
    opacity: 1 !important;
    background-color: #050505 !important;
}

.cover-fan.fan-visual-fine.fan-flow-ribbon:not(.fan-water-active) :is(.fan-4-left, .fan-4-right) {
    --fan-sheet-ink: .27;
}

.cover-fan.fan-visual-fine.fan-flow-ribbon:not(.fan-water-active) :is(.fan-5-left, .fan-5-right) {
    --fan-sheet-ink: .12;
}

.cover-fan.fan-visual-fine:not(.fan-water-active) :is(.fan-3-left, .fan-3-right, .fan-4-left, .fan-4-right, .fan-5-left, .fan-5-right) img {
    opacity: var(--fan-sheet-ink) !important;
}

.cover-fan.fan-visual-fine:not(.fan-water-active) :is(.fan-3-left, .fan-3-right, .fan-4-left, .fan-4-right, .fan-5-left, .fan-5-right)::after {
    filter: brightness(var(--fan-sheet-ink)) !important;
}

/* Neither the container nor its drag band may cover the desktop's sheets.
 * Existing interactive descendants receive events and bubble gestures normally. */
.cover-fan.fan-weave-depth {
    pointer-events: none !important;
}

/* Perspective compensation preserves the rear drag band's original bounds. */
.cover-fan.fan-weave-depth .fan-gesture-surface {
    transform-origin: calc(50% + var(--fan-gesture-origin-x, 0px)) var(--fan-gesture-origin-y, 50%);
    transform: translateX(-50%) translateZ(-240px) scale(var(--fan-gesture-back-scale, 1.2));
}

/* The existing share button rides on the selected physical cover. */
.cover-fan .fan-cover > .fanShareOverlay.fkn-share-attached {
    left: 11px;
    right: auto;
    bottom: 10px;
    width: 30px;
    height: 30px;
    translate: none !important;
}

.cover-fan .fan-cover > .fanShareOverlay.fkn-share-attached svg {
    width: 19px;
    height: 19px;
}

.cover-fan.fan-flow-ribbon .fan-cover > .fanShareOverlay.fkn-share-attached,
.cover-fan.fan-flow-touch .fan-cover > .fanShareOverlay.fkn-share-attached {
    left: 7px;
    width: 28px;
    height: 28px;
}

.cover-fan.fan-flow-ribbon .fan-cover > .fanShareOverlay.fkn-share-attached svg,
.cover-fan.fan-flow-touch .fan-cover > .fanShareOverlay.fkn-share-attached svg {
    width: 18px;
    height: 18px;
}

/* Keep the existing player artwork, with a generous invisible touch target. */
.fan-play {
    letter-spacing: 0 !important;
}

.fan-play .fkn-transport-icon {
    display: block;
    width: 1em;
    height: 1em;
    fill: currentColor;
    flex: none;
    pointer-events: none;
}

.playerBar {
    position: relative;
    overflow: visible !important;
}

.playerBar .fkn-seek-control {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 44px;
    margin: 0;
    transform: translateY(-50%);
    z-index: 2;
    opacity: 0;
    cursor: pointer;
    touch-action: none;
}

.playerBar .fkn-seek-control:disabled {
    pointer-events: none;
}

.playerBar:not(.fkn-pointer-focus):has(.fkn-seek-control:focus-visible) {
    outline: 1px solid rgba(160, 255, 175, .7);
    outline-offset: 6px;
}

.playerBar.fkn-seeking .playerFill {
    transition: none !important;
}

/* Progress presentation owns its easing; avoid a second CSS lag behind it. */
.playerBar .playerFill {
    transition: none !important;
}
