/* Sticky selected-viewer search, profile chip, results, and platform icon styles. */

.sticky-search-wrap:has(.sticky-selected-viewer.viewer-selected-changed) #sticky-user-search {
    color: transparent !important;
    caret-color: transparent !important;
}

.sticky-search-wrap:has(.sticky-selected-viewer.viewer-selected-changed) #sticky-user-search::placeholder {
    color: transparent !important;
    opacity: 0 !important;
}

.sticky-selected-cockpit {
    position: relative;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(320px, .92fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 7px;
    padding: 6px;
    border: 1px solid rgba(126, 223, 255, .30);
    border-radius: 15px;
    background:
        radial-gradient(circle at 10% 0%, rgba(126, 223, 255, 0.13), transparent 30%),
        radial-gradient(circle at 94% 20%, rgba(176, 154, 255, 0.08), transparent 34%),
        linear-gradient(180deg, rgba(234, 247, 255, 0.035), transparent 42%),
        linear-gradient(135deg, rgba(9, 28, 50, 0.84), rgba(4, 12, 26, 0.76));
    box-shadow:
        inset 0 1px 0 rgba(234, 247, 255, .075),
        inset 0 0 20px rgba(35, 180, 255, .055),
        0 0 18px rgba(35, 180, 255, .08);
    overflow: visible;
}

.sticky-selected-cockpit::before,
.sticky-selected-cockpit::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    pointer-events: none;
    opacity: .78;
    z-index: 0;
}

.sticky-selected-cockpit > * {
    position: relative;
    z-index: 1;
}

.sticky-selected-cockpit::before {
    top: -1px;
    left: -1px;
    border-top: 2px solid rgba(126, 223, 255, .74);
    border-left: 2px solid rgba(126, 223, 255, .74);
    border-top-left-radius: 15px;
}

.sticky-selected-cockpit::after {
    right: -1px;
    bottom: -1px;
    border-right: 2px solid rgba(176, 154, 255, .38);
    border-bottom: 2px solid rgba(126, 223, 255, .42);
    border-bottom-right-radius: 15px;
}

.sticky-cockpit-identity {
    min-width: 0;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: 3px;
}

.sticky-cockpit-label {
    order: 2;
    margin-top: 2px;
    color: rgba(126, 223, 255, .70);
    font-size: 7px;
    letter-spacing: .20em;
    font-weight: 950;
    text-transform: uppercase;
    text-align: center;
}

.sticky-search-wrap {
    order: 1;
    position: relative;
    min-width: 0;
    display: grid;
    align-content: stretch;
}

.sticky-search-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.support-sticky-bar input {
    width: 100%;
    border: 1px solid rgba(126, 223, 255, 0.30);
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(126, 223, 255, 0.045), transparent 42%),
        rgba(8, 24, 45, 0.80);
    color: var(--text);
    outline: none;
    padding: 6px 9px;
    min-height: 32px;
    font-family: inherit;
    font-weight: 850;
    box-shadow: inset 0 1px 0 rgba(234, 247, 255, 0.06), inset 0 0 16px rgba(35, 180, 255, .045);
}

.support-sticky-bar input::placeholder {
    color: rgba(234, 247, 255, .46);
}

.support-sticky-bar input:focus {
    border-color: rgba(126, 223, 255, .72);
    background:
        linear-gradient(180deg, rgba(126, 223, 255, 0.07), transparent 42%),
        rgba(9, 29, 52, 0.92);
    box-shadow: 0 0 20px rgba(35, 180, 255, .16), inset 0 0 18px rgba(35, 180, 255, .06);
}

.sticky-selected-viewer {
    position: absolute;
    inset: 0;
    z-index: 2;
    min-width: 0;
    min-height: 32px;
    width: 100%;
    border: 1px solid rgba(129, 255, 195, 0.44);
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(129, 255, 195, 0.075), transparent 42%),
        radial-gradient(circle at 12% 50%, rgba(129, 255, 195, 0.10), transparent 38%),
        rgba(8, 24, 45, 1);
    color: var(--text);
    padding: 6px 9px;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 9px;
    box-shadow: inset 3px 0 0 rgba(129, 255, 195, .52), inset 0 1px 0 rgba(218, 255, 238, .08), inset 0 0 18px rgba(126, 223, 255, .04);
    overflow: hidden;
}

.sticky-selected-viewer::before {
    content: "";
    position: absolute;
    left: 11px;
    right: 11px;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(129, 255, 195, .76), transparent);
    opacity: .68;
    pointer-events: none;
}

.sticky-selected-viewer.visible { display: flex; }

.sticky-selected-viewer:hover {
    border-color: rgba(129, 255, 195, .72);
    background:
        linear-gradient(180deg, rgba(129, 255, 195, 0.105), transparent 42%),
        radial-gradient(circle at 12% 50%, rgba(129, 255, 195, 0.13), transparent 38%),
        rgba(13, 34, 55, .98);
    box-shadow: 0 0 18px rgba(129, 255, 195, .12), inset 3px 0 0 rgba(129, 255, 195, .66), inset 0 0 18px rgba(126, 223, 255, .055);
}

.sticky-selected-left,
.sticky-result-top {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.sticky-selected-left {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: calc(100% - 24px);
    width: max-content;
    padding: 0;
    pointer-events: none;
    overflow: hidden;
}

.sticky-result-top {
    justify-content: flex-start;
    flex-wrap: wrap;
}

.sticky-selected-name,
.sticky-result-name {
    font-size: 12px;
    font-weight: 950;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.sticky-selected-name {
    flex: 1 1 auto;
    max-width: 420px;
    color: rgba(234, 247, 255, .98);
    text-shadow: 0 0 12px rgba(126, 223, 255, .10);
}

.sticky-search-rank-badge,
.sticky-search-sub-badge {
    display: inline-grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    min-width: 24px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.sticky-search-rank-badge img,
.sticky-search-sub-badge img {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;
    object-fit: contain !important;
}

.sticky-platform-icon-strip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    flex: 0 0 auto;
    min-width: 0;
    overflow: hidden;
}

.sticky-selected-left .sticky-platform-icon-pill:nth-of-type(n+4),
.sticky-result-top .sticky-platform-icon-pill:nth-of-type(n+4) {
    display: none !important;
}

.sticky-selected-left .sticky-platform-icon-strip::after,
.sticky-result-top .sticky-platform-icon-strip::after {
    display: none;
}

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after {
    content: "+1";
    display: inline-grid;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(234, 247, 255, 0.82);
    font-size: 10px;
    font-weight: 950;
    line-height: 1;
}

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(5))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(5))::after { content: "+2"; }

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(6))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(6))::after { content: "+3"; }

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(7))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(7))::after { content: "+4"; }

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(8))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(8))::after { content: "+5"; }

.sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(9))::after,
.sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(9))::after { content: "+6"; }

.sticky-platform-icon-pill {
    display: inline-grid !important;
    place-items: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    min-width: 22px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    overflow: hidden;
    line-height: 1;
}

.sticky-platform-icon-pill img {
    display: block !important;
    width: 13px !important;
    height: 13px !important;
    max-width: 13px !important;
    max-height: 13px !important;
    object-fit: contain !important;
}

.sticky-platform-icon-pill.twitch { border-color: color-mix(in srgb, var(--twitch), white 20%); background: color-mix(in srgb, var(--twitch), transparent 84%); }
.sticky-platform-icon-pill.youtube { border-color: color-mix(in srgb, var(--youtube), white 20%); background: color-mix(in srgb, var(--youtube), transparent 84%); }
.sticky-platform-icon-pill.kick { border-color: color-mix(in srgb, var(--kick), white 20%); background: color-mix(in srgb, var(--kick), transparent 86%); }
.sticky-platform-icon-pill.rumble { border-color: color-mix(in srgb, var(--rumble), white 20%); background: color-mix(in srgb, var(--rumble), transparent 84%); }
.sticky-platform-icon-pill.facebook { border-color: color-mix(in srgb, var(--facebook), white 20%); background: color-mix(in srgb, var(--facebook), transparent 84%); }
.sticky-platform-icon-pill.instagram { border-color: color-mix(in srgb, var(--instagram), white 20%); background: color-mix(in srgb, var(--instagram), transparent 84%); }
.sticky-platform-icon-pill.patreon { border-color: color-mix(in srgb, var(--patreon), white 20%); background: color-mix(in srgb, var(--patreon), transparent 84%); }
.sticky-platform-icon-pill.x { border-color: rgba(255,255,255,0.58); background: rgba(255,255,255,0.11); }
.sticky-platform-icon-pill.tiktok { border-color: rgba(37,244,238,.72); background: rgba(37,244,238,.12); }
.sticky-platform-icon-pill.discord { border-color: color-mix(in srgb, var(--discord), white 20%); background: color-mix(in srgb, var(--discord), transparent 84%); }

/* Live "present now" (Feature 3): icon-only pills have no room for a dot, so the pill
   itself gently pulses in its own platform colour. Tooltip gains " · Present". */
.sticky-platform-icon-pill { --present-accent: #34d058; }
.sticky-platform-icon-pill.twitch { --present-accent: var(--twitch); }
.sticky-platform-icon-pill.youtube { --present-accent: var(--youtube); }
.sticky-platform-icon-pill.kick { --present-accent: var(--kick); }
.sticky-platform-icon-pill.rumble { --present-accent: var(--rumble); }
.sticky-platform-icon-pill.facebook { --present-accent: var(--facebook); }
.sticky-platform-icon-pill.instagram { --present-accent: var(--instagram); }
.sticky-platform-icon-pill.tiktok { --present-accent: #25f4ee; }

.sticky-platform-icon-pill.present {
    animation: sticky-present-pulse 1.8s ease-in-out infinite;
}

@keyframes sticky-present-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--present-accent, #34d058), transparent 35%); }
    50% { box-shadow: 0 0 7px 1px color-mix(in srgb, var(--present-accent, #34d058), transparent 25%); }
}

@media (prefers-reduced-motion: reduce) {
    .sticky-platform-icon-pill.present { animation: none; box-shadow: 0 0 6px color-mix(in srgb, var(--present-accent, #34d058), transparent 35%); }
}

.sticky-selected-right {
    position: absolute;
    right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(199, 218, 236, 0.54);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
}

.sticky-selected-viewer:hover .sticky-selected-right {
    color: rgba(129, 255, 195, .70);
}

.sticky-result-rank-pill {
    justify-self: end;
    padding: 5px 9px;
    border: 1px solid rgba(176, 154, 255, 0.30);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(176, 154, 255, 0.08), transparent 50%),
        rgba(176, 154, 255, 0.08);
    color: #d8ceff;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.sticky-clear-hint { color: var(--muted); font-size: 10px; }
.sticky-clear-hint::after { content: " ↻"; color: rgba(129, 255, 195, .72); }

.sticky-results {
    position: absolute;
    z-index: 10050;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    display: none;
    max-height: 330px;
    overflow: auto;
    border: 1px solid rgba(126, 223, 255, 0.46);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(126, 223, 255, 0.055), transparent 34%),
        rgba(5, 15, 31, 0.98);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .56), 0 0 28px rgba(35, 180, 255, .18);
    padding: 6px;
}

.sticky-results.open { display: grid; gap: 5px; }

.sticky-result {
    border: 1px solid rgba(93, 210, 255, 0.20);
    border-radius: 11px;
    background:
        linear-gradient(180deg, rgba(234, 247, 255, 0.025), transparent 42%),
        rgba(8, 24, 45, 0.66);
    color: var(--text);
    padding: 8px 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    box-shadow: inset 0 1px 0 rgba(234, 247, 255, 0.045);
}

.sticky-result:hover {
    border-color: var(--border-hot);
    background:
        linear-gradient(180deg, rgba(126, 223, 255, 0.07), transparent 42%),
        rgba(18, 51, 84, 0.84);
}

.sticky-result-main {
    min-width: 0;
    display: grid;
}

.sticky-results .empty {
    padding: 10px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.sticky-selected-viewer.viewer-selected-changed {
    border-color: rgba(129, 255, 195, 0.84) !important;
    background:
        linear-gradient(180deg, rgba(129, 255, 195, 0.12), transparent 42%),
        radial-gradient(circle at 12% 50%, rgba(129, 255, 195, 0.16), transparent 38%),
        rgba(13, 34, 55, 0.98) !important;
    box-shadow: 0 0 24px rgba(129, 255, 195, 0.18), inset 3px 0 0 rgba(129, 255, 195, 0.78), inset 0 0 20px rgba(126, 223, 255, 0.07) !important;
    animation: stickySelectedViewerPulse 1.15s ease-out 2;
}

.sticky-selected-viewer.viewer-selected-changed::before {
    content: "";
    position: absolute;
    inset: -70% -30%;
    height: auto;
    background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.24) 48%, transparent 60%);
    transform: translateX(-40%);
    animation: stickySelectedViewerSweep 1.45s ease-out;
    opacity: 1;
    pointer-events: none;
}

@keyframes stickySelectedViewerPulse {
    0% { transform: translateY(0); }
    45% { transform: translateY(-1px); }
    100% { transform: translateY(0); }
}

@keyframes stickySelectedViewerSweep {
    0% { transform: translateX(-50%); opacity: 0; }
    20% { opacity: 1; }
    100% { transform: translateX(50%); opacity: 0; }
}

@media (max-width: 760px) {
    .sticky-selected-cockpit {
        grid-template-columns: 1fr;
        gap: 5px;
        padding: 5px;
        border-radius: 13px;
    }

    .sticky-cockpit-label {
        display: none;
    }

    .sticky-search-wrap {
        min-height: 30px;
    }

    .support-sticky-bar input,
    .sticky-selected-viewer {
        min-height: 30px;
        padding: 4px 7px;
        border-radius: 9px;
    }

    .sticky-selected-viewer {
        justify-content: center;
        gap: 6px;
        text-align: center;
    }

    .sticky-selected-left {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: max-content;
        max-width: calc(100% - 18px);
        justify-content: center;
        gap: 5px;
        pointer-events: none;
    }

    .sticky-selected-name {
        flex: 0 1 auto;
        max-width: min(46vw, 220px);
        min-width: 0;
        font-size: 10.5px;
        text-align: center;
    }

    .sticky-search-rank-badge,
    .sticky-search-sub-badge {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        min-width: 18px;
    }

    .sticky-search-rank-badge img,
    .sticky-search-sub-badge img {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }

    .sticky-platform-icon-strip {
        gap: 2px;
        flex: 0 0 auto;
        overflow: visible;
    }

    .sticky-platform-icon-pill {
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        min-width: 16px;
    }

    .sticky-platform-icon-pill img {
        width: 9px !important;
        height: 9px !important;
        max-width: 9px !important;
        max-height: 9px !important;
    }

    .sticky-selected-left .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after,
    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after {
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        font-size: 7px;
    }

    .sticky-selected-right {
        display: none;
    }

    .sticky-result {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 7px;
        align-items: center;
        padding: 7px 8px;
    }

    .sticky-result-top {
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .sticky-result-name {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        font-size: 11.5px;
    }

    .sticky-result-rank-pill {
        justify-self: end;
        padding: 4px 7px;
        font-size: 10px;
    }

    .sticky-result-top .sticky-search-rank-badge,
    .sticky-result-top .sticky-search-sub-badge {
        flex: 0 0 18px;
        width: 18px;
        height: 18px;
        min-width: 18px;
    }

    .sticky-result-top .sticky-search-rank-badge img,
    .sticky-result-top .sticky-search-sub-badge img {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }

    .sticky-result-top .sticky-platform-icon-strip {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        gap: 2px;
        max-width: none;
        overflow: visible;
    }

    .sticky-result-top .sticky-platform-icon-pill:nth-of-type(n+3) {
        display: none !important;
    }

    .sticky-result-top .sticky-platform-icon-strip::after {
        display: none;
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(3))::after {
        content: "+1";
        display: inline-grid;
        place-items: center;
        flex: 0 0 16px;
        width: 16px;
        height: 16px;
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        color: rgba(234, 247, 255, 0.82);
        font-size: 7px;
        font-weight: 950;
        line-height: 1;
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(4))::after {
        content: "+2";
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(5))::after {
        content: "+3";
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(6))::after {
        content: "+4";
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(7))::after {
        content: "+5";
    }

    .sticky-result-top .sticky-platform-icon-strip:has(.sticky-platform-icon-pill:nth-of-type(8))::after {
        content: "+6";
    }
}