/**
 * Theme Toggle Styles
 * Styles for the theme toggle button and selector
 */

/* ========================================
   Theme Toggle Container
   ======================================== */

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========================================
   Main Toggle Button
   ======================================== */

.theme-toggle-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

.theme-toggle-btn:active {
  transform: translateY(0);
}

.theme-toggle-btn.is-dark {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.theme-toggle-btn.is-dark:hover {
  background: rgba(59, 130, 246, 0.25);
  border-color: rgba(59, 130, 246, 0.4);
}

.theme-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-icon svg {
  display: block;
  width: 18px;
  height: 18px;
}

.theme-toggle-text {
  white-space: nowrap;
}

/* Hide text on small screens */
@media (max-width: 640px) {
  .theme-toggle-text {
    display: none;
  }
  
  .theme-toggle-btn {
    padding: 8px;
  }
}

/* ========================================
   Theme Selector (Individual Options)
   ======================================== */

.theme-selector {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}

.theme-option {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-option:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
}

.theme-option.active {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.4);
  color: #60a5fa;
}

.theme-option svg {
  width: 18px;
  height: 18px;
}

/* ========================================
   Light Theme Styles
   ======================================== */

body.app-theme-light .theme-toggle-btn {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.1);
  color: #475569;
}

body.app-theme-light .theme-toggle-btn:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.2);
}

body.app-theme-light .theme-toggle-btn.is-dark {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.25);
  color: #2563eb;
}

body.app-theme-light .theme-selector {
  background: rgba(15, 23, 42, 0.05);
}

body.app-theme-light .theme-option {
  color: #64748b;
}

body.app-theme-light .theme-option:hover {
  background: rgba(15, 23, 42, 0.1);
  color: #334155;
}

body.app-theme-light .theme-option.active {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: #2563eb;
}

/* ========================================
   Header Integration
   ======================================== */

.app-header .theme-toggle {
  margin-left: auto;
}

.app-header .theme-toggle-btn {
  padding: 6px 12px;
  font-size: 12px;
}

@media (max-width: 640px) {
  .app-header .theme-toggle-btn {
    padding: 6px 8px;
    border-radius: 8px;
    gap: 6px;
  }

  .app-header .theme-toggle-icon svg {
    width: 16px;
    height: 16px;
  }
}

.app-header .theme-option {
  width: 28px;
  height: 28px;
}

/* ========================================
   Compact Mode
   ======================================== */

.theme-toggle.compact .theme-toggle-btn {
  padding: 6px;
}

.theme-toggle.compact .theme-toggle-text {
  display: none;
}

.theme-toggle.compact .theme-selector {
  display: none;
}
