/* ============ FoxHelper THEMES ============ */

/* Dark theme overrides for navbar */
[data-theme="dark"] .navbar .search input {
  background: #2d3748;
  border-color: #4a5568;
  color: #f0f6fc;
}

[data-theme="dark"] .navbar .search input:focus {
  background: #374151;
  border-color: var(--theme-accent);
  box-shadow: 
    0 0 0 4px rgba(255, 107, 53, 0.15),
    0 4px 16px rgba(255, 107, 53, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark theme overrides for forms */
[data-theme="dark"] .form-control {
  background: #2d3748;
  border-color: #4a5568;
  color: #f0f6fc;
}

[data-theme="dark"] .form-control:focus {
  border-color: var(--fh-accent);
  background: #374151;
  box-shadow: 
    0 0 0 4px rgba(255, 107, 53, 0.15),
    0 4px 16px rgba(255, 107, 53, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Dark theme overrides for tables */
[data-theme="dark"] .table {
  background: #2d3748;
}

[data-theme="dark"] .table tbody tr {
  background: #374151;
}

[data-theme="dark"] .table tbody tr:nth-child(even) {
  background: #2d3748;
}

[data-theme="dark"] .table tbody tr td {
  background: inherit;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

/* Исключение для таблицы бонусов в темной теме - там текст остается цветным */
[data-theme="dark"] .fh-bonuses-dark .table tbody tr td {
  color: inherit !important;
}

/* Темная тема для кнопок рефералов */
[data-theme="dark"] .btn-ref {
  background: #2d3748;
  border-color: #4a5568;
  color: #f0f6fc;
}

[data-theme="dark"] .btn-ref:hover {
  background: var(--fh-accent);
  color: #000;
  box-shadow: 
    0 8px 24px rgba(255, 107, 53, 0.4),
    0 4px 12px rgba(255, 107, 53, 0.3),
    0 0 0 4px rgba(255, 107, 53, 0.2);
}

[data-theme="dark"] .table thead th {
  background: rgba(255, 107, 53, 0.8);
  color: #000;
  border-radius: 8px;
  text-align: center !important;
  vertical-align: middle !important;
}

[data-theme="dark"] .table th {
  text-align: center !important;
  vertical-align: middle !important;
}

[data-theme="dark"] .table tbody tr:hover {
  background: rgba(255, 107, 53, 0.15);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

[data-theme="dark"] .info-card,
[data-theme="dark"] .product-card {
  background: #2d3748;
  border-color: var(--fh-accent);
  color: #f0f6fc;
}

/* Dark theme overrides for form selects */
[data-theme="dark"] .form-select {
  background: #2d3748;
  border: none;
  color: #f0f6fc;
}

[data-theme="dark"] .form-select:focus {
  border: none;
  background: #374151;
  box-shadow: 
    0 0 0 4px rgba(255, 107, 53, 0.15),
    0 4px 16px rgba(255, 107, 53, 0.1),
    0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Стили для переключателя тем */
.theme-switcher {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}

.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  border: 2px solid #dee2e6;
  background: #ffffff;
  color: #6c757d;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.theme-btn:hover {
  border-color: #fd7e14;
  color: #fd7e14;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(253, 126, 20, 0.3);
}

.theme-btn.active {
  background: #fd7e14;
  border-color: #fd7e14;
  color: #ffffff;
  transform: scale(1.1);
  box-shadow: 
    0 0 0 4px rgba(253, 126, 20, 0.2),
    0 6px 20px rgba(253, 126, 20, 0.4);
}

.theme-btn.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.3) 50%, transparent 70%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Темная тема для переключателя */
[data-theme="dark"] .theme-btn {
  background: #2d3748;
  border-color: #4a5568;
  color: #8b949e;
}

[data-theme="dark"] .theme-btn:hover {
  border-color: #ff6b35;
  color: #ff6b35;
  background: #374151;
}

[data-theme="dark"] .theme-btn.active {
  background: #ff6b35;
  border-color: #ff6b35;
  color: #000;
  box-shadow: 
    0 0 0 4px rgba(255, 107, 53, 0.2),
    0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Мобильная версия переключателя тем */
@media (max-width: 576px) {
  .theme-switcher {
    gap: 0.125rem;
  }
  
  .theme-btn {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  
  .theme-btn.active {
    transform: scale(1.05);
  }
}