/* Resource Library Modal Styles */
.sfpe-resource-library-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sfpe-resource-library-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sfpe-resource-library-modal.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.sfpe-resource-library-overlay + .sfpe-resource-library-modal.active ~ .sfpe-resource-library-overlay {
    opacity: 1;
}

.sfpe-resource-library-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sfpe-resource-library-header h2 {
    margin: 0;
    font-size: 24px;
    color: #1a1a1a;
}

.sfpe-resource-library-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sfpe-resource-library-close:hover {
    background: #f5f5f5;
    color: #333;
}

.sfpe-resource-library-search {
    padding: 20px 30px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
}

.sfpe-resource-library-search input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
}

.sfpe-resource-library-search input:focus {
    outline: none;
    border-color: #4A90E2;
}

.sfpe-resource-library-search button {
    padding: 12px 20px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sfpe-resource-library-search button:hover {
    background: #357abd;
}

.sfpe-resource-library-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.sfpe-resource-categories {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.sfpe-resource-category {
    padding: 8px 20px;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.sfpe-resource-category:hover {
    border-color: #4A90E2;
    color: #4A90E2;
}

.sfpe-resource-category.active {
    background: #4A90E2;
    color: white;
    border-color: #4A90E2;
}

.sfpe-resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.sfpe-resource-card {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    transition: all 0.2s ease;
}

.sfpe-resource-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.sfpe-resource-card h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #1a1a1a;
}

.sfpe-resource-card p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.sfpe-resource-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sfpe-resource-tutor {
    font-size: 13px;
    color: #888;
}

.sfpe-resource-access-btn {
    padding: 6px 16px;
    background: #4A90E2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.sfpe-resource-access-btn:hover {
    background: #357abd;
}

.sfpe-resource-loading,
.sfpe-no-resources {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .sfpe-resource-library-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .sfpe-resource-library-header,
    .sfpe-resource-library-search,
    .sfpe-resource-library-content {
        padding: 15px;
    }
    
    .sfpe-resource-grid {
        grid-template-columns: 1fr;
    }
    
    .sfpe-resource-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
}