/* ==========================================
   SalmasFlix — Sync Player · Partner position marker
   Extracted from media.css in Phase 7.4.

   The small circular avatar that rides the scrubber at partner's current
   playback time when I'm in Alone mode. Tap → snap my player to their
   position via `_snapToPartner()`. Disney+ GroupWatch convention
   ("always see who is controlling") ported to the scrubber axis.

   Position is driven by `--ppm-pct` (set each tick by `media.js
   _updatePartnerMarker()` at 500 ms cadence; projects partner's time +
   (now − lastUpdate) between server pushes so the avatar slides smoothly
   while partner is playing). `hidden` attribute hides the marker when
   I'm in Together mode, when partner is on a different item, or when
   duration is unknown.

   Secondary color (var(--secondary)) matches the Alone pill in the
   sync-role capsule — "secondary = decoupled / independent" is the
   consistent signal across the whole sync UI.
   ========================================== */

@layer features {


.media-partner-marker {
    position: absolute;
    top: 50%;
    left: var(--ppm-pct, 0%);
    transform: translate(-50%, -50%);
    width: 22px;
    height: 22px;
    padding: 0;
    background: transparent;
    border: 2px solid var(--secondary);
    border-radius: 50%;
    box-shadow:
        0 0 0 2px rgba(12, 8, 24, 0.75),
        0 0 8px rgba(var(--secondary-rgb), 0.6),
        0 2px 6px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    z-index: 3;
    transition: transform 0.18s cubic-bezier(0.2, 0.9, 0.3, 1),
                box-shadow 0.18s ease,
                left 0.5s linear;
    pointer-events: auto;
    overflow: visible;
}
/* `[hidden]` is the semantic off-switch for this marker. Using
   !important here because the element has inline `display: inline-flex`
   set by _updatePartnerMarker's render helper when the marker is
   supposed to be visible; the [hidden] attr must win regardless. */
.media-partner-marker[hidden] { display: none !important; }
.media-partner-marker .mpm-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    background: rgba(255, 255, 255, 0.06);
}
.media-partner-marker:hover,
.media-partner-marker:focus-visible {
    transform: translate(-50%, -50%) scale(1.22);
    box-shadow:
        0 0 0 2px rgba(12, 8, 24, 0.75),
        0 0 12px rgba(var(--secondary-rgb), 0.9),
        0 2px 8px rgba(0, 0, 0, 0.6);
    outline: none;
}
/* Tooltip — name + time, appears above the marker on hover/focus. */
.media-partner-marker .mpm-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    background: rgba(12, 8, 24, 0.85);
    backdrop-filter: blur(10px) saturate(175%);
    -webkit-backdrop-filter: blur(10px) saturate(175%);
    border: 0.5px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    font-size: 0.68rem;
    color: #fff;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    font-variant-numeric: tabular-nums;
}
.media-partner-marker:hover .mpm-tooltip,
.media-partner-marker:focus-visible .mpm-tooltip {
    opacity: 1;
}
.media-partner-marker .mpm-tip-name {
    font-weight: 700;
    color: var(--secondary);
}
.media-partner-marker .mpm-tip-time { color: rgba(255, 255, 255, 0.85); }

/* Mobile — slightly smaller marker so it doesn't dominate a short
   seekbar; tooltip still readable at 0.66rem. */
/* breakpoint snap 600px -> 768px (Phase 7.6 ladder) */
@media (max-width: 768px) {
    .media-partner-marker { width: 20px; height: 20px; }
    .media-partner-marker .mpm-tooltip { font-size: 0.66rem; padding: 3px 8px; }
}


} /* end @layer features */
