/**
 * Video Access Manager - Frontend Styles
 * 
 * @package VideoAccessManager
 * @since 1.0.0
 */

/* === Список видео === */
.bms-video-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.bms-video-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bms-video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    background: #f0f0f0;
    overflow: hidden;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.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;
    cursor: pointer;
    transition: background 0.3s ease;
}

.play-button:hover {
    background: rgba(0, 0, 0, 0.9);
}

.video-info {
    padding: 20px;
}

.video-info h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.video-info p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.video-duration {
    display: inline-block;
    background: #f0f0f0;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

.watch-video-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.watch-video-btn:hover {
    background: #229954;
}

/* === Видео-плеер === */
.bms-video-player {
    max-width: 800px;
    margin: 20px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.bms-video-player h3 {
    margin: 0;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    font-size: 20px;
    font-weight: 600;
}

.bms-video-player video {
    width: 100%;
    height: auto;
    display: block;
}

.video-description {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.video-description p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.video-controls {
    padding: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.back-to-list-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.back-to-list-btn:hover {
    background: #5a6268;
}

/* === Адаптивность === */
@media (max-width: 768px) {
    .bms-video-list {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0;
    }
    
    .video-info {
        padding: 15px;
    }
    
    .video-info h3 {
        font-size: 16px;
    }
    
    .bms-video-player {
        margin: 15px;
        border-radius: 8px;
    }
    
    .bms-video-player h3 {
        padding: 15px;
        font-size: 18px;
    }
    
    .video-description {
        padding: 15px;
    }
}

/* === Сообщения === */
.video-access-message {
    background: #f8f9fa;
    border-left: 4px solid #007cba;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.video-access-message.error {
    border-left-color: #e74c3c;
    background: #fdf2f2;
}

.video-access-message.success {
    border-left-color: #27ae60;
    background: #f0f9ff;
}

/* === Загрузка === */
.video-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.video-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
