/* ============================================
   THEME SETTINGS MENU STYLES
   ============================================ */

.theme-settings-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    padding: 0;
}

.theme-settings-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--accent-primary);
    border-color: var(--border-color-hover);
}

.theme-settings-btn svg {
    width: 20px;
    height: 20px;
}

/* Theme Settings Modal/Popover */
.theme-settings-menu {
    position: absolute;
    top: 55px;
    right: 0;
    background: var(--glass-frosted);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border-highlight);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    min-width: 280px;
    box-shadow: var(--glass-shadow);
    z-index: 1500;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    pointer-events: none;
    transition: all var(--transition-base);
}

.theme-settings-menu.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.theme-settings-menu h3 {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    font-family: var(--font-heading);
}

.theme-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
}

.theme-option {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all var(--transition-base);
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.04) 0%, 
                rgba(255, 255, 255, 0.02) 100%);
}

.theme-option:hover {
    border-color: var(--border-color-hover);
    background: linear-gradient(135deg, 
                rgba(255, 255, 255, 0.08) 0%, 
                rgba(255, 255, 255, 0.04) 100%);
}

.theme-option.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, 
                var(--theme-color-light) 0%, 
                rgba(255, 255, 255, 0.02) 100%);
}

.theme-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    min-height: 70px;
}

.theme-color-swatch {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1),
                inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.theme-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-align: center;
    margin-top: var(--spacing-sm);
    text-transform: capitalize;
}

/* Theme option checkmark */
.theme-option.active::after {
    content: '✓';
    position: absolute;
    top: 4px;
    right: 6px;
    color: var(--accent-primary);
    font-weight: bold;
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.5);
}

/* Settings container positioning */
.theme-settings-container {
    position: relative;
}

/* Close button area - click outside to close */
.theme-settings-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1400;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}

.theme-settings-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Responsive */
@media (max-width: 600px) {
    .theme-settings-menu {
        top: auto;
        bottom: 60px;
        right: auto;
        left: 50%;
        transform: translateX(-50%) translateY(10px) scale(0.95);
        min-width: 250px;
    }

    .theme-settings-menu.active {
        transform: translateX(-50%) translateY(0) scale(1);
    }

    .theme-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
