/**
 * Theme Customizer Styles
 */

/* Customizer Toggle Button */
.customizer-toggle {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: var(--color-accent-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
    animation: pulse-ring 2s infinite;
}

.customizer-toggle:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.6);
}

.customizer-toggle svg {
    color: white;
    animation: spin 4s linear infinite;
}

@keyframes pulse-ring {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4), 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

/* Customizer Panel */
.customizer-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: rgba(26, 26, 36, 0.95);
    backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1002;
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    overflow-y: auto;
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .customizer-panel {
    background: rgba(255, 255, 255, 0.95);
}

.customizer-panel.open {
    right: 0;
}

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(26, 26, 36, 0.98);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.customizer-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

.customizer-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--color-text-primary);
    cursor: pointer;
    font-size: 20px;
    transition: all 0.3s ease;
}

.customizer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.customizer-content {
    padding: 1.5rem;
}

.customizer-section {
    margin-bottom: 2rem;
}

.customizer-section h4 {
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Color Schemes */
.color-schemes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.color-scheme-option {
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    text-align: center;
}

.color-scheme-option:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.color-scheme-option.active {
    border-color: var(--color-accent-primary);
    background: rgba(99, 102, 241, 0.1);
}

.color-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-scheme-option span {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    display: block;
}

/* Custom Color Picker */
.color-picker-container {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

#accent-color-picker {
    flex: 1;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

#accent-color-picker::-webkit-color-swatch {
    border-radius: 6px;
    border: none;
}

.btn-small {
    padding: 0.5rem 1rem;
    background: var(--color-accent-gradient);
    border: none;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

/* Select Input */
.customizer-select {
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.customizer-select:hover {
    background: rgba(255, 255, 255, 0.1);
}

.customizer-select:focus {
    outline: none;
    border-color: var(--color-accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.customizer-select option {
    background: #1a1a24;
    color: white;
}

/* Slider */
.customizer-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    margin-bottom: 0.5rem;
}

.customizer-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

.customizer-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.customizer-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--color-accent-gradient);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.slider-value {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--color-accent-primary);
    font-weight: 600;
}

/* Reset Button */
.btn-reset {
    width: 100%;
    padding: 0.875rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #ef4444;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .customizer-panel {
        width: 100%;
        right: -100%;
    }
    
    .customizer-toggle {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .color-schemes {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Overlay when panel is open */
.customizer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.customizer-panel.open ~ .customizer-overlay {
    opacity: 1;
    pointer-events: all;
}

/* Scrollbar for customizer panel */
.customizer-panel::-webkit-scrollbar {
    width: 8px;
}

.customizer-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.customizer-panel::-webkit-scrollbar-thumb {
    background: var(--color-accent-primary);
    border-radius: 4px;
}

.customizer-panel::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent-secondary);
}
