/**
 * 🎯 Estilos do RoutesComponent - Gestão de Rotas PraFrota
 * 
 * Estilos específicos para o componente de rotas, incluindo
 * badges de status, indicadores de tipo e elementos visuais.
 */

// ========================================
// 🎨 BADGES DE STATUS - ESTILO MERCADO LIVE
// ========================================

::ng-deep .status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  display: inline-block;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  
  // ✅ Status principais (alinhados com MercadoLive)
  &.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #664d03;
      color: #fff3cd;
      border-color: #b08800;
    }
    
    :root[data-theme="dark"] & {
      background-color: #664d03;
      color: #fff3cd;
      border-color: #b08800;
    }
  }

  &.status-in_transit {
    background-color: #cce7ff;
    color: #004085;
    border-color: #74b9ff;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #0a4275;
      color: #cce7ff;
      border-color: #0d6efd;
    }
    
    :root[data-theme="dark"] & {
      background-color: #0a4275;
      color: #cce7ff;
      border-color: #0d6efd;
    }
  }

  &.status-delivered {
    background-color: #d4edda;
    color: #155724;
    border-color: #00b894;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #0f5132;
      color: #d4edda;
      border-color: #198754;
    }
    
    :root[data-theme="dark"] & {
      background-color: #0f5132;
      color: #d4edda;
      border-color: #198754;
    }
  }

  &.status-cancelled {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #e17055;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #842029;
      color: #f8d7da;
      border-color: #dc3545;
    }
    
    :root[data-theme="dark"] & {
      background-color: #842029;
      color: #f8d7da;
      border-color: #dc3545;
    }
  }

  &.status-delayed {
    background-color: #f5c6cb;
    color: #721c24;
    border-color: #d63031;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #842029;
      color: #f5c6cb;
      border-color: #dc3545;
    }
    
    :root[data-theme="dark"] & {
      background-color: #842029;
      color: #f5c6cb;
      border-color: #dc3545;
    }
  }

  &.status-unknown {
    background-color: #f5f5f5;
    color: #666;
    border-color: #ddd;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
    
    :root[data-theme="dark"] & {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
  }
}

// ========================================
// 🚛 BADGES DE TIPO DE ROTA
// ========================================

.route-type-badge {
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  
  &.type-firstmile {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #1565c0;
      color: #e3f2fd;
      border-color: #42a5f5;
    }
    
    :root[data-theme="dark"] & {
      background-color: #1565c0;
      color: #e3f2fd;
      border-color: #42a5f5;
    }
  }
  
  &.type-linehaul {
    background-color: #f3e5f5;
    color: #7b1fa2;
    border: 1px solid #ce93d8;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #7b1fa2;
      color: #f3e5f5;
      border-color: #ba68c8;
    }
    
    :root[data-theme="dark"] & {
      background-color: #7b1fa2;
      color: #f3e5f5;
      border-color: #ba68c8;
    }
  }
  
  &.type-lastmile {
    background-color: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #81c784;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #2e7d32;
      color: #e8f5e8;
      border-color: #66bb6a;
    }
    
    :root[data-theme="dark"] & {
      background-color: #2e7d32;
      color: #e8f5e8;
      border-color: #66bb6a;
    }
  }
  
  &.type-custom {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffb74d;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #ef6c00;
      color: #fff3e0;
      border-color: #ffa726;
    }
    
    :root[data-theme="dark"] & {
      background-color: #ef6c00;
      color: #fff3e0;
      border-color: #ffa726;
    }
  }
}

// ========================================
// 🎯 BADGES DE PRIORIDADE
// ========================================

.priority-badge {
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  
  &.priority-low {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
    
    :root[data-theme="dark"] & {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
  }
  
  &.priority-normal {
    background-color: #e3f2fd;
    color: #1565c0;
    border: 1px solid #90caf9;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #1565c0;
      color: #e3f2fd;
      border-color: #42a5f5;
    }
    
    :root[data-theme="dark"] & {
      background-color: #1565c0;
      color: #e3f2fd;
      border-color: #42a5f5;
    }
  }
  
  &.priority-high {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #b08800;
      color: #fff3cd;
      border-color: #ffca2c;
    }
    
    :root[data-theme="dark"] & {
      background-color: #b08800;
      color: #fff3cd;
      border-color: #ffca2c;
    }
  }
  
  &.priority-urgent {
    background-color: #721c24;
    color: #ffffff;
    border: 1px solid #721c24;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px rgba(220, 53, 69, 0.3);
    
    // 🌙 TEMA ESCURO - Manter o mesmo visual impactante
    @media (prefers-color-scheme: dark) {
      background-color: #dc3545;
      border-color: #dc3545;
      box-shadow: 0 0 12px rgba(220, 53, 69, 0.6);
    }
    
    :root[data-theme="dark"] & {
      background-color: #dc3545;
      border-color: #dc3545;
      box-shadow: 0 0 12px rgba(220, 53, 69, 0.6);
    }
  }
  
  &.priority-unknown {
    background-color: #e9ecef;
    color: #495057;
    border: 1px solid #ced4da;
    
    // 🌙 TEMA ESCURO
    @media (prefers-color-scheme: dark) {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
    
    :root[data-theme="dark"] & {
      background-color: #495057;
      color: #adb5bd;
      border-color: #6c757d;
    }
  }
}

@keyframes pulse {
  0% { 
    opacity: 1; 
    transform: scale(1);
  }
  50% { 
    opacity: 0.8; 
    transform: scale(1.02);
  }
  100% { 
    opacity: 1; 
    transform: scale(1);
  }
}

// ========================================
// 🔥 ANIMAÇÃO PULSE GLOBAL (para prioridades urgentes)
// ========================================

::ng-deep [style*="animation: pulse"] {
  animation: pulse 2s ease-in-out infinite !important;
}

// ========================================
// 🎯 MELHORIAS VISUAIS PARA PRIORIDADES ALTAS
// ========================================

::ng-deep .data-table {
  // Destaque especial para linhas com prioridade alta/urgente
  tr:has([style*="background: #fd7e14"]),
  tr:has([style*="background: #dc3545"]) {
    background-color: rgba(253, 126, 20, 0.05) !important;
    
    &:hover {
      background-color: rgba(253, 126, 20, 0.1) !important;
    }
  }
  
  // Destaque extra para prioridade urgente
  tr:has([style*="animation: pulse"]) {
    background-color: rgba(220, 53, 69, 0.08) !important;
    border-left: 3px solid #dc3545 !important;
    
    &:hover {
      background-color: rgba(220, 53, 69, 0.12) !important;
    }
  }
}

// ========================================
// 📍 INDICADORES DE LOCALIZAÇÃO
// ========================================

.location-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  
  .location-icon {
    color: #6c757d;
    font-size: 0.8rem;
  }
  
  .location-text {
    color: var(--text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

// ========================================
// 💰 FORMATAÇÃO DE VALORES
// ========================================

.currency-value {
  font-weight: 600;
  color: var(--success-color, #28a745);
  
  &.negative {
    color: var(--danger-color, #dc3545);
  }
  
  &.zero {
    color: var(--muted-color, #6c757d);
  }
}

.package-count {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  
  .package-icon {
    font-size: 0.8rem;
    color: var(--primary-color);
  }
}

// ========================================
// 📊 MÉTRICAS E ESTATÍSTICAS
// ========================================

.route-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  
  .metric-card {
    background: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    
    .metric-value {
      font-size: 1.5rem;
      font-weight: 700;
      color: var(--primary-color);
      margin-bottom: 0.25rem;
    }
    
    .metric-label {
      font-size: 0.85rem;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }
    
    .metric-change {
      font-size: 0.75rem;
      margin-top: 0.25rem;
      
      &.positive {
        color: var(--success-color);
      }
      
      &.negative {
        color: var(--danger-color);
      }
    }
  }
}

// ========================================
// 🔔 INDICADORES DE CONECTIVIDADE
// ========================================

.connectivity-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 1rem;
  
  &.online {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background-color: #28a745;
      animation: pulse-green 2s infinite;
    }
  }
  
  &.offline {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    
    .status-dot {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background-color: #dc3545;
      animation: pulse-red 2s infinite;
    }
  }
  
  .reconnect-button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    text-decoration: underline;
    font-size: inherit;
    padding: 0;
    margin-left: 0.5rem;
    
    &:hover {
      opacity: 0.8;
    }
  }
}

@keyframes pulse-green {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

@keyframes pulse-red {
  0% { opacity: 1; }
  50% { opacity: 0.3; }
  100% { opacity: 1; }
}

// ========================================
// 📱 RESPONSIVIDADE
// ========================================

@media (max-width: 768px) {
  .route-metrics {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    
    .metric-card {
      padding: 0.75rem;
      
      .metric-value {
        font-size: 1.25rem;
      }
      
      .metric-label {
        font-size: 0.75rem;
      }
    }
  }
  
  .status-badge,
  .route-type-badge,
  .priority-badge {
    font-size: 0.65rem;
    padding: 0.2rem 0.5rem;
  }
  
  .location-text {
    max-width: 150px;
  }
}

@media (max-width: 480px) {
  .route-metrics {
    grid-template-columns: 1fr;
  }
  
  .connectivity-indicator {
    font-size: 0.7rem;
    padding: 0.2rem 0.5rem;
  }
}

// ========================================
// 📊 BADGES DE DIVERGÊNCIA (KM E TEMPO)
// ========================================

.divergence-badge {
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
  display: inline-block;
  white-space: nowrap;
  text-align: center;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  
  // 🟢 Divergência Negativa (Melhor que o planejado)
  &.km-divergence-negative,
  &.time-divergence-negative {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
  }
  
  // 🟡 Divergência Neutra (Dentro da margem aceitável)
  &.km-divergence-neutral,
  &.time-divergence-neutral {
    background-color: #e2e3e5;
    color: #383d41;
    border-color: #d6d8db;
  }
  
  // 🔴 Divergência Positiva (Pior que o planejado)
  &.km-divergence-positive,
  &.time-divergence-positive {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
  }
}

// ========================================
// 📱 RESPONSIVE PARA DIVERGÊNCIAS
// ========================================

@media (max-width: 768px) {
  .divergence-badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }
}

// ========================================
// ⭐ SISTEMA DE RATING VISUAL - MOTORISTAS
// ========================================

::ng-deep .driver-rating-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 40px;
  
  .driver-name-text {
    font-weight: 500;
    color: var(--text-color, var(--bs-body-color, #212529));
    font-size: 14px;
    line-height: 1.2;
    margin-bottom: 2px;
    
    // Tema dark
    @media (prefers-color-scheme: dark) {
      color: var(--bs-light, #f8f9fa);
    }
    
    // Suporte para tema dark via classe
    :root[data-theme="dark"] & {
      color: var(--bs-light, #f8f9fa);
    }
  }
  
  .stars-display {
    color: #ffc107;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
    
    // Melhor contraste no tema dark
    @media (prefers-color-scheme: dark) {
      color: #ffeb3b;
      filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
    }
    
    :root[data-theme="dark"] & {
      color: #ffeb3b;
      filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
    }
  }
  
  .rating-classification {
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    
    // As cores já são definidas inline baseadas no rating
    // Mas podemos melhorar o contraste no tema dark
    @media (prefers-color-scheme: dark) {
      filter: brightness(1.2) saturate(1.1);
    }
    
    :root[data-theme="dark"] & {
      filter: brightness(1.2) saturate(1.1);
    }
  }
  
  .no-rating-text {
    color: var(--text-muted, #6c757d);
    font-style: italic;
    
    // Tema dark
    @media (prefers-color-scheme: dark) {
      color: var(--bs-secondary, #adb5bd);
    }
    
    :root[data-theme="dark"] & {
      color: var(--bs-secondary, #adb5bd);
    }
  }
  
  // Hover effect para destacar o rating
  &:hover {
    .stars-display {
      transform: scale(1.05);
      transition: transform 0.2s ease;
    }
    
    .rating-classification {
      font-weight: 700;
      transition: font-weight 0.2s ease;
    }
    
    .driver-name-text {
      color: var(--primary-color, #007bff);
      transition: color 0.2s ease;
      
      @media (prefers-color-scheme: dark) {
        color: var(--bs-info, #0dcaf0);
      }
      
      :root[data-theme="dark"] & {
        color: var(--bs-info, #0dcaf0);
      }
    }
  }
}

// ========================================
// 🌟 ANIMAÇÕES PARA RATINGS ALTOS
// ========================================

::ng-deep .driver-rating-container {
  // Animação sutil para ratings excelentes (4.5+)
  &[data-rating="excellent"] {
    .stars-display {
      animation: twinkle 3s ease-in-out infinite;
    }
  }
  
  // Destaque especial para ratings perfeitos (5.0)
  &[data-rating="perfect"] {
    .stars-display {
      animation: golden-glow 2s ease-in-out infinite alternate;
    }
    
    .rating-classification {
      text-shadow: 0 0 4px rgba(40, 167, 69, 0.3);
      
      @media (prefers-color-scheme: dark) {
        text-shadow: 0 0 6px rgba(40, 167, 69, 0.5);
      }
      
      :root[data-theme="dark"] & {
        text-shadow: 0 0 6px rgba(40, 167, 69, 0.5);
      }
    }
  }
}

@keyframes twinkle {
  0%, 100% { 
    opacity: 1; 
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
  }
  50% { 
    opacity: 0.8; 
    filter: drop-shadow(0 1px 4px rgba(255, 193, 7, 0.3));
  }
}

@keyframes golden-glow {
  0% { 
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
    transform: scale(1);
  }
  100% { 
    filter: drop-shadow(0 2px 8px rgba(255, 193, 7, 0.4));
    transform: scale(1.02);
  }
}

// ========================================
// 📱 RESPONSIVIDADE - RATING MOTORISTA
// ========================================

@media (max-width: 768px) {
  ::ng-deep .driver-rating-container {
    gap: 3px;
    min-height: 36px;
    
    .driver-name-text {
      font-size: 13px;
      margin-bottom: 1px;
    }
    
    .stars-display {
      font-size: 12px;
    }
    
    .rating-classification {
      font-size: 10px;
    }
    
    .no-rating-text {
      font-size: 10px;
    }
  }
}

@media (max-width: 480px) {
  ::ng-deep .driver-rating-container {
    gap: 2px;
    min-height: 32px;
    
    .driver-name-text {
      font-size: 12px;
      margin-bottom: 0px;
    }
    
    .stars-display {
      font-size: 11px;
    }
    
    .rating-classification {
      font-size: 9px;
    }
    
    .no-rating-text {
      font-size: 9px;
    }
  }
}

// ========================================
// 🎯 PRIORIDADE - ESTILOS COM TEMA DARK
// ========================================

::ng-deep .priority-low-text {
  color: var(--text-muted, #6c757d);
  font-size: 0.9rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

::ng-deep .priority-normal-text {
  color: var(--text-color, #495057);
  font-size: 0.9rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-light, #f8f9fa);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-light, #f8f9fa);
  }
}

::ng-deep .priority-high-badge {
  color: #fff;
  background: #fd7e14;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(253, 126, 20, 0.3);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.5);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.5);
  }
}

::ng-deep .priority-urgent-badge {
  color: #fff;
  background: #dc3545;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 6px rgba(220, 53, 69, 0.4);
  animation: pulse 2s infinite;
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.6);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.6);
  }
}

::ng-deep .priority-unknown-text {
  color: var(--text-muted, #6c757d);
  font-size: 0.9rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

// ========================================
// 🏢 EMPRESA - ESTILOS COM TEMA DARK
// ========================================

::ng-deep .company-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

::ng-deep .company-logo {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-color, #e9ecef);
  
  @media (prefers-color-scheme: dark) {
    border-color: var(--bs-border-color, #495057);
  }
  
  :root[data-theme="dark"] & {
    border-color: var(--bs-border-color, #495057);
  }
}

::ng-deep .company-initials-fallback {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(45deg, #007bff, #28a745);
  color: white;
  font-weight: 600;
  font-size: 11px;
  align-items: center;
  justify-content: center;
}

::ng-deep .company-initials {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  color: white;
  font-weight: 700;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
}

::ng-deep .company-name {
  font-weight: 500;
  color: var(--text-color, var(--bs-body-color, #333));
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-light, #f8f9fa);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-light, #f8f9fa);
  }
}

::ng-deep .company-not-informed {
  color: var(--text-muted, #6c757d);
  font-style: italic;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

// ========================================
// 💰 VALOR DA CARGA - ESTILOS COM TEMA DARK
// ========================================

::ng-deep .cargo-value-high {
  color: #fff;
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(111, 66, 193, 0.3);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.5);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(111, 66, 193, 0.5);
  }
}

::ng-deep .cargo-value-medium {
  color: #fff;
  background: linear-gradient(135deg, #fd7e14, #ffc107);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(253, 126, 20, 0.3);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.5);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(253, 126, 20, 0.5);
  }
}

::ng-deep .cargo-value-normal {
  color: var(--text-color, #495057);
  background: var(--bg-light, #f8f9fa);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border-color, #dee2e6);
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-light, #f8f9fa);
    background: var(--bs-dark, #343a40);
    border-color: var(--bs-border-color, #495057);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-light, #f8f9fa);
    background: var(--bs-dark, #343a40);
    border-color: var(--bs-border-color, #495057);
  }
}

::ng-deep .cargo-value-low {
  color: var(--text-muted, #6c757d);
  font-weight: 500;
  font-size: 0.9rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

::ng-deep .cargo-value-empty {
  color: var(--text-muted, #6c757d);
  font-style: italic;
  font-size: 0.85rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

// ========================================
// ⚖️ PESO - ESTILOS COM TEMA DARK
// ========================================

::ng-deep .weight-heavy {
  color: #fff;
  background: linear-gradient(135deg, #dc3545, #fd7e14);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.5);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(220, 53, 69, 0.5);
  }
}

::ng-deep .weight-medium {
  color: #fff;
  background: linear-gradient(135deg, #28a745, #20c997);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
  
  @media (prefers-color-scheme: dark) {
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.5);
  }
  
  :root[data-theme="dark"] & {
    box-shadow: 0 2px 6px rgba(40, 167, 69, 0.5);
  }
}

::ng-deep .weight-normal {
  color: var(--text-color, #495057);
  background: var(--bg-light, #f8f9fa);
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  border: 1px solid var(--border-color, #dee2e6);
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-light, #f8f9fa);
    background: var(--bs-dark, #343a40);
    border-color: var(--bs-border-color, #495057);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-light, #f8f9fa);
    background: var(--bs-dark, #343a40);
    border-color: var(--bs-border-color, #495057);
  }
}

::ng-deep .weight-light {
  color: var(--text-muted, #6c757d);
  font-weight: 500;
  font-size: 0.9rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
}

::ng-deep .weight-empty {
  color: var(--text-muted, #6c757d);
  font-style: italic;
  font-size: 0.85rem;
  
  @media (prefers-color-scheme: dark) {
    color: var(--bs-secondary, #adb5bd);
  }
  
  :root[data-theme="dark"] & {
    color: var(--bs-secondary, #adb5bd);
  }
} 