/* 
 * Product Video Frontend Styles
 * Premium Video Player for CODleade Theme
 */

.codleade-product-video-container {
    width: 100%;
    max-width: 100%;
    margin: 25px 0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    background: #000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cod-video-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    line-height: 0;
}

/* Aspect Ratio Handling */
.ratio-16-9 .cod-video-wrapper {
    aspect-ratio: 16 / 9;
}

.ratio-1-1 .cod-video-wrapper {
    aspect-ratio: 1 / 1;
}

.ratio-9-16 .cod-video-wrapper {
    aspect-ratio: 9 / 16;
}

/* Fallback for browsers not supporting aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
    .ratio-16-9 .cod-video-wrapper { padding-top: 56.25%; }
    .ratio-1-1 .cod-video-wrapper { padding-top: 100%; }
    .ratio-9-16 .cod-video-wrapper { padding-top: 177.77%; }
    
    .cod-video-wrapper video {
        position: absolute;
        top: 0;
        left: 0;
    }
}

.cod-video-wrapper video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    background: #000;
}

/* Player Controls */
.cod-video-controls {
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.cod-video-toggle-play {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cod-video-toggle-play:hover {
    background: rgba(255, 255, 255, 0.4);
}

.cod-video-toggle-play svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Big Play Button Overlay */
.cod-video-overlay-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 5;
    transition: background 0.3s ease;
}

.cod-video-overlay-play:hover {
    background: rgba(0, 0, 0, 0.3);
}

.cod-video-overlay-play svg {
    width: 64px;
    height: 64px;
    color: #fff;
    filter: drop-shadow(0 4px 12px rgba(0,0,0,0.3));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cod-video-overlay-play:hover svg {
    transform: scale(1.15);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .codleade-product-video-container {
        border-radius: 12px;
        margin: 20px 0;
    }
    .cod-video-overlay-play svg {
        width: 48px;
        height: 48px;
    }
    .cod-video-controls {
        opacity: 1;
        transform: none;
        bottom: 10px;
        left: 10px;
        right: 10px;
    }
    .cod-video-toggle-play {
        width: 32px;
        height: 32px;
    }
}
