/**
 * Mobile Video Recorder - Frontend Styles
 * Modern, responsive design for mobile video recording
 */

/* Reset and base styles */
.mvr-recorder-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.mvr-recorder-header {
    text-align: center;
    margin-bottom: 30px;
}

.mvr-recorder-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.mvr-recorder-header p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
}

/* Video preview area */
.mvr-video-preview {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 20px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.mvr-video-preview video {
    width: 100%;
    height: auto;
    display: none;
    border-radius: 12px;
}

.mvr-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 18px;
    text-align: center;
    padding: 40px;
    border-radius: 12px;
}

/* Controls */
.mvr-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.mvr-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 140px;
    justify-content: center;
}

.mvr-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.mvr-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.mvr-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mvr-btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%);
    color: white;
}

.mvr-btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

.mvr-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.mvr-btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    transform: translateY(-2px);
}

.mvr-btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.mvr-btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.4);
}

/* Recording info */
.mvr-recording-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #ff6b6b;
}

.mvr-timer {
    font-size: 24px;
    font-weight: 600;
    color: #ff6b6b;
    margin-bottom: 10px;
}

.mvr-recording-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #ff6b6b;
    font-weight: 500;
}

.mvr-recording-dot {
    width: 12px;
    height: 12px;
    background: #ff6b6b;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Upload section */
.mvr-upload-section {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.mvr-upload-form h4 {
    margin-bottom: 20px;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.mvr-form-group {
    margin-bottom: 20px;
}

.mvr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #495057;
}

.mvr-form-group input,
.mvr-form-group textarea,
.mvr-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.mvr-form-group input:focus,
.mvr-form-group textarea:focus,
.mvr-form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mvr-form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Progress bar */
.mvr-upload-progress {
    margin: 20px 0;
    padding: 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid #e9ecef;
}

.mvr-progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.mvr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.mvr-progress-text {
    text-align: center;
    color: #495057;
    font-weight: 500;
}

/* Messages */
.mvr-messages {
    margin-top: 20px;
}

.mvr-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.mvr-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mvr-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mvr-message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.mvr-message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Video gallery */
.mvr-gallery-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.mvr-gallery-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 28px;
    font-weight: 600;
}

.mvr-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.mvr-video-item {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mvr-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.mvr-video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.mvr-video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mvr-video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    color: #6c757d;
    font-size: 48px;
}

.mvr-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mvr-video-item:hover .mvr-video-overlay {
    opacity: 1;
}

.mvr-play-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #333;
    transition: all 0.3s ease;
}

.mvr-play-btn:hover {
    background: white;
    transform: scale(1.1);
}

.mvr-video-info {
    padding: 20px;
}

.mvr-video-info h4 {
    margin-bottom: 10px;
    font-size: 18px;
    font-weight: 600;
}

.mvr-video-info h4 a {
    color: #333;
    text-decoration: none;
}

.mvr-video-info h4 a:hover {
    color: #667eea;
}

.mvr-video-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    font-size: 14px;
    color: #6c757d;
}

.mvr-video-category {
    background: #e9ecef;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 500;
}

.mvr-video-excerpt {
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* Modal */
.mvr-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.mvr-modal-content {
    position: relative;
    margin: 5% auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
}

.mvr-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.mvr-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.mvr-modal-video {
    width: 100%;
    height: auto;
    display: block;
}

/* Pagination */
.mvr-pagination {
    text-align: center;
    margin-top: 30px;
}

.mvr-pagination .page-numbers {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mvr-pagination .page-numbers:hover,
.mvr-pagination .page-numbers.current {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* No videos message */
.mvr-no-videos {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
    font-size: 18px;
}

/* Responsive design */
@media (max-width: 768px) {
    .mvr-recorder-container {
        padding: 15px;
    }
    
    .mvr-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .mvr-btn {
        width: 100%;
        max-width: 300px;
    }
    
    .mvr-video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .mvr-modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .mvr-recorder-header h3 {
        font-size: 20px;
    }
    
    .mvr-recorder-header p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .mvr-recorder-container {
        padding: 10px;
    }
    
    .mvr-video-preview {
        border-radius: 8px;
    }
    
    .mvr-upload-section {
        padding: 20px;
    }
    
    .mvr-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Loading states */
.mvr-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mvr-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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