/*
 * Materials Glassmorphism Design
 * Modern frosted glass effect with clear parent/child hierarchy
 */

/* ============================================
   Glassmorphism Container
   ============================================ */

.glass-materials-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.glass-materials-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.glass-materials-header h5 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--neutral-900);
    margin: 0;
}

.glass-materials-header .fa-book-open {
    font-size: 1.5rem;
    color: var(--neutral-700);
}

/* ============================================
   Parent Material (Accordion Header)
   ============================================ */

.material-accordion-item {
    background: white;
    border-radius: 1rem;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.material-accordion-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.material-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: white;
    border: none;
}

/* Material Link - takes up most space */
.material-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s;
    padding: 0;
    border-radius: 0.5rem;
}

.material-link:hover {
    background: #f9fafb;
}

/* Chevron Button - separate clickable area */
.chevron-button {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.chevron-button:hover {
    background: #e5e7eb;
}

.chevron-button.collapsed .chevron-icon {
    transform: rotate(0deg);
}

.chevron-button:not(.collapsed) .chevron-icon {
    transform: rotate(180deg);
}

.chevron-icon {
    transition: transform 0.3s ease;
    color: var(--neutral-400);
    font-size: 1.25rem;
    margin-left: auto;
}

/* Material Icon */
.material-icon-large {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 1.5rem;
}

.material-icon-large.video {
    background: #dbeafe;
    color: #1e40af;
}

.material-icon-large.pdf {
    background: #fce7f3;
    color: #be123c;
}

.material-icon-large.html {
    background: #e0e7ff;
    color: #4338ca;
}

.material-icon-large.text {
    background: #f3e8ff;
    color: #7c3aed;
}

.material-icon-large.audio {
    background: #fbcfe8;
    color: #be185d;
}

.material-icon-large.image {
    background: #d1fae5;
    color: #065f46;
}

.material-icon-large.document {
    background: #e5e7eb;
    color: #374151;
}

/* Material Info */
.material-info {
    flex: 1;
}

.material-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.material-meta {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* ============================================
   Child Quiz Items (Nested)
   ============================================ */

.quiz-nested-list {
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    padding: 0.5rem 0;
}

.quiz-item-nested {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f3f4f6;
}

.quiz-item-nested:last-child {
    border-bottom: none;
}

/* Quiz Icon */
.quiz-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #374151;
    color: white;
    font-size: 1.125rem;
    flex-shrink: 0;
}

/* Quiz Info Block */
.quiz-info {
    flex: 1;
}

.quiz-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.25rem;
}

.quiz-metadata {
    font-size: 0.8125rem;
    color: var(--neutral-500);
}

/* ============================================
   Status Badges
   ============================================ */

.badge-public {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #10b981;
    color: white;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-private {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: #f59e0b;
    color: white;
    border-radius: 9999px;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-public .fa-unlock,
.badge-private .fa-lock {
    font-size: 0.625rem;
}

/* ============================================
   Action Buttons
   ============================================ */

.btn-start-quiz {
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-start-quiz:hover {
    background: #1557b0;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.btn-locked {
    background: #e5e7eb;
    color: #9ca3af;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-view-results {
    background: white;
    color: #1a73e8;
    border: 2px solid #1a73e8;
    border-radius: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}

.btn-view-results:hover {
    background: #e0efff;
    color: #1557b0;
    border-color: #1557b0;
}

/* ============================================
   Accordion Collapse Animation
   ============================================ */

.quiz-collapse {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.quiz-collapse.collapsing {
    transition: max-height 0.35s ease;
}

/* ============================================
   Responsive Adjustments
   ============================================ */

@media (max-width: 767px) {
    .glass-materials-container {
        padding: 1.25rem;
        border-radius: 1rem;
    }

    .material-header {
        padding: 1rem;
        gap: 0.75rem;
    }

    .material-icon-large {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .material-title {
        font-size: 1rem;
    }

    .quiz-item-nested {
        padding: 0.875rem 1rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .btn-start-quiz,
    .btn-locked,
    .btn-view-results {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

/* ============================================
   Empty State
   ============================================ */

.materials-empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.materials-empty-state .fa-book {
    font-size: 3rem;
    color: var(--neutral-300);
    margin-bottom: 1rem;
}

.materials-empty-state h5 {
    color: var(--neutral-600);
    font-weight: 600;
}