/**
 * Pym Video Player - Professional Modern Styles با !important
 * استایل‌های حرفه‌ای و مدرن پلیر ویدیو
 */

/* ========== متغیرهای CSS ========== */
:root {
    --pym-video-primary: #453F5E !important;
    --pym-video-accent: #6C63FF !important;
    --pym-video-bg: rgba(0, 0, 0, 0.85) !important;
    --pym-video-text: #ffffff !important;
    --pym-video-text-secondary: rgba(255, 255, 255, 0.7) !important;
    --pym-video-border: rgba(255, 255, 255, 0.1) !important;
    --pym-video-shadow: rgba(0, 0, 0, 0.3) !important;
    --pym-video-radius: 12px !important;
    --pym-video-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* ========== Container ========== */
.pym-video-player {
    position: relative !important;
    width: 100% !important;
    background: #000 !important;
    border-radius: var(--pym-video-radius) !important;
    overflow: visible !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
}

/* ========== Video Container ========== */
.pym-video-container {
    position: relative !important;
    width: 100% !important;
    padding-bottom: var(--pym-video-aspect, 56.25%) !important;
    background: #000 !important;
    cursor: pointer !important;
    overflow: hidden !important;
    border-radius: var(--pym-video-radius) !important;
}

.pym-video-container video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
}

/* ========== Poster & Big Play Button ========== */
.pym-video-poster {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    transition: opacity 0.3s ease !important;
}

.pym-video-player.pym-playing .pym-video-poster {
    opacity: 0 !important;
    pointer-events: none !important;
}

.pym-big-play-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    z-index: 2 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    transition: var(--pym-video-transition) !important;
}

.pym-video-player.pym-playing .pym-big-play-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
}

.pym-big-play-btn {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background: rgba(81, 86, 73, 0.19) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 3px solid rgba(255, 255, 255, 0.3) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.pym-big-play-btn:hover {
    transform: scale(1.1) !important;
    background: rgba(81, 86, 73, 0.35) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 12px 48px rgba(81, 86, 73, 0.4) !important;
}

.pym-big-play-btn i,
.pym-big-play-btn svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}

/* ========== Controls Container ========== */
.pym-video-controls-container {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: 30px 20px 20px !important;
    z-index: 10 !important;
    border-radius: 8px !important;
    pointer-events: none !important;
}

/* لایه blur ثابت - همیشه visible */
.pym-video-controls-container::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    z-index: -1 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

/* محتوای داخل */
.pym-video-controls-container > * {
    opacity: 0 !important;
    transform: translateY(10px) !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
}

.pym-video-player.pym-controls-visible .pym-video-controls-container::before,
.pym-video-player.pym-show-controls .pym-video-controls-container::before,
.pym-video-player:hover .pym-video-controls-container::before {
    opacity: 1 !important;
}

.pym-video-player.pym-controls-visible .pym-video-controls-container > *,
.pym-video-player.pym-show-controls .pym-video-controls-container > *,
.pym-video-player:hover .pym-video-controls-container > * {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.pym-video-player.pym-controls-visible .pym-video-controls-container,
.pym-video-player.pym-show-controls .pym-video-controls-container,
.pym-video-player:hover .pym-video-controls-container {
    pointer-events: auto !important;
}

/* ========== Progress Bar ========== */
.pym-video-progress-wrapper {
    position: relative !important;
    width: 100% !important;
    height: 8px !important;
    cursor: pointer !important;
    margin-bottom: 15px !important;
}

.pym-video-progress-bar {
    position: relative !important;
    width: 100% !important;
    height: 4px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 2px !important;
    overflow: hidden !important;
    direction: rtl !important;
}

.pym-video-progress-buffered {
    position: absolute !important;
    height: 100% !important;
    background: rgba(255, 255, 255, 0.5) !important;
    border-radius: 2px !important;
    transition: width 0.3s ease !important;
    top: 0 !important;
    right: 0 !important;
}

.pym-video-progress-filled {
    position: absolute !important;
    height: 100% !important;
    background: #fff !important;
    border-radius: 2px !important;
    transition: width 0.1s linear !important;
    top: 0 !important;
    right: 0 !important;
}

.pym-video-progress-handle {
    position: absolute !important;
    width: 14px !important;
    height: 14px !important;
    background: #ffffff !important;
    border-radius: 50% !important;
    top: 50% !important;
    right: 0 !important;
    transform: translate(50%, -50%) scale(0) !important;
    transition: transform 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    pointer-events: none !important;
}

.pym-video-progress-wrapper:hover .pym-video-progress-handle,
.pym-video-progress-wrapper.pym-dragging .pym-video-progress-handle {
    transform: translate(50%, -50%) scale(1) !important;
}

/* ========== Progress Tooltip ========== */
.pym-video-progress-tooltip {
    position: absolute !important;
    bottom: calc(100% + 10px) !important;
    transform: translateX(-50%) !important;
    background: rgba(0, 0, 0, 0.9) !important;
    color: #ffffff !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    white-space: nowrap !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.2s ease, visibility 0.2s ease !important;
    z-index: 15 !important;
    pointer-events: none !important;
}

.pym-video-progress-wrapper:hover .pym-video-progress-tooltip {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ========== Controls Row ========== */
.pym-video-controls-row {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
}

/* ========== Buttons ========== */
.pym-video-btn {
    width: 36px !important;
    height: 36px !important;
    border: none !important;
    background: transparent !important;
    color: var(--pym-video-text) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
}

.pym-video-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: scale(1.1) !important;
}

.pym-video-btn:active {
    transform: scale(0.95) !important;
}

.pym-video-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: currentColor !important;
}

/* ========== Time Display ========== */
.pym-video-time-display {
    color: var(--pym-video-text) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    font-variant-numeric: tabular-nums !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.pym-video-time-current,
.pym-video-time-duration {
    color: var(--pym-video-text) !important;
}

.pym-video-time-separator {
    color: var(--pym-video-text-secondary) !important;
    margin: 0 2px !important;
}

/* ========== Volume Control ========== */
.pym-video-volume-control {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    position: relative !important;
}

.pym-video-volume-slider-wrapper {
    position: absolute !important;
    bottom: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    padding-bottom: 12px !important;
}

.pym-video-volume-control:hover .pym-video-volume-slider-wrapper,
.pym-video-volume-slider-wrapper:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pym-video-volume-slider-wrapper::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 130px !important;
    height: 30px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(20px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    z-index: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pym-video-volume-slider {
    width: 100px !important;
    height: 4px !important;
    top: 1px !important;
    border-radius: 2px !important;
    background: transparent !important;
    outline: none !important;
    cursor: pointer !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 14px 15px !important;
    position: relative !important;
    display: block !important;
    z-index: 1 !important;
}

.pym-video-volume-slider::-webkit-slider-runnable-track {
    width: 100% !important;
    height: 4px !important;
    border-radius: 2px !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.pym-video-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    cursor: pointer !important;
    margin-top: -4px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

.pym-video-volume-slider::-moz-range-track {
    width: 100% !important;
    height: 4px !important;
    border-radius: 2px !important;
    background: rgba(255, 255, 255, 0.3) !important;
}

.pym-video-volume-slider::-moz-range-thumb {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background: #ffffff !important;
    cursor: pointer !important;
    border: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3) !important;
}

/* ========== Settings Menu ========== */
.pym-video-settings-control {
    position: relative !important;
}

.pym-video-settings-menu {
    position: absolute !important;
    bottom: 100% !important;
    left: 0 !important;
    background: rgba(0, 0, 0, 0.3) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border-radius: 10px !important;
    padding: 6px !important;
    min-width: auto !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.2s ease !important;
    z-index: 9999 !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    pointer-events: none !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.pym-video-settings-menu.pym-active,
.pym-video-settings-menu:hover {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pym-video-settings-control:hover .pym-video-settings-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.pym-video-settings-menu-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 6px 10px !important;
    padding-bottom: 2px !important;
    color: #ffffff !important;
    font-size: 13px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border-radius: 6px !important;
    margin: 0 !important;
    background: transparent !important;
    border: none !important;
}

.pym-video-settings-menu-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
}

.pym-video-settings-menu-item.pym-active {
    color: #96a282 !important;
    background: rgba(81, 86, 73, 0.19) !important;
}

.pym-video-settings-menu-item i {
    font-size: 11px !important;
}

/* ========== Spacer ========== */
.pym-video-spacer {
    flex: 1 !important;
}

/* ========== Loading Spinner ========== */
.pym-video-loading {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 60px !important;
    height: 60px !important;
    z-index: 5 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
}

.pym-video-player.pym-buffering .pym-video-loading {
    opacity: 1 !important;
}

.pym-video-loading-spinner {
    width: 60px !important;
    height: 60px !important;
    border: 4px solid rgba(255, 255, 255, 0.2) !important;
    border-top-color: var(--pym-video-accent) !important;
    border-radius: 50% !important;
    animation: pym-spin 1s linear infinite !important;
}

@keyframes pym-spin {
    to {
        transform: rotate(360deg) !important;
    }
}

/* ========== Fullscreen ========== */
.pym-video-player.pym-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
}

.pym-video-player.pym-fullscreen .pym-video-container {
    padding-bottom: 0 !important;
    height: 100% !important;
}

/* ========== Mobile Responsive ========== */
@media (max-width: 768px) {
    /* کاهش ارتفاع و padding کنترل‌ها برای نمایش بیشتر ویدیو */
    .pym-video-controls-container {
        padding: 5px 10px 5px !important;
    }
    
    /* Progress Bar - کاهش ارتفاع و فاصله */
    .pym-video-progress-wrapper {
        height: 6px !important;
        margin-bottom: 4px !important;
        margin-top: 4px !important;
    }
    
    .pym-video-progress-bar {
        height: 3px !important;
    }
    
    .pym-video-progress-handle {
        width: 10px !important;
        height: 10px !important;
    }
    
    .pym-video-progress-tooltip {
        font-size: 11px !important;
        padding: 4px 8px !important;
        bottom: calc(100% + 6px) !important;
    }
    
    /* Controls Row - کاهش فاصله */
    .pym-video-controls-row {
        gap: 6px !important;
    }
    
    /* Buttons - کاهش سایز به 26px */
    .pym-video-btn {
        width: 26px !important;
        height: 26px !important;
    }
    
    .pym-video-btn svg,
    .pym-video-btn i {
        font-size: 8px !important;
        width: 8px !important;
        height: 8px !important;
    }
    
    /* دکمه پخش اصلی - بزرگتر */
    .pym-video-main-play {
        width: 42px !important;
        height: 42px !important;
    }
    
    .pym-video-main-play svg,
    .pym-video-main-play i {
        font-size: 12px !important;
        width: 12px !important;
        height: 12px !important;
    }
    
    /* دکمه‌های Seek - خیلی کوچکتر */
    .pym-video-seek-btn {
        width: 32px !important;
        height: 32px !important;
    }
    
    .pym-video-seek-text {
        font-size: 9px !important;
    }
    
    /* Big Play Button */
    .pym-big-play-btn {
        width: 60px !important;
        height: 60px !important;
    }
    
    .pym-big-play-btn svg,
    .pym-big-play-btn i {
        font-size: 24px !important;
        width: 24px !important;
        height: 24px !important;
    }
    
    /* Time Display - کاهش سایز */
    .pym-video-time-display {
        font-size: 11px !important;
        gap: 2px !important;
    }
    
    .pym-video-time-separator {
        margin: 0 1px !important;
    }
    
    /* Volume Control - نمایش تولتیپ در موبایل */
    .pym-video-volume-slider-wrapper {
        position: absolute !important;
        bottom: calc(100% + 5px) !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
    }
    
    .pym-video-volume-control:hover .pym-video-volume-slider-wrapper,
    .pym-video-volume-control:active .pym-video-volume-slider-wrapper {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }
    
    .pym-video-volume-control {
        gap: 0 !important;
        position: relative !important;
    }
    
    /* Settings Menu - تنظیم موقعیت مثل پلیر صوتی */
    .pym-video-settings-menu {
        right: 50% !important;
        transform: translateX(50%) !important;
        padding: 3px 4px !important;
        gap: 2px !important;
        bottom: calc(100% + 5px) !important;
    }
    
    .pym-video-settings-menu-item {
        padding: 4px 6px !important;
        padding-bottom: 2px !important;
        font-size: 10px !important;
    }
    
    /* Spacer - کاهش فضا */
    .pym-video-spacer {
        flex: 0.5 !important;
    }
}

/* ========== RTL Support ========== */
.pym-video-player[dir="rtl"] .pym-big-play-btn svg {
    margin-right: 0 !important;
    margin-left: -4px !important;
}

.pym-video-player[dir="rtl"] .pym-video-settings-menu {
    right: auto !important;
    left: 50% !important;
}

.pym-video-player[dir="rtl"] .pym-video-settings-menu-item i {
    margin-left: 0 !important;
    margin-right: 6px !important;
}

/* ========== Accessibility ========== */
.pym-video-btn:focus-visible {
    outline: 2px solid var(--pym-video-accent) !important;
    outline-offset: 2px !important;
}

.pym-video-progress-wrapper:focus-visible {
    outline: 2px solid var(--pym-video-accent) !important;
    outline-offset: 2px !important;
}

/* ========== Error States ========== */
.pym-error {
    color: #ff4444 !important;
    padding: 20px !important;
    text-align: center !important;
    background: rgba(255, 68, 68, 0.1) !important;
    border-radius: 8px !important;
}

/* ========== دکمه‌های 10 ثانیه ========== */
.pym-video-seek-btn {
    width: 44px !important;
    height: 44px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) saturate(150%) !important;
    -webkit-backdrop-filter: blur(10px) saturate(150%) !important;
    border-radius: 50% !important;
    position: relative !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3) !important;
}

.pym-video-seek-btn:hover {
    background: rgba(0, 0, 0, 0.25) !important;
    transform: scale(1.05) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.pym-video-seek-text {
    position: absolute !important;
    bottom: 2px !important;
    right: 50% !important;
    transform: translateX(50%) !important;
    font-size: 9px !important;
    font-weight: 600 !important;
    color: var(--pym-video-text) !important;
}

/* دکمه پلی اصلی بزرگتر */
.pym-video-main-play {
    width: 52px !important;
    height: 52px !important;
    background: rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(15px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(15px) saturate(180%) !important;
    border-radius: 50% !important;
    border: 2px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

.pym-video-main-play:hover {
    background: rgba(0, 0, 0, 0.25) !important;
    transform: scale(1.08) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

.pym-video-main-play i {
    font-size: 20px !important;
}

/* ========== Responsive: Mobile ========== */
@media (max-width: 640px) {
    /* تنظیمات سرعت در موبایل */
    .pym-video-settings-menu {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        bottom: calc(100% + 8px) !important;
        padding-bottom: 8px !important;
    }
    
    /* دکمه‌های کوچکتر در موبایل */
    .pym-video-seek-btn {
        width: 26px !important;
        height: 26px !important;
    }
    
    .pym-video-main-play {
        width: 30px !important;
        height: 30px !important;
    }

    .pym-video-main-play i {
    font-size: 10px !important;
    margin-top: 3px !important;
    }
    
    .pym-video-seek-text {
        display: none !important;
    }
    
    /* مخفی کردن زمان در موبایل */
    .pym-video-time-display {
        display: none !important;
    }
}

/* ========== Touch-friendly styles for mobile video ========== */
@media (hover: none) and (pointer: coarse) {
    /* دکمه‌های بزرگتر برای لمس راحت‌تر */
    .pym-video-btn {
        min-width: 44px !important;
        min-height: 44px !important;
    }

    /* دکمه تمام صفحه بزرگتر */
    .pym-video-fullscreen-btn {
        min-width: 48px !important;
        min-height: 48px !important;
    }

    /* Big Play Button بزرگتر برای لمس راحت */
    .pym-big-play-btn {
        width: 80px !important;
        height: 80px !important;
    }

    .pym-big-play-btn i {
        font-size: 32px !important;
    }
}

/* WooCommerce product media base styles — kept for backward compatibility in v10.3.0 */
.pym-product-video-replacement {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.pym-product-video-replacement .pym-video-player {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

body.pym-product-video-gallery-replaced .pym-product-video-replacement video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 767px) {
    .pym-product-video-replacement {
        border-radius: 16px;
        overflow: hidden;
    }
}


/* ========================================================================== 
   v10.4.1 — True responsive fullscreen for the professional video player
   ========================================================================== */
html.pym-video-fullscreen-active,
html.pym-video-fullscreen-active body {
    overscroll-behavior: none !important;
}

.pym-video-player:fullscreen,
.pym-video-player:-webkit-full-screen,
.pym-video-player.pym-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    width: 100dvw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    overflow: hidden !important;
    z-index: 2147483000 !important;
}

.pym-video-player:fullscreen .pym-video-container,
.pym-video-player:-webkit-full-screen .pym-video-container,
.pym-video-player.pym-fullscreen .pym-video-container {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    border-radius: 0 !important;
    background: #000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.pym-video-player:fullscreen .pym-video-element,
.pym-video-player:-webkit-full-screen .pym-video-element,
.pym-video-player.pym-fullscreen .pym-video-element,
.pym-video-player:fullscreen .pym-video-poster,
.pym-video-player:-webkit-full-screen .pym-video-poster,
.pym-video-player.pym-fullscreen .pym-video-poster {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    object-fit: contain !important;
    object-position: 50% 50% !important;
    background: #000 !important;
}

.pym-video-player:fullscreen .pym-video-controls-container,
.pym-video-player:-webkit-full-screen .pym-video-controls-container,
.pym-video-player.pym-fullscreen .pym-video-controls-container {
    position: absolute !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
    border-radius: 0 !important;
    z-index: 30 !important;
}

@media (max-width: 768px) {
    .pym-video-player:fullscreen .pym-video-controls-container,
    .pym-video-player:-webkit-full-screen .pym-video-controls-container,
    .pym-video-player.pym-fullscreen .pym-video-controls-container {
        padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
    }
}


/* ========================================================================== 
   v10.4.5 — Explicit controls hidden state
   Mobile browsers may keep :hover active after a tap. The JS-controlled hidden
   class must therefore override hover so controls really fade while playing.
   ========================================================================== */
.pym-video-player.pym-controls-hidden .pym-video-controls-container::before {
    opacity: 0 !important;
}

.pym-video-player.pym-controls-hidden .pym-video-controls-container > * {
    opacity: 0 !important;
    transform: translateY(8px) !important;
}

.pym-video-player.pym-controls-hidden .pym-video-controls-container {
    pointer-events: none !important;
}

@media (hover: none), (pointer: coarse) {
    .pym-video-player.pym-controls-hidden:hover .pym-video-controls-container::before,
    .pym-video-player.pym-controls-hidden.pym-controls-visible .pym-video-controls-container::before {
        opacity: 0 !important;
    }

    .pym-video-player.pym-controls-hidden:hover .pym-video-controls-container > *,
    .pym-video-player.pym-controls-hidden.pym-controls-visible .pym-video-controls-container > * {
        opacity: 0 !important;
        transform: translateY(8px) !important;
    }

    .pym-video-player.pym-controls-hidden:hover .pym-video-controls-container,
    .pym-video-player.pym-controls-hidden.pym-controls-visible .pym-video-controls-container {
        pointer-events: none !important;
    }
}
