/* Branded inline player for community discussion videos (not Budz reels). */
.cnbiz-dvp {
    --cnbiz-dvp-accent: #2f6656;
    --cnbiz-dvp-accent-soft: rgba(47, 102, 86, 0.88);
    --cnbiz-dvp-vol: 1;
    position: relative;
    display: block;
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    isolation: isolate;
    direction: ltr !important;
    unicode-bidi: isolate;
    box-shadow: 0 8px 28px rgba(15, 41, 45, 0.22);
}
.cnbiz-dvp video {
    display: block;
    width: 100%;
    max-height: 420px;
    height: auto;
    object-fit: contain;
    background: #000;
    position: relative;
    z-index: 1;
    vertical-align: top;
    /* Parent Listify sets `video { margin-bottom: 24px }` - that was the fake bottom strip. */
    margin: 0 !important;
}
/* Spacing vs. post text belongs on the player shell, not inside it. */
.cnbiz-disc-single-body .cnbiz-dvp,
.cnbiz-disc-single-card .cnbiz-dvp {
    margin-top: 12px;
}
.cnbiz-dvp video.cnbiz-disc-single-media {
    margin-top: 0 !important;
}
/* Shrink-wrap: feed tiles use min-height for photos; videos must not inherit it. */
.cnbiz-feed-media-item--video,
.cnbiz-feed-media--single .cnbiz-feed-media-item--video,
.cnbiz-feed-media--grid .cnbiz-feed-media-item--video {
    min-height: 0 !important;
    height: auto !important;
    align-self: start;
    background: #000 !important;
    line-height: 0;
}
.cnbiz-feed-media-item--video .cnbiz-dvp {
    line-height: normal;
    font-size: 1rem;
}
.cnbiz-feed-media-item--video .cnbiz-dvp,
.cnbiz-disc-single-media.cnbiz-dvp,
.cnbiz-disc-single-card .cnbiz-dvp {
    max-width: 100%;
}
.cnbiz-dvp.is-ready .cnbiz-dvp-skeleton { opacity: 0; pointer-events: none; }

.cnbiz-dvp-skeleton {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: linear-gradient(110deg, #111 25%, #1a1a1a 40%, #111 55%);
    background-size: 200% 100%;
    animation: cnbiz-dvp-shimmer 1.4s ease-in-out infinite;
    pointer-events: none;
    transition: opacity 0.25s ease;
}
@keyframes cnbiz-dvp-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.cnbiz-dvp-play {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    padding: 0;
    cursor: pointer;
    /* Keep overlay light so the frozen first frame stays visible. */
    background: rgba(15, 41, 45, 0.08);
    transition: background 0.2s ease, opacity 0.2s ease;
}
.cnbiz-dvp-play:hover,
.cnbiz-dvp-play:focus-visible {
    background: rgba(15, 41, 45, 0.32);
    outline: none;
}
.cnbiz-dvp-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cnbiz-dvp-accent-soft);
    color: #fff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.18);
    transition: transform 0.2s ease, background 0.2s ease;
}
.cnbiz-dvp-play:hover .cnbiz-dvp-play-btn,
.cnbiz-dvp-play:focus-visible .cnbiz-dvp-play-btn {
    transform: scale(1.06);
    background: #3a7d6a;
}
.cnbiz-dvp-play-btn i {
    font-size: 22px;
    margin-inline-start: 3px;
}
.cnbiz-dvp.is-playing .cnbiz-dvp-play {
    opacity: 0;
    pointer-events: none;
}

.cnbiz-dvp-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 28px 12px 10px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.88) 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    direction: ltr !important;
    unicode-bidi: isolate;
}
/* Paused: only the center play shows (no dead control strip). */
.cnbiz-dvp.is-playing:hover .cnbiz-dvp-bar,
.cnbiz-dvp.is-playing:focus-within .cnbiz-dvp-bar,
.cnbiz-dvp.is-scrubbing .cnbiz-dvp-bar,
.cnbiz-dvp.is-vol-scrubbing .cnbiz-dvp-bar,
.cnbiz-dvp.is-controls .cnbiz-dvp-bar {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.cnbiz-dvp-ctrl {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.cnbiz-dvp-ctrl:hover,
.cnbiz-dvp-ctrl:focus-visible {
    background: rgba(255, 255, 255, 0.2);
    outline: none;
}
.cnbiz-dvp-ctrl i { font-size: 13px; }

/* Volume: physical LTR via scaleX from the left edge. */
.cnbiz-dvp-volume {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    gap: 6px;
    direction: ltr !important;
    unicode-bidi: isolate;
    padding: 2px 6px 2px 2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}
.cnbiz-dvp-vol-slider {
    position: relative;
    width: 72px;
    height: 18px;
    cursor: pointer;
    touch-action: none;
    direction: ltr !important;
    unicode-bidi: isolate;
}
.cnbiz-dvp-vol-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    direction: ltr !important;
}
.cnbiz-dvp-vol-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: calc(var(--cnbiz-dvp-vol, 1) * 100%);
    max-width: 100%;
    border-radius: inherit;
    background: #fff;
    transform: none;
}
.cnbiz-dvp-vol-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    /* JS sets left in px; CSS fallback for first paint at full volume. */
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.cnbiz-dvp-progress {
    flex: 1 1 auto;
    position: relative;
    height: 18px;
    cursor: pointer;
    touch-action: none;
    direction: ltr !important;
    unicode-bidi: isolate;
}
.cnbiz-dvp-progress-track {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 4px;
    margin-top: -2px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    overflow: hidden;
    direction: ltr !important;
}
.cnbiz-dvp-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: calc(var(--cnbiz-dvp-progress, 0) * 100%);
    max-width: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #3a7d6a, #6db89a);
    transform: none;
}
.cnbiz-dvp-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.15s ease;
}
.cnbiz-dvp-progress:hover .cnbiz-dvp-progress-thumb,
.cnbiz-dvp.is-scrubbing .cnbiz-dvp-progress-thumb {
    opacity: 1;
}

.cnbiz-dvp-time {
    flex: 0 0 auto;
    min-width: 74px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    font-variant-numeric: tabular-nums;
    font-family: "Noto Sans Hebrew", system-ui, sans-serif;
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .cnbiz-dvp video { max-height: 320px; }
    .cnbiz-dvp-play-btn { width: 56px; height: 56px; }
    .cnbiz-dvp-play-btn i { font-size: 18px; }
    .cnbiz-dvp-bar { padding: 24px 10px 8px; gap: 6px; }
    .cnbiz-dvp-time { min-width: 66px; font-size: 10px; }
    .cnbiz-dvp-vol-slider { width: 56px; }
}

[data-theme="dim"] .cnbiz-dvp {
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
[data-theme="dim"] .cnbiz-feed-media-item--video,
[data-theme="dim"] .cnbiz-feed-media--single .cnbiz-feed-media-item--video,
[data-theme="dim"] .cnbiz-feed-media--grid .cnbiz-feed-media-item--video {
    background: #000 !important;
}

@media (prefers-reduced-motion: reduce) {
    .cnbiz-dvp-skeleton,
    .cnbiz-dvp-play-btn,
    .cnbiz-dvp-bar {
        animation: none;
        transition: none;
    }
}
