/**
 * WooCommerce Product Video Shortcode Styles
 * File: assets/style.css
 */

/* Video Wrapper */
.wc-product-video-wrapper {
    margin: 20px 0;
    clear: both;
}

/* Video Title */
.wc-product-video-title {
    margin-bottom: 15px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
}

/* Video Container */
.wc-product-video-container {
    max-width: 100%;
    margin: 0 auto;
}

/* Responsive Video Wrapper */
.wc-product-video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* Default 16:9 */
    height: 0;
    overflow: hidden;
    background-color: #000;
    border-radius: 8px;
}

.wc-product-video-responsive iframe,
.wc-product-video-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 8px;
}

/* Video Description */
.wc-product-video-description {
    margin-top: 15px;
    color: #666;
    font-size: 0.95em;
    line-height: 1.6;
}

/* Alignment Classes */
.wc-product-video-wrapper.alignleft {
    float: left;
    margin-right: 20px;
    max-width: 50%;
}

.wc-product-video-wrapper.alignright {
    float: right;
    margin-left: 20px;
    max-width: 50%;
}

.wc-product-video-wrapper.aligncenter {
    text-align: center;
}

.wc-product-video-wrapper.aligncenter .wc-product-video-container {
    display: inline-block;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wc-product-video-wrapper.alignleft,
    .wc-product-video-wrapper.alignright {
        float: none;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .wc-product-video-title {
        font-size: 1.1em;
    }
    
    .wc-product-video-description {
        font-size: 0.9em;
    }
}

/* Video Loading State */
.wc-product-video-responsive.loading {
    background: #f5f5f5 url('data:image/svg+xml;utf8,<svg width="40" height="40" viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg"><circle cx="20" cy="20" r="18" fill="none" stroke="%23ddd" stroke-width="3"/><circle cx="20" cy="20" r="18" fill="none" stroke="%23333" stroke-width="3" stroke-dasharray="89" stroke-dashoffset="89"><animate attributeName="stroke-dashoffset" dur="1.5s" repeatCount="indefinite" from="89" to="0"/></circle></svg>') center center no-repeat;
    background-size: 40px 40px;
}

/* WooCommerce Product Page Integration */
.single-product .wc-product-video-wrapper {
    margin: 30px 0;
}

/* Gallery Integration */
.woocommerce-product-gallery + .wc-product-video-wrapper {
    margin-top: 30px;
}

/* Tab Integration */
.woocommerce-tabs .wc-product-video-wrapper {
    margin: 0;
}

/* Shadow Effect */
.wc-product-video-responsive {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.wc-product-video-responsive:hover {
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .wc-product-video-title {
        color: #e0e0e0;
    }
    
    .wc-product-video-description {
        color: #b0b0b0;
    }
    
    .wc-product-video-responsive {
        background-color: #1a1a1a;
    }
}