/* Owlypia List Materials - Styles */

.olm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.olm-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.olm-description {
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
    text-align: center;
}

/* Filters Section */
.olm-filters {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.olm-filter-row {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.olm-filter-group {
    flex: 1;
    min-width: 200px;
}

.olm-filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.olm-select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    transition: border-color 0.3s;
}

.olm-select:hover {
    border-color: #999;
}

.olm-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Buttons */
.olm-button-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.olm-btn {
    padding: 12px 35px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.olm-btn-primary {
    background: #3b82f6;
    color: white;
}

.olm-btn-primary:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.olm-btn-secondary {
    background: #ef4444;
    color: white;
}

.olm-btn-secondary:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
}

/* Materials Grid */
.olm-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* Material Card */
.olm-material-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.olm-material-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Card Type Label */
.olm-card-type {
    position: absolute;
    top: 0;
    left: 0;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    padding: 15px 8px;
    color: white;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
    z-index: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.olm-type-study {
    background: #f59e0b;
}

.olm-type-teaching {
    background: #3b82f6;
}

.olm-type-trials {
    background: #ef4444;
}

.olm-type-default {
    background: #6b7280;
}

/* Card Image */
.olm-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    margin-left: 40px;
}

.olm-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.olm-material-card:hover .olm-card-image img {
    transform: scale(1.1);
}

.olm-placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 18px;
    font-weight: 500;
}

/* Card Content */
.olm-card-content {
    padding: 20px;
    padding-left: 50px;
    flex-grow: 1;
}

.olm-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.4;
}

.olm-title-prefix {
    color: #6b7280;
    font-weight: 600;
}

.olm-card-excerpt {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.6;
}

/* Card Footer */
.olm-card-footer {
    padding: 15px 20px;
    padding-left: 50px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.olm-card-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.olm-card-link:hover {
    color: #2563eb;
}

/* Loading Spinner */
.olm-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.olm-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f4f6;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: olm-spin 1s linear infinite;
}

@keyframes olm-spin {
    to {
        transform: rotate(360deg);
    }
}

/* No Results */
.olm-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 18px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .olm-filter-row {
        flex-direction: column;
    }
    
    .olm-filter-group {
        min-width: 100%;
    }
    
    .olm-materials-grid {
        grid-template-columns: 1fr;
    }
    
    .olm-button-row {
        flex-direction: column;
    }
    
    .olm-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .olm-card-type {
        font-size: 10px;
        padding: 10px 5px;
    }
    
    .olm-card-image {
        margin-left: 30px;
        height: 200px;
    }
    
    .olm-card-content,
    .olm-card-footer {
        padding-left: 40px;
    }
}