/* ==========================================================
   alerts.css — Estilos para alertas em tempo real e dropdown
   Toasts unificados: ver #toast-container em style3.css
   ========================================================== */

/* Container de alertas em tempo real (exibidos no topo-direito) */
.real-time-alerts {
  position: fixed;
  top: 80px;
  right: 20px;
  width: 360px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.real-time-alerts > * { pointer-events: auto; }

/* Alerta em tempo real — mesma base visual dos toasts */
.real-time-alert {
  width: 360px;
  background: var(--sidebar-bg, var(--cv-1a1d24, #1a1d24));
  border: 1px solid var(--cv-ffffff-a0080, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 13px 40px 13px 14px;
  box-shadow: 0 8px 32px var(--cv-000000-a0450, rgba(0,0,0,0.45));
  display: flex;
  gap: 10px;
  align-items: flex-start;
  position: relative;
  overflow: hidden;
  animation: rt-slideIn 0.3s cubic-bezier(0.34,1.2,0.64,1);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.real-time-alert::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--primary, #F0B90B);
  border-radius: 12px 0 0 12px;
}
.real-time-alert.fade-out {
  opacity: 0;
  transform: translateX(20px);
}

/* Ícone do alerta em tempo real */
.real-time-alert .alert-icon {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  background: var(--cv-ffffff-a0060, rgba(255,255,255,0.06));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

/* Conteúdo textual */
.real-time-alert .alert-content {
  flex: 1;
  min-width: 0;
}
.real-time-alert .alert-message {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--cv-ffffff-a0880, rgba(255,255,255,0.88));
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.real-time-alert .alert-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--cv-a1a1aa-a0500, rgba(161,161,170,0.5));
}
.real-time-alert .alert-symbol {
  font-size: 10px;
  font-weight: 700;
  color: var(--primary, var(--cvi-f0b90b, #F0B90B));
  background: rgba(240,185,11,0.1);
  padding: 2px 5px;
  border-radius: 4px;
}

/* Botão fechar em tempo real */
.real-time-alert .alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  background: var(--cv-ffffff-a0060, rgba(255,255,255,0.06));
  border: none;
  border-radius: 6px;
  color: var(--cv-a1a1aa-a0600, rgba(161,161,170,0.6));
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  line-height: 1;
  transition: all 0.15s;
}
.real-time-alert .alert-close:hover {
  background: var(--cv-ffffff-a0100, rgba(255,255,255,0.1));
  color: var(--cv-ffffff-a0900, rgba(255,255,255,0.9));
}


/* Dropdown de notificações */
.alerts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background-color: var(--sidebar-bg);
  z-index: 1;
}


.alerts-tabs {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin: 0 -15px;
  width: calc(100% + 30px);
}


.alert-tab {
  background: none;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-muted);
  position: relative;
  transition: all 0.2s;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


.alert-tab.active {
  color: var(--highlight-blue);
  font-weight: 500;
}


.alert-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--highlight-blue);
}


.clear-alerts-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}


.clear-alerts-btn:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.1);
}


.alerts-tab-content {
  display: none;
  max-height: 400px;
  overflow-y: auto;
  padding: 0;
}


.alerts-tab-content.active {
  display: block;
}


/* Itens de alerta */
.alert-item {
  display: flex;
  padding: 12px 15px;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
}


.alert-item.unread {
  background-color: rgba(59, 130, 246, 0.05);
}


.alert-item:hover {
  background-color: var(--menu-hover-bg);
}


.alert-item .alert-icon {
  font-size: 1.2rem;
  margin-top: 2px;
  flex-shrink: 0;
}


.alert-item .alert-content {
  flex: 1;
  min-width: 0;
}


.alert-item .alert-message {
  font-size: 0.9rem;
  margin-bottom: 4px;
  color: var(--text-primary);
  line-height: 1.4;
}


.alert-item .alert-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}


.alert-item .alert-symbol {
  background: rgba(59, 130, 246, 0.1);
  color: var(--highlight-blue);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}


.empty-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  color: var(--text-muted);
  text-align: center;
}


.empty-tab i {
  font-size: 1.5rem;
  margin-bottom: 10px;
  opacity: 0.6;
}


.empty-tab p {
  margin: 0;
  font-size: 0.9rem;
}


/* Toast de alerta — idêntico ao .notification-toast (unificado em style3.css) */
/* Mantido aqui apenas para não quebrar referências legadas */
.alert-toast {
  /* delegado ao sistema unificado em style3.css */
}
.alert-toast.fade-out {
  opacity: 0;
  transform: translateX(20px);
}

/* Toast header/body legado */
.toast-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 40px 4px 14px;
}
.toast-header h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--cv-ffffff-a0920, rgba(255,255,255,0.92));
  margin: 0;
  flex: 1;
}
.toast-header .toast-icon { font-size: 15px; color: var(--primary, var(--cvi-f0b90b, #F0B90B)); }
.toast-body { padding: 0 14px 13px; }
.toast-body p     { font-size: 12px; color: var(--cv-ffffff-a0650, rgba(255,255,255,0.65)); margin: 0 0 4px; line-height: 1.4; }
.toast-body small { font-size: 10px; color: var(--cv-a1a1aa-a0450, rgba(161,161,170,0.45)); }

/* Badge pulse */
.notification-badge.pulse {
  animation: nb-pulse 1s ease-in-out;
}

@keyframes nb-pulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.2); }
  100% { transform: scale(1); }
}

@keyframes rt-slideIn {
  from { transform: translateX(calc(360px + 24px)); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}



