/* Remotion WordPress Plugin - Frontend Styles */

.remotion-video-container {
    margin: 20px 0;
    position: relative;
}

.remotion-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.remotion-video-wrapper iframe,
.remotion-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.remotion-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 8px;
}

.remotion-video-container:hover .remotion-video-overlay {
    opacity: 1;
}

.remotion-play-button {
    width: 80px;
    height: 80px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.remotion-play-button:hover {
    background: #fff;
    transform: scale(1.1);
}

.remotion-play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #333;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.remotion-video-info {
    padding: 15px 0;
}

.remotion-video-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.3;
}

.remotion-video-description {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.remotion-video-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    font-size: 14px;
    color: #888;
}

.remotion-video-duration,
.remotion-video-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.remotion-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px 0;
}

.remotion-video-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
}

.remotion-video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.remotion-video-card .remotion-video-wrapper {
    border-radius: 0;
    margin-bottom: 0;
}

.remotion-video-card .remotion-video-info {
    padding: 20px;
}

.remotion-video-card .remotion-video-title {
    font-size: 18px;
    margin-bottom: 8px;
}

.remotion-video-card .remotion-video-description {
    font-size: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lightbox styles */
.remotion-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.remotion-lightbox.active {
    opacity: 1;
    visibility: visible;
}

.remotion-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.remotion-lightbox-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.remotion-lightbox-close:hover {
    background: rgba(255,255,255,0.2);
}

.remotion-lightbox-close::before {
    content: '×';
}

/* Progress bar for loading */
.remotion-loading-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: #007cba;
    width: 0%;
    transition: width 0.3s ease;
}

/* Responsive video gallery */
@media (max-width: 768px) {
    .remotion-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .remotion-video-title {
        font-size: 20px;
    }
    
    .remotion-play-button {
        width: 60px;
        height: 60px;
    }
    
    .remotion-play-button::before {
        border-left-width: 15px;
        border-top-width: 9px;
        border-bottom-width: 9px;
    }
    
    .remotion-lightbox-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .remotion-video-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .remotion-video-card .remotion-video-info {
        padding: 15px;
    }
}

/* Accessibility */
.remotion-play-button:focus,
.remotion-lightbox-close:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .remotion-video-overlay,
    .remotion-play-button,
    .remotion-lightbox {
        display: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .remotion-video-title {
        color: #fff;
    }
    
    .remotion-video-description {
        color: #ccc;
    }
    
    .remotion-video-meta {
        color: #aaa;
    }
    
    .remotion-video-card {
        background: #1a1a1a;
        color: #fff;
    }
}

/* Animation keyframes */
@keyframes remotion-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.remotion-loading .remotion-play-button {
    animation: remotion-pulse 1.5s ease-in-out infinite;
}

/* Video controls styling */
.remotion-video-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 6px;
}

.remotion-control-button {
    background: none;
    border: 1px solid #ddd;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.remotion-control-button:hover {
    background: #f0f0f0;
    border-color: #007cba;
}

.remotion-control-button:active {
    transform: scale(0.95);
}