/* Material/Lernunterlagen Styles - basierend auf Buchungskarten Design */

/* Container und Layout */
.materials-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Filter Container */
.filter-container {
    margin-bottom: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.topic-filter {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
    min-width: 200px;
    flex: 1;
    margin-right: 10px;
}

.topic-filter:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.topic-filter:last-child {
    margin-right: 0;
    flex: none;
    min-width: 200px;
}

/* Search specific styling */
#searchInput {
    flex: 1;
    margin-right: 10px;
    font-size: 14px;
}

#searchInput::placeholder {
    color: #6c757d;
    font-style: italic;
}

/* Memory Cards */
.memory-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.memory-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.card-header {
    background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
    color: white;
    padding: 15px 20px;
    font-weight: bold;
}

.card-topic {
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-id {
    background: rgba(255, 255, 255, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: normal;
}

/* Card Content */
.card-unterlage {
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

/* Material Section */
.card-material {
    padding: 10px;
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.card-material::-webkit-scrollbar {
    width: 8px;
}

.card-material::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.card-material::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.card-material::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Material Content Items */
.material-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.material-content:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateX(4px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.material-content:last-child {
    margin-bottom: 0;
}

.material-text {
    flex: 1;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.material-icons {
    color: #28a745;
    font-size: 18px;
    margin-left: 10px;
}

/* Pagination Controls */
.pagination-controls {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    color: #6c757d;
    font-size: 14px;
}

/* Loading und End Indicators */
#loadingIndicator {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 20px 0;
}

#endOfResults {
    text-align: center;
    padding: 30px;
    font-size: 16px;
    color: #6c757d;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    margin: 20px 0;
}

/* Error Messages */
.error {
    color: #dc3545;
    text-align: center;
    padding: 20px;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

.no-results {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Cards Container - Multi-column layout */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 20px;
    align-items: start;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    }
}

@media (max-width: 900px) {
    .cards-container {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .materials-container {
        padding: 10px;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .memory-card {
        margin-bottom: 15px;
    }
    
    .card-header {
        padding: 12px 15px;
    }
    
    .card-unterlage {
        padding: 12px 15px;
        font-size: 16px;
    }
    
    .material-content {
        padding: 10px 12px;
    }
    
    .material-text {
        font-size: 13px;
    }
}