/**
 * Resource Panel Styles
 * Sliding panel for resource editing
 * ==================================
 */

/* Panel Container */
.resource-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    pointer-events: none;
}

.resource-panel.open {
    pointer-events: auto;
}

/* Overlay */
.resource-panel__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.resource-panel.open .resource-panel__overlay {
    opacity: 1;
}

.resource-panel.closing .resource-panel__overlay {
    opacity: 0;
}

/* Panel Content */
.resource-panel__content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 80%;
    background: var(--bg-primary);
    border-left: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}

.resource-panel.open .resource-panel__content {
    animation: slideInPanel 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.resource-panel.closing .resource-panel__content {
    animation: slideOutPanel 0.3s cubic-bezier(0.4, 0, 1, 1) forwards;
}

@keyframes slideInPanel {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOutPanel {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(100%);
    }
}

/* Header */
.resource-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.resource-panel__header-info {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.resource-panel__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: var(--radius-lg);
    color: var(--bg-primary);
    flex-shrink: 0;
}

.resource-panel__icon svg {
    width: 20px;
    height: 20px;
}

.resource-panel__title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.resource-panel__subtitle {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: var(--space-1) 0 0 0;
}

.resource-panel__hint {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin: var(--space-1) 0 0 0;
}

.resource-panel__header h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.resource-panel__close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.resource-panel__close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.resource-panel__close svg {
    width: 18px;
    height: 18px;
}

/* Tabs */
.resource-panel__tabs {
    display: flex;
    gap: var(--space-1);
    padding: var(--space-3) var(--space-5);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.resource-panel__tab {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.resource-panel__tab:hover {
    color: var(--text-secondary);
    background: var(--bg-card);
}

.resource-panel__tab.active {
    background: var(--accent-soft);
    color: var(--accent-primary);
    border-color: var(--accent-tertiary);
}

/* Body */
.resource-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-5);
}

/* Loading */
.resource-panel__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    padding: var(--space-10);
    color: var(--text-tertiary);
    flex: 1;
}

.resource-panel__spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-default);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Tab Content */
.resource-panel__tab-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

/* Field */
.resource-panel__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.resource-panel__label {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

.resource-panel__input,
.resource-panel__textarea,
.resource-panel__select {
    width: 100%;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    color: var(--text-primary);
    transition: all var(--duration-fast) ease;
}

.resource-panel__input:focus,
.resource-panel__textarea:focus,
.resource-panel__select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-softer);
}

.resource-panel__textarea {
    resize: vertical;
    min-height: 80px;
}

.resource-panel__input--date {
    max-width: 220px;
}

.resource-panel__help {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* Tags */
.resource-panel__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.resource-panel__tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.resource-panel__tag input {
    display: none;
}

.resource-panel__tag:hover {
    background: var(--bg-card-hover);
}

.resource-panel__tag.selected {
    background: var(--accent-soft);
    border-color: var(--accent-tertiary);
    color: var(--accent-primary);
}

.resource-panel__tag-input {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.resource-panel__tag-input input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    color: var(--text-primary);
}

.resource-panel__tag-input button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-md);
    color: var(--bg-primary);
    font-size: var(--text-lg);
    cursor: pointer;
}

/* Levels (Access) */
.resource-panel__levels {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.resource-panel__level {
    display: flex;
    flex-direction: column;
    padding: var(--space-3);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.resource-panel__level input {
    display: none;
}

.resource-panel__level:hover {
    background: var(--bg-card-hover);
}

.resource-panel__level.selected {
    background: var(--accent-soft);
    border-color: var(--accent-primary);
}

.resource-panel__level-name {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
}

.resource-panel__level-desc {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: 2px;
}

/* Publish Row */
.resource-panel__publish-row {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

/* Toggle */
.resource-panel__toggle {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.resource-panel__toggle input {
    display: none;
}

.resource-panel__toggle-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    transition: all var(--duration-fast) ease;
}

.resource-panel__toggle-slider::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all var(--duration-fast) ease;
}

.resource-panel__toggle input:checked + .resource-panel__toggle-slider {
    background: var(--success);
}

.resource-panel__toggle input:checked + .resource-panel__toggle-slider::after {
    transform: translateX(20px);
}

.resource-panel__toggle-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.resource-panel__coming-soon {
    padding: var(--space-1) var(--space-2);
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Image Zone */
.resource-panel__image-zone {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Image Upload */
.resource-panel__image-upload {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-secondary);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    transition: all var(--duration-fast) ease;
}

.resource-panel__image-upload:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
}

.resource-panel__image-upload--portrait {
    aspect-ratio: 2/3;
    max-width: 200px;
}

.resource-panel__image-upload .resource-panel__image-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-panel__image-preview {
    position: relative;
    width: 100%;
    height: 100%;
}

.resource-panel__image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resource-panel__image-remove {
    position: absolute;
    top: var(--space-2);
    right: var(--space-2);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
}

.resource-panel__image-remove svg {
    width: 16px;
    height: 16px;
}

.resource-panel__image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    cursor: pointer;
    color: var(--text-tertiary);
    transition: all var(--duration-fast) ease;
}

.resource-panel__image-placeholder:hover {
    color: var(--accent-primary);
    background: var(--accent-softer);
}

.resource-panel__image-placeholder svg {
    width: 40px;
    height: 40px;
}

.resource-panel__image-placeholder span {
    font-size: var(--text-sm);
}

/* Video Zone */
.resource-panel__video-zone {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.resource-panel__video-zone iframe,
.resource-panel__video-zone video {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: var(--radius-xl);
}

.resource-panel__video-zone video {
    background: #000;
}

.resource-panel__video-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
}

.resource-panel__video-placeholder svg {
    width: 48px;
    height: 48px;
    opacity: 0.5;
}

.resource-panel__video-placeholder span {
    font-size: var(--text-sm);
}

.resource-panel__video-placeholder--link a {
    margin-top: var(--space-2);
    padding: var(--space-2) var(--space-4);
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-md);
    font-size: var(--text-xs);
    font-weight: 500;
    text-decoration: none;
    transition: all var(--duration-fast) ease;
}

/* Video Preview Button */
.resource-panel__video-preview-btn {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.resource-panel__video-preview-btn img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: all var(--duration-normal) ease;
}

.resource-panel__video-preview-btn:hover img {
    opacity: 0.5;
    transform: scale(1.05);
}

.resource-panel__video-play {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: 50%;
    color: var(--bg-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    transition: all var(--duration-normal) ease;
}

.resource-panel__video-play svg {
    width: 28px;
    height: 28px;
    margin-left: 4px;
}

.resource-panel__video-preview-btn:hover .resource-panel__video-play {
    transform: scale(1.1);
    box-shadow: 0 12px 40px rgba(212, 175, 125, 0.4);
}

.resource-panel__video-label {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: white;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
}

.resource-panel__video-preview-btn:hover .resource-panel__video-label {
    opacity: 1;
}

/* Footer */
.resource-panel__footer {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.resource-panel__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.resource-panel__btn svg {
    width: 16px;
    height: 16px;
}

.resource-panel__btn--secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.resource-panel__btn--secondary:hover {
    background: var(--bg-tertiary);
}

.resource-panel__btn--primary {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: var(--bg-primary);
}

.resource-panel__btn--primary:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

.resource-panel__btn--danger {
    background: transparent;
    border: 1px solid var(--error);
    color: var(--error);
}

.resource-panel__btn--danger:hover {
    background: var(--error);
    color: white;
}

/* Footer with delete button */
.resource-panel__footer-right {
    display: flex;
    gap: var(--space-3);
    margin-left: auto;
}

/* Stats */
.resource-panel__stats {
    display: flex;
    gap: var(--space-4);
}

.resource-panel__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    min-width: 100px;
}

.resource-panel__stat-value {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--accent-primary);
}

.resource-panel__stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

/* Toggles row */
.resource-panel__toggles {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
}

/* Arabic input */
.resource-panel__input--arabic {
    font-family: 'Amiri', serif;
    font-size: var(--text-base);
}

/* Large image zone */
.resource-panel__image-zone--large {
    aspect-ratio: 16/9;
    min-height: 200px;
}

/* Body scroll lock */
body.panel-open {
    overflow: hidden;
}

/* =============================================
   LIGHT MODE ADJUSTMENTS
   ============================================= */

[data-theme="light"] .resource-panel__content {
    background: #FAF6F0;
}

[data-theme="light"] .resource-panel__header {
    background: #FAF6F0;
    border-bottom-color: rgba(139, 115, 85, 0.12);
}

[data-theme="light"] .resource-panel__tabs {
    background: #FAF6F0;
    border-bottom-color: rgba(139, 115, 85, 0.12);
}

[data-theme="light"] .resource-panel__body {
    background: #F5EFE6;
}

[data-theme="light"] .resource-panel__footer {
    background: #FAF6F0;
    border-top-color: rgba(139, 115, 85, 0.12);
}

[data-theme="light"] .resource-panel__input,
[data-theme="light"] .resource-panel__textarea,
[data-theme="light"] .resource-panel__select {
    background: #EDE8E0 !important;
    border-color: rgba(139, 115, 85, 0.18) !important;
    color: #2D2520;
}

[data-theme="light"] .resource-panel__input::placeholder,
[data-theme="light"] .resource-panel__textarea::placeholder {
    color: rgba(45, 37, 32, 0.45);
}

[data-theme="light"] .resource-panel__input:focus,
[data-theme="light"] .resource-panel__textarea:focus,
[data-theme="light"] .resource-panel__select:focus {
    background: #F5F0E8 !important;
    border-color: #A68250 !important;
}

[data-theme="light"] .resource-panel__level {
    background: #EDE8E0;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .resource-panel__level:hover {
    background: #E5DFD6;
}

[data-theme="light"] .resource-panel__level.selected {
    background: rgba(166, 130, 80, 0.15);
    border-color: #A68250;
}

[data-theme="light"] .resource-panel__stat {
    background: #EDE8E0;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .resource-panel__image-zone {
    background: #E5DFD6;
    border-color: rgba(139, 115, 85, 0.25);
}

[data-theme="light"] .resource-panel__video-zone {
    background: #E5DFD6;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .resource-panel__tag {
    background: #E5DFD6;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .resource-panel__tag:hover {
    background: #DCD5CB;
}

[data-theme="light"] .resource-panel__tag.selected {
    background: rgba(166, 130, 80, 0.20);
    border-color: #A68250;
}

[data-theme="light"] .resource-panel__toggle-slider {
    background: #D5CFC5;
}

[data-theme="light"] .resource-panel__tab {
    color: rgba(45, 37, 32, 0.6);
}

[data-theme="light"] .resource-panel__tab:hover {
    background: #EDE8E0;
    color: #2D2520;
}

[data-theme="light"] .resource-panel__tab.active {
    background: rgba(166, 130, 80, 0.15);
    color: #8B6B3D;
    border-color: rgba(166, 130, 80, 0.3);
}

/* Responsive */
@media (max-width: 1024px) {
    .resource-panel__content {
        width: 90%;
    }
}

@media (max-width: 600px) {
    .resource-panel__content {
        width: 100%;
        max-width: 100%;
    }

    .resource-panel__publish-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =============================================
   SLIDER PANEL SPECIFIC STYLES
   ============================================= */

/* Podcast icon variant */
.resource-panel__icon--podcast {
    background: #9333ea !important;
}

/* Toggle button */
.resource-panel__toggle-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.resource-panel__toggle-btn {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-tertiary);
    border: 2px solid var(--border-default);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-default);
}

.resource-panel__toggle-btn:hover {
    border-color: var(--border-strong);
}

.resource-panel__toggle-btn.active {
    background: var(--accent-softer);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.resource-panel__toggle-indicator {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: var(--text-tertiary);
    transition: all var(--duration-fast) var(--ease-default);
}

.resource-panel__toggle-btn.active .resource-panel__toggle-indicator {
    background: var(--accent-primary);
    box-shadow: 0 0 8px var(--accent-primary);
}

/* Collections list in slider panel */
.slider-panel__collections-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 300px;
    overflow-y: auto;
    padding: var(--space-2);
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.slider-panel__collection-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2);
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.slider-panel__collection-thumb {
    width: 48px;
    height: 32px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-secondary);
    flex-shrink: 0;
}

.slider-panel__collection-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-panel__collection-title {
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.slider-panel__empty {
    padding: var(--space-4);
    text-align: center;
    color: var(--text-tertiary);
    font-style: italic;
}

/* Light mode */
[data-theme="light"] .resource-panel__toggle-btn {
    background: #F5F0E8;
    border-color: rgba(139, 115, 85, 0.18);
}

[data-theme="light"] .resource-panel__toggle-btn.active {
    background: rgba(166, 130, 80, 0.15);
    border-color: #8B6B3D;
    color: #8B6B3D;
}

[data-theme="light"] .slider-panel__collections-list {
    background: #F5F0E8;
}

[data-theme="light"] .slider-panel__collection-item {
    background: #EDE8E0;
}

/* =============================================
   PEDAGOGY TAB STYLES
   ============================================= */

.pedagogy-tab {
    gap: var(--space-6);
}

/* Pedagogy List */
.pedagogy-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    padding: var(--space-3);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    min-height: 60px;
    max-height: 200px;
    overflow-y: auto;
}

.pedagogy-empty {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    font-style: italic;
    text-align: center;
    padding: var(--space-4);
    margin: 0;
}

/* Pedagogy Item */
.pedagogy-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) ease;
}

.pedagogy-item:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-default);
}

.pedagogy-item__text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedagogy-item__link {
    flex: 1;
    display: flex;
    align-items: center;
    text-decoration: none;
    min-width: 0;
}

.pedagogy-item__link .pedagogy-item__text {
    color: var(--accent-primary);
}

.pedagogy-item__link:hover .pedagogy-item__text {
    text-decoration: underline;
}

.pedagogy-item__thumb {
    width: 36px;
    height: 24px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.pedagogy-item__remove {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-tertiary);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--duration-fast) ease;
}

.pedagogy-item__remove:hover {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

.pedagogy-item__remove svg {
    width: 14px;
    height: 14px;
}

/* Pedagogy item variants */
.pedagogy-item--slider {
    border-left: 3px solid var(--accent-primary);
}

.pedagogy-item--collection {
    border-left: 3px solid #22c55e;
}

.pedagogy-item--document {
    border-left: 3px solid #3b82f6;
}

/* Pedagogy Add */
.pedagogy-add {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-2);
}

.pedagogy-add .resource-panel__input,
.pedagogy-add .resource-panel__select {
    flex: 1;
}

.pedagogy-add__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    background: var(--accent-primary);
    border: none;
    border-radius: var(--radius-lg);
    color: var(--bg-primary);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--duration-fast) ease;
}

.pedagogy-add__btn:hover {
    background: var(--accent-secondary);
}

.pedagogy-add__btn svg {
    width: 14px;
    height: 14px;
}

/* Light mode for pedagogy */
[data-theme="light"] .pedagogy-list {
    background: #EDE8E0;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .pedagogy-item {
    background: #F5F0E8;
    border-color: rgba(139, 115, 85, 0.12);
}

[data-theme="light"] .pedagogy-item:hover {
    background: #E5DFD6;
}

[data-theme="light"] .pedagogy-add__btn {
    background: #8B6B3D;
}

[data-theme="light"] .pedagogy-add__btn:hover {
    background: #6D532D;
}

/* Document Form */
.pedagogy-document-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
}

.pedagogy-document-form__row {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.pedagogy-document-form__row .resource-panel__input,
.pedagogy-document-form__row .resource-panel__select {
    flex: 1;
}

/* Document input mode tabs */
.pedagogy-document-form__tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-secondary);
    padding: 3px;
    border-radius: var(--radius-md);
}

.pedagogy-doc-tab {
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.pedagogy-doc-tab:hover {
    color: var(--text-secondary);
}

.pedagogy-doc-tab.active {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

/* File upload zone */
.pedagogy-file-upload {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-4);
    background: var(--bg-secondary);
    border: 2px dashed var(--border-default);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--duration-fast) ease;
}

.pedagogy-file-upload:hover {
    border-color: var(--accent-primary);
    background: var(--accent-softer);
}

.pedagogy-file-upload svg {
    width: 24px;
    height: 24px;
    color: var(--text-tertiary);
}

.pedagogy-file-upload span {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pedagogy-file-upload__name {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary) !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedagogy-file-upload__clear {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
}

/* Document item icon */
.pedagogy-item__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Document item content */
.pedagogy-item__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pedagogy-item__question {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Spinner */
.pedagogy-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Light mode */
[data-theme="light"] .pedagogy-document-form {
    background: #EDE8E0;
    border-color: rgba(139, 115, 85, 0.15);
}

[data-theme="light"] .pedagogy-document-form__tabs {
    background: #E5DFD6;
}

[data-theme="light"] .pedagogy-doc-tab.active {
    background: #8B6B3D;
}

[data-theme="light"] .pedagogy-file-upload {
    background: #F5F0E8;
    border-color: rgba(139, 115, 85, 0.25);
}

[data-theme="light"] .pedagogy-file-upload:hover {
    border-color: #8B6B3D;
    background: rgba(166, 130, 80, 0.1);
}
