/* ========================================
   Shoppable Videos Frontend Styles
   TikTok/Instagram Reels Style
   ======================================== */

.svwc-video-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    max-width: 100%;
    margin: 0 auto;
}

.svwc-video-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.svwc-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ========================================
   Video Container
   ======================================== */

.svwc-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 9/16;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

/* Remove all default video UI elements */
.svwc-video-container video {
    outline: none;
    border: none;
}

.svwc-video-container video::cue {
    display: none;
}

/* Hide all browser controls and overlays */
.svwc-video-container video::-webkit-media-controls,
.svwc-video-container video::-webkit-media-controls-panel,
.svwc-video-container video::-webkit-media-controls-play-button,
.svwc-video-container video::-webkit-media-controls-start-playback-button {
    display: none !important;
    -webkit-appearance: none;
}

.svwc-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hide default video controls */
.svwc-video-player::-webkit-media-controls {
    display: none !important;
}

.svwc-video-player::-webkit-media-controls-enclosure {
    display: none !important;
}

.svwc-video-player::-webkit-media-controls-panel {
    display: none !important;
}

/* ========================================
   Video Overlay Controls
   ======================================== */

.svwc-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.svwc-video-overlay > * {
    pointer-events: auto;
}

.svwc-video-top {
    display: none; /* Hide top controls - sound toggle causing circles */
}

.svwc-sound-toggle {
    display: none !important; /* Force hide sound toggle */
}

/* ========================================
   Video Bottom Info & Actions
   ======================================== */

.svwc-video-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

.svwc-views-count {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
}

.svwc-views-count svg {
    width: 16px;
    height: 16px;
}

.svwc-action-buttons {
    display: none; /* Hide action buttons that are showing as circles */
}

.svwc-like-btn,
.svwc-share-btn {
    display: none !important; /* Force hide problematic buttons */
}

.svwc-like-btn.liked svg {
    fill: #ff2d55;
    stroke: #ff2d55;
    animation: svwc-heart-pop 0.3s ease;
}

@keyframes svwc-heart-pop {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.3); }
}

/* ========================================
   Product Info Card
   ======================================== */

.svwc-product-info {
    padding: 16px;
    background: #fff;
}

.svwc-product-image {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 2px solid #f5f5f5;
}

.svwc-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.svwc-product-details {
    margin-bottom: 16px;
}

.svwc-product-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.svwc-product-pricing {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.svwc-current-price {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
}

.svwc-regular-price {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.svwc-discount-badge {
    display: inline-block;
    background: #00c853;
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.svwc-buy-now-btn {
    display: block;
    width: 100%;
    background: #000;
    color: #fff;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.svwc-buy-now-btn:hover {
    background: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Video States
   ======================================== */

.svwc-video-card.playing .svwc-video-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.svwc-video-card.paused .svwc-video-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.svwc-video-card.paused .svwc-video-container::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-45%, -50%);
    color: #fff;
    font-size: 24px;
    z-index: 2;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .svwc-video-feed {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 12px;
    }
    
    .svwc-product-title {
        font-size: 14px;
    }
    
    .svwc-current-price {
        font-size: 16px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .svwc-video-feed {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 12px;
    }
    
    .svwc-video-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Make videos shorter so 2 fit on screen */
    .svwc-video-container {
        aspect-ratio: 9/14; /* Shorter aspect ratio for mobile */
        max-height: 45vh; /* Maximum 45% of viewport height */
    }
}

/* Desktop - 3 columns */
@media (min-width: 1024px) {
    .svwc-video-feed {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 24px;
        max-width: 1400px;
    }
}

/* Large Desktop - 4 columns */
@media (min-width: 1440px) {
    .svwc-video-feed {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================
   Loading State
   ======================================== */

.svwc-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.svwc-loading::after {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #000;
    border-radius: 50%;
    animation: svwc-spin 1s linear infinite;
}

@keyframes svwc-spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   Share Modal (Simple)
   ======================================== */

.svwc-share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.svwc-share-modal.active {
    display: flex;
}

.svwc-share-content {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    max-width: 400px;
    width: 90%;
}

.svwc-share-content h3 {
    margin-top: 0;
}

.svwc-share-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.svwc-share-buttons a {
    flex: 1;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.svwc-share-buttons a:hover {
    opacity: 0.8;
}

.svwc-share-whatsapp {
    background: #25D366;
    color: #fff;
}

.svwc-share-facebook {
    background: #1877F2;
    color: #fff;
}

.svwc-share-twitter {
    background: #1DA1F2;
    color: #fff;
}
