/**
 * Sistema de Temas - CSS Variables
 * Gerenciamento dinâmico de cores baseado no tema selecionado
 */

/* 
 * NOTA: As variáveis CSS são injetadas dinamicamente pelo ThemeManager
 * baseado no tema selecionado no config.json
 * 
 * Este arquivo contém apenas as classes utilitárias e componentes
 * que usam as variáveis CSS dinâmicas
 */

/* 
 * As variáveis CSS são injetadas dinamicamente pelo ThemeManager
 * baseado no tema selecionado no config.json
 * 
 * Este arquivo contém apenas as classes utilitárias que usam
 * as variáveis CSS dinâmicas
 */

/* ===== CLASSES UTILITÁRIAS ===== */

/* Cores de texto */
.text-primary { color: var(--theme-primary) !important; }
.text-secondary { color: var(--theme-secondary) !important; }
.text-accent { color: var(--theme-accent) !important; }
.text-success { color: var(--theme-success) !important; }
.text-warning { color: var(--theme-warning) !important; }
.text-error { color: var(--theme-error) !important; }
.text-info { color: var(--theme-info) !important; }
.text-muted { color: var(--theme-text_secondary) !important; }

/* Cores de fundo */
.bg-primary { background-color: var(--theme-primary) !important; }
.bg-secondary { background-color: var(--theme-secondary) !important; }
.bg-accent { background-color: var(--theme-accent) !important; }
.bg-surface { background-color: var(--theme-surface) !important; }
.bg-card { background-color: var(--theme-card) !important; }
.bg-success { background-color: var(--theme-success) !important; }
.bg-warning { background-color: var(--theme-warning) !important; }
.bg-error { background-color: var(--theme-error) !important; }
.bg-info { background-color: var(--theme-info) !important; }

/* Bordas */
.border-primary { border-color: var(--theme-primary) !important; }
.border-secondary { border-color: var(--theme-secondary) !important; }
.border-accent { border-color: var(--theme-accent) !important; }

/* ===== COMPONENTES ===== */

/* Botões */
.btn-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: white;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--theme-primary_hover);
  border-color: var(--theme-primary_hover);
  color: white;
}

.btn-secondary {
  background-color: var(--theme-secondary);
  border-color: var(--theme-secondary);
  color: white;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: var(--theme-primary_hover);
  border-color: var(--theme-primary_hover);
  color: white;
}

.btn-outline-primary {
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  background-color: transparent;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: white;
}

/* Cards */
.card {
  background-color: var(--theme-card);
  border: 1px solid var(--theme-surface);
  color: var(--theme-text_primary);
}

.card-header {
  background-color: var(--theme-surface);
  border-bottom: 1px solid var(--theme-surface);
  color: var(--theme-text_primary);
}

.card-body {
  color: var(--theme-text_primary);
}

.card-footer {
  background-color: var(--theme-surface);
  border-top: 1px solid var(--theme-surface);
  color: var(--theme-text_primary);
}

/* Links */
a {
  color: var(--theme-primary);
}

a:hover {
  color: var(--theme-primary_hover);
}

/* Formulários */
.form-control {
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-surface);
  color: var(--theme-text_primary);
}

.form-control:focus {
  background-color: var(--theme-surface);
  border-color: var(--theme-primary);
  color: var(--theme-text_primary);
  box-shadow: 0 0 0 0.2rem rgba(34, 197, 94, 0.25);
}

.form-label {
  color: var(--theme-text_primary);
}

/* Navegação */
.navbar {
  background-color: var(--theme-background);
  border-bottom: 1px solid var(--theme-surface);
}

.navbar-brand,
.navbar-nav .nav-link {
  color: var(--theme-text_primary);
}

.navbar-nav .nav-link:hover {
  color: var(--theme-primary);
}

/* Badges */
.badge-primary {
  background-color: var(--theme-primary);
  color: white;
}

.badge-secondary {
  background-color: var(--theme-secondary);
  color: white;
}

.badge-success {
  background-color: var(--theme-success);
  color: white;
}

.badge-warning {
  background-color: var(--theme-warning);
  color: white;
}

.badge-error {
  background-color: var(--theme-error);
  color: white;
}

.badge-info {
  background-color: var(--theme-info);
  color: white;
}

/* Alertas */
.alert-primary {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: var(--theme-primary);
  color: var(--theme-primary);
}

.alert-success {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: var(--theme-success);
  color: var(--theme-success);
}

.alert-warning {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: var(--theme-warning);
  color: var(--theme-warning);
}

.alert-error {
  background-color: rgba(239, 68, 68, 0.1);
  border-color: var(--theme-error);
  color: var(--theme-error);
}

.alert-info {
  background-color: rgba(59, 130, 246, 0.1);
  border-color: var(--theme-info);
  color: var(--theme-info);
}

/* Progress bars */
.progress {
  background-color: var(--theme-surface);
}

.progress-bar {
  background-color: var(--theme-primary);
}

/* Modais */
.modal-content {
  background-color: var(--theme-card);
  border: 1px solid var(--theme-surface);
}

.modal-header {
  border-bottom: 1px solid var(--theme-surface);
  background-color: var(--theme-surface);
}

.modal-body {
  color: var(--theme-text_primary);
}

.modal-footer {
  border-top: 1px solid var(--theme-surface);
  background-color: var(--theme-surface);
}

/* Dropdowns */
.dropdown-menu {
  background-color: var(--theme-card);
  border: 1px solid var(--theme-surface);
}

.dropdown-item {
  color: var(--theme-text_primary);
}

.dropdown-item:hover {
  background-color: var(--theme-surface);
  color: var(--theme-primary);
}

/* Tables */
.table {
  color: var(--theme-text_primary);
}

.table th {
  background-color: var(--theme-surface);
  border-color: var(--theme-surface);
  color: var(--theme-text_primary);
}

.table td {
  border-color: var(--theme-surface);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Body e elementos base */
body {
  background-color: var(--theme-background);
  color: var(--theme-text_primary);
}

/* ===== SELEÇÃO DE TEMA ===== */
.theme-selector {
  padding: 15px;
  background-color: var(--theme-card);
  border-radius: 8px;
  margin: 10px 0;
}

.theme-selector label {
  display: block;
  margin-bottom: 8px;
  color: var(--theme-text_primary);
  font-weight: bold;
}

.theme-selector select {
  width: 100%;
  padding: 8px 12px;
  background-color: var(--theme-surface);
  border: 1px solid var(--theme-surface);
  border-radius: 4px;
  color: var(--theme-text_primary);
}

.theme-selector select:focus {
  border-color: var(--theme-primary);
  outline: none;
}

/* Preview dos temas */
.theme-preview {
  display: inline-block;
  margin: 10px;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  min-width: 200px;
}

.theme-preview h4 {
  margin: 0 0 10px 0;
  font-size: 16px;
}

.theme-preview button {
  margin: 2px;
  padding: 6px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
  .theme-preview {
    min-width: 150px;
    margin: 5px;
  }
  
  .theme-selector {
    padding: 10px;
  }
}
