/* ═════════════════════════════════════════════════════════════════════════════ */
/*                    NOTIFICATION SYSTEM — STYLES                              */
/*      Toast, Badges, Progress bars, Alerts, Loading spinners                  */
/* ═════════════════════════════════════════════════════════════════════════════ */

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          TOAST CONTAINER & BASE                              */
/* ═════════════════════════════════════════════════════════════════════════════ */

.toast-container {
  position: fixed;
  z-index: 2000;
  pointer-events: none;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.toast-container.toast-top-right {
  top: 20px;
  right: 20px;
}

.toast-container.toast-top-left {
  top: 20px;
  left: 20px;
}

.toast-container.toast-bottom-right {
  bottom: 20px;
  right: 20px;
}

.toast-container.toast-bottom-left {
  bottom: 20px;
  left: 20px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  border-radius: 6px;
  background: white;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  pointer-events: all;
  min-width: 300px;
  max-width: 400px;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
  animation: none;
}

.toast-icon {
  font-size: 1.5rem;
  min-width: 24px;
  text-align: center;
}

.toast-message {
  flex: 1;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  border-radius: 12px;
  color: #9ca3af;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  transition: color 0.2s ease;
  font-family: Verdana, sans-serif;
}

.toast-close:hover {
  color: #1f2937;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          TOAST VARIANTS                                      */
/* ═════════════════════════════════════════════════════════════════════════════ */

.toast-success {
  background: #ecfdf5;
  border-color: #86efac;
  color: #15803d;
}

.toast-success .toast-icon {
  color: #22c55e;
}

.toast-warning {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

.toast-warning .toast-icon {
  color: #f59e0b;
}

.toast-danger {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}

.toast-danger .toast-icon {
  color: #ef4444;
}

.toast-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

.toast-info .toast-icon {
  color: #3b82f6;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          BADGES                                              */
/* ═════════════════════════════════════════════════════════════════════════════ */

.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.badge-primary {
  background: #dbeafe;
  color: #1e40af;
}

.badge-success {
  background: #dcfce7;
  color: #15803d;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
}

.badge-info {
  background: #e0e7ff;
  color: #3730a3;
}

.badge-animated {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          PROGRESS BAR                                        */
/* ═════════════════════════════════════════════════════════════════════════════ */

.progress {
  width: 100%;
  height: 8px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.progress-sm {
  height: 4px;
}

.progress-lg {
  height: 16px;
}

.progress-bar {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: white;
  transition: width 0.3s ease;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.progress-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.progress-success {
  background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}

.progress-warning {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.progress-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.progress-info {
  background: linear-gradient(135deg, #06b6d4 0%, #0369a1 100%);
}

.progress-animated {
  background-size: 200% 100%;
  animation: progressShimmer 2s infinite;
}

.progress-striped {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
}

@keyframes progressShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ALERT                                               */
/* ═════════════════════════════════════════════════════════════════════════════ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border-left: 4px solid;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
  margin-bottom: 1rem;
}

.alert-icon {
  font-size: 1.5rem;
  min-width: 24px;
  flex-shrink: 0;
}

.alert-content {
  flex: 1;
}

.alert-title {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.alert-message {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.alert-close {
  background: none;
  border: none;
  border-radius: 12px;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  margin-left: auto;
  flex-shrink: 0;
  transition: opacity 0.2s ease;
  font-family: Verdana, sans-serif;
  opacity: 0.7;
}

.alert-close:hover {
  opacity: 1;
}

/* Alert variants */
.alert-success {
  background: #ecfdf5;
  border-left-color: #22c55e;
  color: #15803d;
}

.alert-success .alert-icon {
  color: #22c55e;
}

.alert-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.alert-warning .alert-icon {
  color: #f59e0b;
}

.alert-danger {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #991b1b;
}

.alert-danger .alert-icon {
  color: #ef4444;
}

.alert-info {
  background: #eff6ff;
  border-left-color: #3b82f6;
  color: #1e40af;
}

.alert-info .alert-icon {
  color: #3b82f6;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          LOADING SPINNER                                     */
/* ═════════════════════════════════════════════════════════════════════════════ */

.spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.spinner-ring {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top-color: #3caa6e;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-sm .spinner-ring {
  width: 24px;
  height: 24px;
  border-width: 2px;
}

.spinner-lg .spinner-ring {
  width: 56px;
  height: 56px;
  border-width: 6px;
}

.spinner-text {
  margin: 0;
  color: #6b7280;
  font-size: 0.95rem;
  font-family: Verdana, sans-serif;
  letter-spacing: 1pt;
}

.spinner-primary .spinner-ring {
  border-top-color: #3b82f6;
}

.spinner-success .spinner-ring {
  border-top-color: #22c55e;
}

.spinner-warning .spinner-ring {
  border-top-color: #f59e0b;
}

.spinner-danger .spinner-ring {
  border-top-color: #ef4444;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          DARK MODE                                           */
/* ═════════════════════════════════════════════════════════════════════════════ */

:root[data-theme="dark"] .toast {
  background: #1a2548;
  border-color: rgba(148, 163, 184, 0.1);
}

:root[data-theme="dark"] .toast-message {
  color: #a0aec0;
}

:root[data-theme="dark"] .toast-close {
  color: #64748b;
}

:root[data-theme="dark"] .toast-close:hover {
  color: #e8ecf1;
}

:root[data-theme="dark"] .toast-success {
  background: #0f2f1f;
  border-color: rgba(34, 197, 94, 0.2);
  color: #86efac;
}

:root[data-theme="dark"] .toast-warning {
  background: #2f2415;
  border-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

:root[data-theme="dark"] .toast-danger {
  background: #2f0f0f;
  border-color: rgba(239, 68, 68, 0.2);
  color: #f87171;
}

:root[data-theme="dark"] .badge-primary {
  background: #1e3a8a;
  color: #93c5fd;
}

:root[data-theme="dark"] .badge-success {
  background: #064e3b;
  color: #86efac;
}

:root[data-theme="dark"] .badge-warning {
  background: #542c06;
  color: #fcd34d;
}

:root[data-theme="dark"] .badge-danger {
  background: #5f1215;
  color: #f87171;
}

:root[data-theme="dark"] .progress {
  background: #0f1729;
}

:root[data-theme="dark"] .alert {
  background: #0f1729;
  color: #a0aec0;
}

:root[data-theme="dark"] .alert-success {
  background: #0f2f1f;
  border-left-color: #34d399;
  color: #a7f3d0;
}

:root[data-theme="dark"] .alert-warning {
  background: #2f2415;
  border-left-color: #fbbf24;
  color: #fcd34d;
}

:root[data-theme="dark"] .alert-danger {
  background: #2f0f0f;
  border-left-color: #f87171;
  color: #fecaca;
}

:root[data-theme="dark"] .alert-close {
  color: #9ca3af;
}

:root[data-theme="dark"] .spinner-text {
  color: #a0aec0;
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          RESPONSIVE                                          */
/* ═════════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .toast {
    min-width: 280px;
    max-width: 90vw;
    margin-bottom: 0.5rem;
  }

  .alert {
    flex-direction: column;
  }

  .alert-close {
    margin-left: 0;
    align-self: flex-start;
  }
}

/* ═════════════════════════════════════════════════════════════════════════════ */
/*                          ACESSIBILIDADE                                      */
/* ═════════════════════════════════════════════════════════════════════════════ */

.toast-close:focus,
.alert-close:focus {
  outline: 2px solid #3caa6e;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .progress-animated {
    animation: none;
  }

  .progress-bar {
    transition: none;
  }
}
