/* ===================================================================
   Theme Switcher Component Styles
   Floating button with dropdown menu for theme selection
   =================================================================== */

/* Theme Switcher Container */
.theme-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: inline-block;
}

/* Toggle Button */
.theme-switcher-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.theme-switcher-toggle:hover {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.theme-switcher-toggle:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-icon {
    font-size: 18px;
    line-height: 1;
}

.theme-label {
    font-weight: 500;
}

/* Theme Dropdown */
.theme-switcher .theme-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10001;
}

.theme-switcher .theme-dropdown.theme-dropdown-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.theme-dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.theme-dropdown-header h3 {
    margin: 0 0 4px 0;
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
}

.theme-dropdown-header p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.theme-options {
    padding: 8px;
}

/* Theme Option Button */
.theme-option {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    margin-bottom: 4px;
}

.theme-option:last-child {
    margin-bottom: 0;
}

.theme-option:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

.theme-option:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

.theme-option.active {
    background: var(--accent-light);
    border-color: var(--accent-primary);
}

.theme-option-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
}

.theme-option-info {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.theme-option-name {
    font-size: var(--font-size-base);
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.theme-option-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    display: block;
}

.theme-option-preview {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.theme-option-check {
    font-size: 18px;
    color: var(--accent-primary);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.theme-option.active .theme-option-check {
    opacity: 1;
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .theme-dropdown {
        width: 280px;
    }

    .theme-label {
        display: none;
    }

    .theme-switcher-toggle {
        padding: 8px 12px;
    }
}

/* Glass-morphism for dropdown - Theme-specific backgrounds */
@supports (backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px)) {
    .theme-dropdown {
        background: rgba(255, 255, 255, 0.95);
    }

    [data-theme="ocean"] .theme-dropdown {
        background: rgba(240, 253, 250, 0.95);
    }

    [data-theme="sunset"] .theme-dropdown {
        background: rgba(255, 247, 237, 0.95);
    }

    [data-theme="forest"] .theme-dropdown {
        background: rgba(240, 253, 244, 0.95);
    }

    [data-theme="violet"] .theme-dropdown {
        background: rgba(250, 245, 255, 0.95);
    }
}
