/* Farzilla Technologies - Theme Selector Styles
   Place in: /wwwroot/css/theme-selector.css
   ========================================================== */

/* ==================== THEME SELECTOR BUTTON ==================== */

.theme-selector-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: var(--accent-primary);
    border: none;
    border-radius: 50%;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    transition: all var(--transition-base);
    color: white;
}

.theme-selector-btn:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-xl);
}

.theme-selector-btn:active {
    transform: scale(0.95);
}

/* ==================== THEME PANEL ==================== */

.theme-panel {
    position: fixed;
    bottom: 90px;
    right: 2rem;
    width: 420px;
    max-width: calc(100vw - 4rem);
    max-height: 80vh;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-base);
}

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

/* Custom scrollbar */
.theme-panel::-webkit-scrollbar {
    width: 6px;
}

.theme-panel::-webkit-scrollbar-track {
    background: var(--bg-light);
}

.theme-panel::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 3px;
}

.theme-panel::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ==================== PANEL HEADER ==================== */

.theme-panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-white);
    z-index: 1;
}

.theme-panel-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.theme-panel-header p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin: 0;
}

/* ==================== THEME SECTIONS ==================== */

.theme-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.theme-section:last-child {
    border-bottom: none;
}

.theme-section h4 {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-medium);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
}

/* ==================== THEME OPTIONS ==================== */

.theme-options {
    display: grid;
    gap: 0.75rem;
}

.theme-option {
    padding: 1rem 1.25rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-white);
}

.theme-option:hover {
    border-color: var(--accent-primary);
    background: var(--bg-light);
    transform: translateX(4px);
}

.theme-option.active {
    border-color: var(--accent-primary);
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(59, 130, 246, 0.1) 100%);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.theme-option-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-option-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.theme-option-check {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 1.125rem;
}

/* ==================== ACCENT OPTIONS ==================== */

.accent-grid {
    grid-template-columns: repeat(2, 1fr);
}

.accent-option {
    padding: 0.875rem 1rem;
}

.accent-color-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.75rem;
    border: 2px solid var(--border-medium);
}

.accent-color-dot[data-accent="blue"] {
    background: #3B82F6;
}

.accent-color-dot[data-accent="gold"] {
    background: #D4A574;
}

.accent-color-dot[data-accent="orange"] {
    background: #F97316;
}

.accent-color-dot[data-accent="cyan"] {
    background: #06B6D4;
}

.accent-option .theme-option-content {
    display: flex;
    align-items: center;
}

.accent-option .theme-option-label {
    flex: 1;
    font-size: 0.875rem;
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .theme-selector-btn {
        bottom: 1rem;
        right: 1rem;
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .theme-panel {
        bottom: 75px;
        right: 1rem;
        width: calc(100vw - 2rem);
        max-height: 70vh;
    }
    
    .accent-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .theme-panel {
        max-height: 60vh;
    }
}

/* ==================== ANIMATIONS ==================== */

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }
}

.theme-selector-btn.pulse {
    animation: pulse 2s infinite;
}

/* ==================== ACCESSIBILITY ==================== */

.theme-selector-btn:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.theme-option:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: -2px;
}

@media (prefers-reduced-motion: reduce) {
    .theme-selector-btn,
    .theme-panel,
    .theme-option {
        transition-duration: 0.01ms !important;
        animation: none !important;
    }
}
