/* ---------------------------------------------------------
   Professional custom News player
   Native controls remain available when JavaScript is unavailable.
   --------------------------------------------------------- */

.news-custom-player {
    --news-player-accent: #b80000;
    --news-player-control-size: 40px;
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid #242424;
    border-radius: 8px;
    background: #000000;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    outline: none;
}

.news-custom-player:focus-visible {
    box-shadow:
        0 0 0 3px rgba(184, 0, 0, 0.35),
        0 18px 44px rgba(0, 0, 0, 0.18);
}

.news-custom-player .news-video-player {
    display: block;
    width: 100%;
    height: 100%;
    background: #000000;
    object-fit: contain;
}

.news-player-center-play,
.news-player-loading,
.news-player-topline,
.news-player-controls {
    display: none;
}

.news-custom-player.is-enhanced .news-player-center-play,
.news-custom-player.is-enhanced .news-player-topline,
.news-custom-player.is-enhanced .news-player-controls {
    display: flex;
}

.news-player-topline {
    position: absolute;
    z-index: 6;
    top: 0;
    right: 0;
    left: 0;
    align-items: center;
    min-height: 62px;
    padding: 14px 18px 22px;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.78),
        rgba(0, 0, 0, 0)
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.news-custom-player.is-controls-visible .news-player-topline,
.news-custom-player.is-paused .news-player-topline {
    opacity: 1;
}

.news-player-title {
    overflow: hidden;
    max-width: 78%;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-player-center-play {
    position: absolute;
    z-index: 8;
    top: 50%;
    left: 50%;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 50%;
    background: rgba(17, 17, 17, 0.82);
    color: #ffffff;
    font-size: 25px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    backdrop-filter: blur(5px);
    transition:
        opacity 160ms ease,
        transform 160ms ease,
        background 160ms ease;
}

.news-player-center-play:hover,
.news-player-center-play:focus {
    background: var(--news-player-accent);
    transform: translate(-50%, -50%) scale(1.05);
}

.news-custom-player.is-playing .news-player-center-play {
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.88);
}

.news-player-loading {
    position: absolute;
    z-index: 9;
    top: 50%;
    left: 50%;
    width: 46px;
    height: 46px;
    border: 4px solid rgba(255, 255, 255, 0.28);
    border-top-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: news-player-spin 800ms linear infinite;
    pointer-events: none;
}

.news-custom-player.is-loading .news-player-loading {
    display: block;
}

@keyframes news-player-spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.news-player-controls {
    position: absolute;
    z-index: 10;
    right: 0;
    bottom: 0;
    left: 0;
    flex-direction: column;
    gap: 4px;
    padding: 34px 12px 10px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.94),
        rgba(0, 0, 0, 0.58) 64%,
        rgba(0, 0, 0, 0)
    );
    opacity: 0;
    transform: translateY(9px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.news-custom-player.is-controls-visible .news-player-controls,
.news-custom-player.is-paused .news-player-controls,
.news-custom-player:focus-within .news-player-controls {
    opacity: 1;
    transform: translateY(0);
}

.news-player-progress {
    width: 100%;
    height: 18px;
    margin: 0;
    padding: 0;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.news-player-progress::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--news-player-accent) 0,
        var(--news-player-accent) var(--news-player-progress, 0%),
        rgba(255, 255, 255, 0.34) var(--news-player-progress, 0%),
        rgba(255, 255, 255, 0.34) 100%
    );
}

.news-player-progress::-moz-range-track {
    height: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.34);
}

.news-player-progress::-moz-range-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--news-player-accent);
}

.news-player-progress::-webkit-slider-thumb {
    width: 14px;
    height: 14px;
    margin-top: -5px;
    border: 0;
    border-radius: 50%;
    appearance: none;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 0, 0, 0.28);
}

.news-player-progress::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(184, 0, 0, 0.28);
}

.news-player-control-row {
    display: flex;
    align-items: center;
    gap: 3px;
    min-width: 0;
}

.news-player-control-row button,
.news-player-download {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: var(--news-player-control-size);
    height: var(--news-player-control-size);
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff !important;
    font-size: 16px;
    cursor: pointer;
    transition:
        background 150ms ease,
        transform 150ms ease;
}

.news-player-control-row button:hover,
.news-player-control-row button:focus,
.news-player-download:hover,
.news-player-download:focus {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
    transform: scale(1.04);
}

.news-player-control-row button:focus-visible,
.news-player-download:focus-visible,
.news-player-progress:focus-visible,
.news-player-select:focus-visible,
.news-player-volume:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

.news-player-time {
    flex: 0 0 auto;
    min-width: 92px;
    padding-inline: 5px 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.news-player-spacer {
    flex: 1 1 auto;
    min-width: 8px;
}

.news-player-volume {
    width: 78px;
    height: 4px;
    margin: 0 6px 0 0;
    accent-color: #ffffff;
    cursor: pointer;
}

.news-player-select {
    max-width: 96px;
    height: 32px;
    margin-inline: 4px;
    padding: 0 24px 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.news-player-select option {
    background: #111111;
    color: #ffffff;
}

.news-player-message {
    display: none;
}

.news-player-message.is-visible {
    position: absolute;
    z-index: 12;
    right: 16px;
    bottom: 72px;
    left: 16px;
    display: block;
    padding: 11px 13px;
    border-left: 4px solid #ffffff;
    background: rgba(18, 18, 18, 0.94);
    color: #ffffff;
    font-size: 13px;
    line-height: 1.45;
}

.news-player-message.is-error {
    border-left-color: var(--news-player-accent);
}

.news-custom-player:fullscreen,
.news-custom-player:-webkit-full-screen {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
}

@media screen and (max-width: 760px) {
    .news-custom-player {
        --news-player-control-size: 36px;
        border-radius: 4px;
    }

    .news-player-center-play {
        width: 58px;
        height: 58px;
        font-size: 20px;
    }

    .news-player-controls {
        padding: 28px 7px 7px;
    }

    .news-player-skip,
    .news-player-volume,
    .news-player-rate-label {
        display: none !important;
    }

    .news-player-time {
        min-width: 75px;
        padding-inline: 2px 4px;
        font-size: 10px;
    }

    .news-player-select {
        max-width: 76px;
        margin-inline: 2px;
        padding-left: 5px;
        font-size: 10px;
    }
}

@media screen and (max-width: 480px) {
    .news-player-quality,
    .news-player-download {
        display: none !important;
    }

    .news-player-title {
        max-width: 94%;
        font-size: 12px;
    }
}
