/**
 * Recorded Classes page styles for Rajasthan Virtual Shiksha PWA
 */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.page-header-content h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.page-header-content p {
    margin: 0;
    opacity: 0.9;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-container {
    position: relative;
}

#search-classes {
    padding: 10px 40px 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 0.9rem;
    min-width: 250px;
}

#search-classes::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-button {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
}

/* Filters Section */
.filters-section {
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-tab {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-tab:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
}

.filter-tab.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-dropdown select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: white;
    font-size: 0.9rem;
}

/* Classes Grid */
.classes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.class-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.class-thumbnail {
    position: relative;
    height: 180px;
    background-color: #f0f0f0;
    overflow: hidden;
}

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

.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transition: opacity 0.2s;
    cursor: pointer;
}

.class-card:hover .play-overlay {
    opacity: 1;
}

.duration-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.quality-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
}

.watched-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.class-info {
    padding: 15px;
}

.class-info h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    line-height: 1.3;
}

.class-subject {
    color: var(--primary-color);
    font-size: 0.85rem;
    font-weight: 500;
    margin: 0 0 4px;
}

.class-instructor {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 10px;
}

.class-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background-color: var(--bg-light);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0;
}

.class-actions {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.play-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: var(--bg-light);
    color: var(--primary-color);
}

.btn-icon.bookmarked {
    color: var(--primary-color);
}

.btn-icon.downloaded {
    color: #4CAF50;
}

/* Load More Section */
.load-more-section {
    text-align: center;
    padding: 20px 0;
}

/* Video Modal */
.video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.video-modal.show {
    opacity: 1;
    visibility: visible;
}

.video-modal-content {
    width: 90%;
    max-width: 1000px;
    background-color: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-header {
    background-color: var(--bg-dark);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-video-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-video-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-info {
    background-color: var(--bg-dark);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.video-details {
    font-size: 0.9rem;
}

.video-details p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
}

.video-actions {
    display: flex;
    gap: 10px;
}

.video-actions .btn-icon {
    color: rgba(255, 255, 255, 0.7);
}

.video-actions .btn-icon:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .page-actions {
        width: 100%;
    }
    
    #search-classes {
        width: 100%;
        min-width: auto;
    }
    
    .filters-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .filter-tab {
        white-space: nowrap;
    }
    
    .classes-grid {
        grid-template-columns: 1fr;
    }
    
    .class-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .video-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .class-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .class-actions {
        padding: 10px;
    }
}
