/**
 * XraySourcing - Video Tutorials Styling
 * Fully responsive video gallery
 */

/* Video Grid */
.rx-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

@media (max-width: 768px) {
    .rx-video-grid {
        grid-template-columns: 1fr;
    }
}

/* Video Card */
.rx-video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rx-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* Video Thumbnail */
.rx-video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #f1f5f9;
    overflow: hidden;
}

.rx-video-thumbnail video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play Button Overlay */
.rx-video-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.rx-video-card:hover .rx-video-play-overlay {
    background: rgba(0, 0, 0, 0.5);
}

.rx-video-play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.rx-video-card:hover .rx-video-play-button {
    transform: scale(1.1);
    background: white;
}

/* Video Modal/Lightbox */
.rx-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.rx-video-modal-content {
    max-width: 1200px;
    width: 100%;
    position: relative;
}

.rx-video-modal video {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.rx-video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.rx-video-modal-close:hover {
    transform: scale(1.1);
}

/* Video Info Below Player */
.rx-video-modal-info {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
}

.rx-video-modal-info h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #0a0a0a;
}

.rx-video-modal-info p {
    margin: 0;
    color: #64748b;
    line-height: 1.6;
}

/* Suggestion Form */
#rx-video-suggestion-form input,
#rx-video-suggestion-form select,
#rx-video-suggestion-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.95);
    transition: border-color 0.2s ease, background 0.2s ease;
}

#rx-video-suggestion-form input:focus,
#rx-video-suggestion-form select:focus,
#rx-video-suggestion-form textarea:focus {
    outline: none;
    border-color: white;
    background: white;
}

#rx-video-suggestion-form button[type="submit"] {
    width: 100%;
    background: white;
    color: #667eea;
    padding: 16px;
    border: none;
    border-radius: 8px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#rx-video-suggestion-form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

#rx-video-suggestion-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success/Error Messages */
#rx-suggestion-message {
    padding: 15px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#rx-suggestion-message.success {
    background: #d1fae5;
    color: #065f46;
}

#rx-suggestion-message.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .rx-video-modal {
        padding: 10px;
    }
    
    .rx-video-modal-close {
        top: 10px;
        right: 10px;
    }
    
    .rx-video-modal-info {
        padding: 15px;
    }
    
    .rx-video-modal-info h3 {
        font-size: 20px;
    }
}
