/* Frontend Styles for Random Video Curator */

.rvc-video-container {
    margin: 20px 0;
    width: 100%;
}

.rvc-video-title {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    line-height: 1.2;
}

.rvc-video-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.rvc-video-wrapper iframe,
.rvc-video-wrapper video {
    width: 100%;
    height: auto;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rvc-video-description {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-top: 10px;
}

.rvc-video-description p:last-child {
    margin-bottom: 0;
}

.rvc-no-videos {
    text-align: center;
    padding: 40px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: #6c757d;
    font-size: 16px;
}

.rvc-no-videos::before {
    content: "📹";
    display: block;
    font-size: 48px;
    margin-bottom: 15px;
}

/* Divi Module Styles */
.rvc-divi-module {
    width: 100%;
}

.rvc-divi-module .rvc-video-container {
    margin: 0;
}

.rvc-refresh-button-container {
    text-align: center;
    margin-top: 20px;
}

.rvc-refresh-button {
    background: #0073aa;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.rvc-refresh-button:hover {
    background: #005a87;
}

.rvc-refresh-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Video Wrapper */
.rvc-video-wrapper.responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.rvc-video-wrapper.responsive iframe,
.rvc-video-wrapper.responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Category Badge */
.rvc-category-badge {
    display: inline-block;
    background: #0073aa;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

/* Loading Animation */
.rvc-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: rvc-spin 1s linear infinite;
}

@keyframes rvc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Thumbnail Preview */
.rvc-video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.rvc-video-thumbnail:hover {
    transform: scale(1.02);
}

.rvc-video-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

.rvc-video-thumbnail .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    transition: background-color 0.3s ease;
}

.rvc-video-thumbnail:hover .play-button {
    background: rgba(0, 0, 0, 0.9);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .rvc-video-title {
        font-size: 20px;
    }
    
    .rvc-video-description {
        font-size: 13px;
    }
    
    .rvc-refresh-button {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .rvc-no-videos {
        padding: 30px 15px;
        font-size: 14px;
    }
    
    .rvc-no-videos::before {
        font-size: 36px;
    }
}

@media screen and (max-width: 480px) {
    .rvc-video-title {
        font-size: 18px;
    }
    
    .rvc-video-wrapper iframe,
    .rvc-video-wrapper video {
        border-radius: 4px;
    }
    
    .rvc-refresh-button {
        width: 100%;
        padding: 12px;
    }
}

/* Dark Theme Support */
@media (prefers-color-scheme: dark) {
    .rvc-video-title {
        color: #f0f0f0;
    }
    
    .rvc-video-description {
        color: #ccc;
    }
    
    .rvc-no-videos {
        background: #2d3748;
        border-color: #4a5568;
        color: #a0aec0;
    }
    
    .rvc-category-badge {
        background: #4299e1;
    }
}

/* HLS Video Player Styles */
.rvc-hls-video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Video Link Styles */
.rvc-video-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.rvc-video-link:hover {
    opacity: 0.95;
}

/* Viewport Tracking Indicator */
.rvc-video-trackable {
    position: relative;
}

/* Notification Styles */
.rvc-notification {
    position: fixed;
    top: 32px;
    right: 20px;
    background: #fff;
    border-left: 4px solid #0073aa;
    padding: 12px 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 100000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.rvc-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.rvc-notification-error {
    border-left-color: #dc3232;
}

.rvc-notification-success {
    border-left-color: #46b450;
}

/* Video Error Styles */
.rvc-video-error {
    padding: 20px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    text-align: center;
} 