/* =========================================
   ALERTS / FLASH MESSAGES
========================================= */

.alert {
  width: 100%;

  margin: 0 0 20px;

  padding: 14px 16px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border-radius: 14px;

  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;

  border: 1px solid transparent;
}

.alert span,
.alert p {
  margin: 0;
}

.alert-error,
.alert-danger {
  color: #991b1b;
  background: #fee2e2;
  border-color: #fecaca;
}

.alert-success {
  color: #166534;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.alert-warning {
  color: #92400e;
  background: #fef3c7;
  border-color: #fde68a;
}

.alert-info {
  color: #075985;
  background: #e0f2fe;
  border-color: #bae6fd;
}

/* =========================================
   ALERTS - DARK THEME
========================================= */

[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

[data-theme="dark"] .alert-success {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .alert-warning {
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
}

[data-theme="dark"] .alert-info {
  color: #7dd3fc;
  background: rgba(14, 165, 233, 0.14);
  border-color: rgba(14, 165, 233, 0.35);
}

/* =========================================
   TOASTIFY RESET
========================================= */

.toastify {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* =========================================
   APP TOAST
========================================= */

.app-toast {
  width: auto !important;
  max-width: min(420px, calc(100vw - 32px)) !important;

  border-radius: 18px !important;
  padding: 16px 18px !important;

  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 14px !important;

  background: var(--color-surface) !important;
  color: var(--color-text) !important;

  border: 1px solid var(--color-border-light) !important;

  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.18) !important;

  font-weight: 800 !important;
  line-height: 1.35 !important;
}

.app-toast-success {
  border-left: 4px solid var(--color-primary) !important;
}

.app-toast-error {
  border-left: 4px solid #ef4444 !important;
}

/* Botão X do toast */

.toast-close {
  margin-left: auto !important;

  flex: 0 0 auto !important;

  display: grid !important;
  place-items: center !important;

  width: 22px !important;
  height: 22px !important;

  opacity: 0.7 !important;
  color: inherit !important;

  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.toast-close:hover {
  opacity: 1 !important;
}

/* =========================================
   APP TOAST - MOBILE
========================================= */

@media (max-width: 520px) {
  .toastify {
    left: 16px !important;
    right: 16px !important;
    max-width: none !important;
  }

  .app-toast {
    width: 100% !important;
    max-width: none !important;

    padding: 16px 18px !important;

    font-size: 0.95rem !important;
  }
}