/* Abad blog video player — replaces legacy videojs styles */

.abad-vp {
    --abad-vp-accent: #0891b2;
    --abad-vp-accent-hover: #0e7490;
    --abad-vp-bar-bg: rgba(8, 12, 20, 0.82);
    --abad-vp-control-h: 42px;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #0a0a0a;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.abad-vp--videojs_style2 { --abad-vp-accent: #ea580c; --abad-vp-accent-hover: #c2410c; }
.abad-vp--videojs_style3 { --abad-vp-accent: #059669; --abad-vp-accent-hover: #047857; }
.abad-vp--videojs_style4 { --abad-vp-accent: #7c3aed; --abad-vp-accent-hover: #6d28d9; }

.abad-vp__video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #000;
}

.abad-vp__watermark {
    position: absolute;
    z-index: 4;
    opacity: 0.85;
    transition: opacity 0.2s;
    pointer-events: auto;
}
.abad-vp__watermark:hover { opacity: 1; }
.abad-vp__watermark--rt { top: 12px; right: 12px; }
.abad-vp__watermark--lt { top: 12px; left: 12px; }
.abad-vp__watermark img {
    max-height: 36px;
    max-width: 100px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.abad-vp__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    cursor: pointer;
}

.abad-vp__big-play {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.25);
    border: none;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
}
.abad-vp__big-play i {
    font-size: 3.5rem;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
}
.abad-vp__big-play:hover { background: rgba(0, 0, 0, 0.35); }
.abad-vp.is-playing .abad-vp__big-play,
.abad-vp.is-playing.abad-vp--controls-visible .abad-vp__big-play { opacity: 0; pointer-events: none; }

.abad-vp__controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 6px 10px 8px;
    background: linear-gradient(transparent, var(--abad-vp-bar-bg));
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}
.abad-vp--controls-visible .abad-vp__controls,
.abad-vp:focus-within .abad-vp__controls,
.abad-vp.is-paused .abad-vp__controls {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.abad-vp__progress-wrap {
    flex: 1 1 100%;
    order: -1;
    height: 18px;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 4px 0;
}
.abad-vp__progress-track {
    position: relative;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    overflow: hidden;
    transition: height 0.12s;
}
.abad-vp__progress-wrap:hover .abad-vp__progress-track { height: 6px; }
.abad-vp__progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.35);
    width: 0;
}
.abad-vp__progress-played {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: var(--abad-vp-accent);
    width: 0;
    border-radius: 4px;
}
.abad-vp__progress-thumb {
    position: absolute;
    top: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.12s;
}
.abad-vp__progress-wrap:hover .abad-vp__progress-thumb { opacity: 1; }

.abad-vp__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.abad-vp__btn:hover { background: rgba(255, 255, 255, 0.12); }
.abad-vp__btn.is-active { color: var(--abad-vp-accent); }
.abad-vp__btn-label {
    font-size: 11px;
    font-weight: 700;
    margin-left: 2px;
}

.abad-vp__time {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    min-width: 88px;
    text-align: center;
}

.abad-vp__volume {
    display: flex;
    align-items: center;
    gap: 4px;
    max-width: 100px;
}
.abad-vp__volume-range {
    width: 64px;
    height: 4px;
    accent-color: var(--abad-vp-accent);
    cursor: pointer;
}

.abad-vp__speed-menu {
    position: absolute;
    bottom: calc(var(--abad-vp-control-h) + 8px);
    right: 48px;
    background: rgba(15, 18, 28, 0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 4px;
    display: none;
    flex-direction: column;
    min-width: 72px;
    z-index: 10;
    box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.abad-vp__speed-menu.is-open { display: flex; }
.abad-vp__speed-option {
    border: none;
    background: transparent;
    color: #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
}
.abad-vp__speed-option:hover,
.abad-vp__speed-option.is-active { background: var(--abad-vp-accent); color: #fff; }

.abad-vp.is-theater {
    aspect-ratio: auto;
    max-height: min(78vh, 900px);
}
.abad-vp.is-theater .abad-vp__video {
    max-height: min(78vh, 900px);
}

.abad-vp.is-pip-sticky {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: min(360px, 92vw) !important;
    aspect-ratio: 16 / 9 !important;
    z-index: 99999 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45) !important;
    animation: abadVpSlideIn 0.25s ease-out;
}
@keyframes abadVpSlideIn {
    from { transform: translateX(40px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

body.abad-vp-theater-mode .th-blog-wrapper.blog-details > .container > .row > .sidebar-wrap,
body.abad-vp-theater-mode .sidebar-wrap:has(+ .col-xxl-8) {
    display: none !important;
}
body.abad-vp-theater-mode .th-blog-wrapper.blog-details > .container > .row > [class*="col-xxl-8"],
body.abad-vp-theater-mode .th-blog-wrapper.blog-details > .container > .row > [class*="col-lg-8"]:not(.sidebar-wrap) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

.premium-video-player-anchor-holder {
    max-width: 100%;
}
.premium-video-player-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 12px;
    overflow: visible;
}

@media (max-width: 767px) {
    .abad-vp__volume-range { width: 48px; }
    .abad-vp__btn-label { display: none; }
    .abad-vp__time { min-width: 72px; font-size: 10px; }
}
