/* Lifted verbatim from course.blade.php.
   Inline it was 11,597 bytes of HTML on every render;
   as a file the browser fetches it once. */
#uploadModal {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
#uploadModal.active {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
#uploadModal .modal-content {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden !important;
}
/* ============================================
   PREMIUM MORE DROPDOWN - Apple/Stripe Level
   ============================================ */

.premium-more-dropdown {
    position: relative;
    z-index: 999999;
}

/* Trigger Button */
.premium-more-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted-foreground);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-more-trigger:hover {
    background: var(--muted);
    color: var(--foreground);
    border-color: var(--border);
}

.premium-more-trigger.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(0.95);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
}

.premium-more-trigger svg {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-more-trigger.active svg {
    transform: rotate(90deg);
}

/* Dropdown Panel */
.premium-dropdown-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.25),
        0 12px 24px -8px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transform-origin: top right;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 999999;
}

/* Glassmorphism for dark mode */
[data-kt-theme-mode="dark"] .premium-dropdown-panel {
    background: rgba(30, 32, 40, 0.95);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset,
        0 1px 2px rgba(255, 255, 255, 0.05) inset;
}

.premium-dropdown-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Arrow */
.premium-dropdown-arrow {
    position: absolute;
    top: -6px;
    right: 14px;
    width: 12px;
    height: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-right: none;
    border-bottom: none;
    transform: rotate(45deg);
    z-index: 1;
}

[data-kt-theme-mode="dark"] .premium-dropdown-arrow {
    background: rgba(30, 32, 40, 0.95);
    border-color: rgba(255, 255, 255, 0.08);
}

/* Header */
.premium-dropdown-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, transparent 100%);
}

[data-kt-theme-mode="dark"] .premium-dropdown-header {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, transparent 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

.premium-dropdown-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.premium-dropdown-header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.premium-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--foreground);
    letter-spacing: -0.01em;
}

.premium-dropdown-subtitle {
    font-size: 11px;
    color: var(--muted-foreground);
    font-weight: 500;
}

/* Quick Stats */
.premium-dropdown-stats {
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 12px 16px;
    background: var(--muted);
    border-bottom: 1px solid var(--border);
}

[data-kt-theme-mode="dark"] .premium-dropdown-stats {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.05);
}

.premium-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.premium-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--foreground);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.premium-stat-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.premium-stat-divider {
    width: 1px;
    height: 28px;
    background: var(--border);
}

[data-kt-theme-mode="dark"] .premium-stat-divider {
    background: rgba(255, 255, 255, 0.08);
}

/* Section */
.premium-dropdown-section {
    padding: 8px;
}

.premium-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px 6px;
    font-size: 10px;
    font-weight: 600;
    color: var(--muted-foreground);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.premium-label-danger {
    color: #f59e0b;
}

.premium-section-danger {
    border-top: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.03) 0%, transparent 100%);
}

[data-kt-theme-mode="dark"] .premium-section-danger {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, transparent 100%);
    border-color: rgba(255, 255, 255, 0.05);
}

/* Dropdown Item */
.premium-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: left;
}

.premium-dropdown-item:hover {
    background: var(--muted);
}

[data-kt-theme-mode="dark"] .premium-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
}

.premium-dropdown-item:active {
    transform: scale(0.98);
}

/* Item Icon */
.premium-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.premium-dropdown-item:hover .premium-item-icon {
    transform: scale(1.05);
}

.premium-icon-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

[data-kt-theme-mode="dark"] .premium-icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.premium-icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #8b5cf6;
}

[data-kt-theme-mode="dark"] .premium-icon-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.premium-icon-teal {
    background: rgba(20, 184, 166, 0.1);
    color: #14b8a6;
}

[data-kt-theme-mode="dark"] .premium-icon-teal {
    background: rgba(20, 184, 166, 0.15);
    color: #2dd4bf;
}

.premium-icon-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

[data-kt-theme-mode="dark"] .premium-icon-amber {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

/* Item Content */
.premium-item-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.premium-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.premium-item-desc {
    font-size: 11px;
    color: var(--muted-foreground);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Item Shortcut */
.premium-item-shortcut {
    display: flex;
    align-items: center;
    gap: 3px;
}

.premium-item-shortcut kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    color: var(--muted-foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

[data-kt-theme-mode="dark"] .premium-item-shortcut kbd {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Item Badge */
.premium-item-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 6px;
    letter-spacing: 0.02em;
}

.premium-badge-new {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Item Count */
.premium-item-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--muted-foreground);
    background: var(--muted);
    border-radius: 6px;
}

[data-kt-theme-mode="dark"] .premium-item-count {
    background: rgba(255, 255, 255, 0.08);
}

/* Warning Item */
.premium-item-warning:hover {
    background: rgba(245, 158, 11, 0.08);
}

[data-kt-theme-mode="dark"] .premium-item-warning:hover {
    background: rgba(245, 158, 11, 0.12);
}

.premium-item-warning:hover .premium-item-title {
    color: #f59e0b;
}

/* Footer */
.premium-dropdown-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--muted);
}

[data-kt-theme-mode="dark"] .premium-dropdown-footer {
    background: rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.05);
}

.premium-footer-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    color: var(--muted-foreground);
}

.premium-footer-hint kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 10px;
    font-weight: 600;
    font-family: inherit;
    color: var(--muted-foreground);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 4px;
    margin: 0 2px;
}

[data-kt-theme-mode="dark"] .premium-footer-hint kbd {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes dropdownItemEnter {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.premium-dropdown-panel.active .premium-dropdown-item {
    animation: dropdownItemEnter 0.25s ease forwards;
}

.premium-dropdown-panel.active .premium-dropdown-item:nth-child(1) { animation-delay: 0.03s; }
.premium-dropdown-panel.active .premium-dropdown-item:nth-child(2) { animation-delay: 0.06s; }
.premium-dropdown-panel.active .premium-dropdown-item:nth-child(3) { animation-delay: 0.09s; }
.premium-dropdown-panel.active .premium-dropdown-item:nth-child(4) { animation-delay: 0.12s; }

/* Responsive */
@media (max-width: 640px) {
    .premium-dropdown-panel {
        width: calc(100vw - 32px);
        right: -8px;
    }
    
    .premium-item-shortcut {
        display: none;
    }
}
