/* ============================================
   THEME SWITCHER DROPDOWN
   ============================================ */

.theme-switcher {
    position: relative;
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: var(--secondary-bg);
}

.theme-icon {
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
    transform: rotate(20deg);
}

/* Dropdown Menu */
.theme-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 180px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 24px var(--shadow);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.theme-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Dropdown Arrow */
.theme-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 12px;
    width: 12px;
    height: 12px;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    border-left: 1px solid var(--border-color);
    transform: rotate(45deg);
}

/* Theme Options */
.theme-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.15s ease;
    position: relative;
}

.theme-option:hover {
    background: var(--secondary-bg);
}

.theme-option i:first-child {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.theme-option span {
    flex: 1;
    text-align: left;
}

.theme-check {
    font-size: 0.85rem;
    color: var(--accent-color);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option.active .theme-check {
    opacity: 1;
}

/* Theme Option Colors */
.theme-option[data-theme="light"] i:first-child {
    color: #f59e0b;
}

.theme-option[data-theme="dark"] i:first-child {
    color: #8b5cf6;
}

.theme-option[data-theme="system"] i:first-child {
    color: #3b82f6;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-dropdown {
        right: -10px;
    }
    
    .theme-dropdown::before {
        right: 22px;
    }
}

/* ============================================
   LIGHT MODE EXPLICIT STYLES
   ============================================ */

[data-theme="light"] .theme-dropdown {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .theme-dropdown::before {
    background: #ffffff;
    border-top-color: #e5e7eb;
    border-left-color: #e5e7eb;
}

[data-theme="light"] .theme-option {
    color: #1f2937;
}

[data-theme="light"] .theme-option:hover {
    background: #f3f4f6;
    color: #111827;
}

[data-theme="light"] .theme-option.active {
    background: #eff6ff;
}

[data-theme="light"] .theme-check {
    color: #3b82f6;
}

/* Light mode - specific icons colors */
[data-theme="light"] .theme-option[data-theme="light"] i:first-child {
    color: #f59e0b;
}

[data-theme="light"] .theme-option[data-theme="dark"] i:first-child {
    color: #6366f1;
}

[data-theme="light"] .theme-option[data-theme="system"] i:first-child {
    color: #3b82f6;
}

/* ============================================
   DARK MODE
   ============================================ */

[data-theme="dark"] .theme-dropdown {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .theme-dropdown::before {
    background: var(--card-bg);
    border-top-color: rgba(255, 255, 255, 0.1);
    border-left-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .theme-option:hover {
    background: rgba(255, 255, 255, 0.05);
}