/* ===== NEXTGEN THEME SYSTEM ===== */

/* CSS Custom Properties para o sistema de cores */
:root {
  /* Cores principais - Tema Coca-Cola */
  --theme-primary: #DC143C;
  --theme-secondary: #8B0000;
  --theme-success: #28a745;
  --theme-warning: #FFD700;
  --theme-danger: #FF4444;
  --theme-info: #17a2b8;
  --theme-light: #ffffff;
  --theme-dark: #2C0A0A;
  --theme-white: #ffffff;
  --theme-muted: #CCCCCC;
  
  /* Versões RGB para transparência */
  --theme-secondary-rgb: 139, 0, 0;
  --theme-primary-rgb: 220, 20, 60;
  --theme-primary-rgba: rgba(220, 20, 60, 0.4);
  
  /* Cores específicas */
  --theme-navbar: #DC143C;
  --theme-card: rgba(139, 0, 0, 0.9);
  --theme-border: #8B0000;
  --theme-input: rgba(139, 0, 0, 0.7);
  
  /* Cores de texto */
  --theme-text-primary: #ffffff;
  --theme-text-secondary: #FFCCCC;
  --theme-text-warning: #FFD700;
  --theme-text-dark: #2C0A0A;
  --theme-text-light: #ffffff;
  
  /* Cores de tickets */
  --theme-ticket-staff: #080808;
  --theme-ticket-full: #f0ad4e;
  --theme-ticket-viewer: #ced4da;
}

/* ===== CLASSES UTILITÁRIAS DE TEMA ===== */

/* Backgrounds */
.theme-bg-primary { background-color: var(--theme-primary) !important; }
.theme-bg-secondary { background-color: var(--theme-secondary) !important; }
.theme-bg-success { background-color: var(--theme-success) !important; }
.theme-bg-warning { background-color: var(--theme-warning) !important; }
.theme-bg-danger { background-color: var(--theme-danger) !important; }
.theme-bg-info { background-color: var(--theme-info) !important; }
.theme-bg-light { background-color: var(--theme-light) !important; }
.theme-bg-dark { background-color: var(--theme-dark) !important; }
.theme-bg-white { background-color: var(--theme-white) !important; }

/* Cores de texto */
.theme-text-primary { color: var(--theme-text-primary) !important; }
.theme-text-secondary { color: var(--theme-text-secondary) !important; }
.theme-text-warning { color: var(--theme-text-warning) !important; }
.theme-text-dark { color: var(--theme-text-dark) !important; }
.theme-text-muted { color: var(--theme-muted) !important; }

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

/* ===== SOBRESCRITAS ESPECÍFICAS DO BOOTSTRAP ===== */

/* Navbar customizada */
.navbar.theme-navbar {
  background-color: var(--theme-navbar) !important;
}

/* Cards customizados */
.card.theme-card {
  background-color: var(--theme-card) !important;
  color: var(--theme-text-primary) !important;
}

/* Botões primários customizados */
.btn.theme-btn-primary {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  color: var(--theme-text-dark);
}

.btn.theme-btn-primary:hover {
  background-color: var(--theme-primary);
  border-color: var(--theme-primary);
  opacity: 0.9;
  color: var(--theme-text-dark);
}

/* Botões outline primários */
.btn.theme-btn-outline-primary {
  color: var(--theme-primary);
  border-color: var(--theme-primary);
  background-color: transparent;
}

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

/* ===== COMPONENTES ESPECÍFICOS ===== */

/* Tickets */
.ticket-staff {
  background-color: var(--theme-ticket-staff) !important;
  color: var(--theme-text-primary) !important;
}

.ticket-full {
  background-color: var(--theme-ticket-full) !important;
  color: var(--theme-text-dark) !important;
}

.ticket-viewer {
  background-color: var(--theme-ticket-viewer) !important;
  color: var(--theme-text-dark) !important;
}

/* ===== COMPATIBILIDADE COM CLASSES EXISTENTES ===== */

/* Mantém compatibilidade com classes Bootstrap existentes mas permite sobrescrita */
.bg-dark.theme-override { 
  background-color: var(--theme-dark) !important; 
}

.text-white.theme-override { 
  color: var(--theme-text-primary) !important; 
}

.text-warning.theme-override { 
  color: var(--theme-text-warning) !important; 
}

.text-muted.theme-override { 
  color: var(--theme-muted) !important; 
}

/* ===== ANIMAÇÕES E EFEITOS ===== */

/* Transições suaves para mudanças de tema */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== RESPONSIVIDADE ===== */

@media (max-width: 768px) {
  /* Ajustes responsivos se necessário */
}

/* ===== CLASSES HELPER PARA ANGULAR ===== */

/* Classes que podem ser aplicadas dinamicamente via Angular */
.theme-text-light {
  color: var(--theme-text-light) !important;
}

.theme-text-dark {
  color: var(--theme-text-dark) !important;
}

.theme-text-danger {
  color: var(--theme-danger) !important;
}

.theme-text-success {
  color: var(--theme-success) !important;
}

.theme-modal-content {
  background-color: var(--theme-dark) !important;
  color: var(--theme-text-primary) !important;
  border: 1px solid var(--theme-border) !important;
}

.theme-badge {
  background-color: var(--theme-warning) !important;
  color: var(--theme-text-dark) !important;
}

.theme-card-secondary {
  background-color: rgba(var(--theme-secondary-rgb), 0.1) !important;
  color: var(--theme-text-primary) !important;
}

.theme-table-head {
  background-color: var(--theme-warning) !important;
  color: var(--theme-text-dark) !important;
}

.theme-input {
  background-color: var(--theme-secondary) !important;
  color: var(--theme-text-primary) !important;
}

/* Classe para override dinâmico */
.theme-dynamic {
  background-color: var(--theme-dynamic-bg, var(--theme-primary)) !important;
  color: var(--theme-dynamic-text, var(--theme-text-primary)) !important;
}

/* ===== CLASSES ESPECÍFICAS TEMA COCA-COLA ===== */

/* Botão principal estilo Coca-Cola */
.theme-btn-primary {
  background: var(--theme-primary) !important;
  border: none !important;
  color: var(--theme-text-primary) !important;
  box-shadow: 0 4px 15px var(--theme-primary-rgba, rgba(var(--theme-primary-rgb), 0.4)) !important;
  transition: all 0.3s ease !important;
}

.theme-btn-primary:hover {
  background: var(--theme-secondary) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--theme-primary-rgba, rgba(var(--theme-primary-rgb), 0.6)) !important;
  color: var(--theme-text-primary) !important;
}

/* Input estilo Coca-Cola */
.theme-input {
  background-color: var(--theme-input) !important;
  border: 1px solid var(--theme-border) !important;
  color: var(--theme-text-primary) !important;
  transition: all 0.3s ease;
}

.theme-input:focus {
  background-color: var(--theme-input) !important;
  border-color: var(--theme-primary) !important;
  box-shadow: 0 0 0 0.2rem var(--theme-primary-rgba, rgba(var(--theme-primary-rgb), 0.25)) !important;
  color: var(--theme-text-primary) !important;
}

.theme-input::placeholder {
  color: var(--theme-text-secondary) !important;
}

/* Card estilo Coca-Cola */
.theme-card {
  background: var(--theme-card) !important;
  backdrop-filter: blur(10px);
  border: 1px solid var(--theme-border) !important;
  color: var(--theme-text-primary) !important;
}

.ng-theme-primary { color: var(--theme-primary) !important; }
.ng-theme-warning { color: var(--theme-warning) !important; }
.ng-theme-bg-dark { background-color: var(--theme-dark) !important; }
.ng-theme-bg-primary { background-color: var(--theme-primary) !important; }
