/* Mattermost Videos Plugin Styles */

.mattermost-videos-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.mattermost-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.mattermost-video-item {
    background: #fff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mattermost-video-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.8);
    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: 15px;
}

.video-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.video-description {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.video-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 15px 0;
    font-size: 12px;
    color: #888;
}

.video-meta span {
    background: #f1f3f4;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.video-actions {
    margin-top: 15px;
}

.video-link {
    display: inline-block;
    background: #007cba;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.video-link:hover {
    background: #005a87;
    color: white;
    text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mattermost-videos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .mattermost-videos-container {
        padding: 10px;
    }
    
    .video-thumbnail {
        height: 150px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
}

/* Loading Animation */
.mattermost-videos-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.mattermost-videos-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.mattermost-videos-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* Empty State */
.mattermost-videos-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

/* Channel Filter */
.mattermost-videos-filter {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.mattermost-videos-filter select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    margin-right: 10px;
}

.mattermost-videos-filter button {
    padding: 8px 16px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mattermost-videos-filter button:hover {
    background: #005a87;
}

/* Pagination */
.mattermost-videos-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 30px;
}

.mattermost-videos-pagination button {
    padding: 8px 12px;
    border: 1px solid #ddd;
    background: white;
    color: #333;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.mattermost-videos-pagination button:hover:not(:disabled) {
    background: #f8f9fa;
}

.mattermost-videos-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mattermost-videos-pagination .current-page {
    background: #007cba;
    color: white;
    border-color: #007cba;
}
