/**
 * Semantyq Notification System - Styles
 * Sistema de notificações com suporte a temas
 */

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.notify-toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notify-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 420px;
  padding: 16px 20px;
  border-radius: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
  backdrop-filter: blur(8px);
}

.notify-toast.notify-show {
  opacity: 1;
  transform: translateX(0);
}

.notify-toast-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.notify-toast-message {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
  font-weight: 500;
}

.notify-toast-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.notify-toast-close:hover {
  background: var(--background);
  color: var(--text-secondary);
}

.notify-toast-close:active {
  transform: scale(0.95);
}

/* Toast Types */
.notify-toast.notify-success {
  border-color: var(--success);
  background: linear-gradient(135deg, var(--success-alpha) 0%, var(--card-bg) 100%);
}

.notify-toast.notify-success .notify-toast-icon {
  color: var(--success);
}

.notify-toast.notify-error {
  border-color: var(--error);
  background: linear-gradient(135deg, var(--error-alpha) 0%, var(--card-bg) 100%);
}

.notify-toast.notify-error .notify-toast-icon {
  color: var(--error);
}

.notify-toast.notify-warning {
  border-color: var(--warning);
  background: linear-gradient(135deg, var(--warning-alpha) 0%, var(--card-bg) 100%);
}

.notify-toast.notify-warning .notify-toast-icon {
  color: var(--warning);
}

.notify-toast.notify-info {
  border-color: var(--info);
  background: linear-gradient(135deg, var(--info-alpha) 0%, var(--card-bg) 100%);
}

.notify-toast.notify-info .notify-toast-icon {
  color: var(--info);
}

/* ============================================
   MODAL NOTIFICATIONS
   ============================================ */

.notify-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.notify-modal.notify-show {
  opacity: 1;
}

.notify-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.notify-modal-content {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
  max-width: 480px;
  width: 90%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.notify-modal-content.notify-show {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.notify-modal-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  position: relative;
}

.notify-modal-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  opacity: 0.1;
}

.notify-modal-icon svg {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 1;
}

.notify-modal-icon.notify-success {
  color: var(--success);
}

.notify-modal-icon.notify-success::before {
  background: var(--success);
}

.notify-modal-icon.notify-error {
  color: var(--error);
}

.notify-modal-icon.notify-error::before {
  background: var(--error);
}

.notify-modal-icon.notify-warning {
  color: var(--warning);
}

.notify-modal-icon.notify-warning::before {
  background: var(--warning);
}

.notify-modal-icon.notify-info {
  color: var(--info);
}

.notify-modal-icon.notify-info::before {
  background: var(--info);
}

.notify-modal-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.notify-modal-message {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 32px;
}

.notify-modal-buttons {
  display: flex;
  gap: 28px;
  justify-content: center;
}

.notify-modal-buttons .btn {
  min-width: 120px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ============================================
   VARIÁVEIS DE CORES (garantir que existam)
   ============================================ */

:root {
  --success: #22c55e;
  --success-alpha: rgba(34, 197, 94, 0.1);
  --error: #ef4444;
  --error-alpha: rgba(239, 68, 68, 0.1);
  --warning: #f59e0b;
  --warning-alpha: rgba(245, 158, 11, 0.1);
  --info: #3b82f6;
  --info-alpha: rgba(59, 130, 246, 0.1);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 640px) {
  .notify-toast-container {
    right: 16px;
    left: 16px;
  }
  
  .notify-toast {
    min-width: auto;
    width: 100%;
  }
  
  .notify-modal-content {
    padding: 32px 24px;
  }
  
  .notify-modal-buttons {
    flex-direction: column;
  }
  
  .notify-modal-buttons .btn {
    width: 100%;
  }
}

/* ============================================
   ANIMAÇÕES ADICIONAIS
   ============================================ */

@keyframes notify-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.notify-modal-icon {
  animation: notify-pulse 0.6s ease-out;
}

/* ============================================
   LOADING MODAL (SWEETALERT FALLBACK)
   ============================================ */

.notify-loading {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1400;
}

.notify-loading.notify-show {
  display: flex;
}

.notify-loading__overlay {
  position: absolute;
  inset: 0;
  background: rgba(10, 12, 22, 0.75);
  backdrop-filter: blur(2px);
}

.notify-loading__panel {
  position: relative;
  z-index: 1;
  width: min(560px, 92vw);
  padding: 24px;
  border-radius: 18px;
  background: var(--card-bg, #ffffff);
  border: 1px solid var(--border, #d7d9e0);
  text-align: center;
  display: grid;
  gap: 10px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  color: var(--text-primary, #111827);
}

.notify-loading__spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(148, 163, 184, 0.35);
  border-top-color: var(--primary, #0f766e);
  margin: 0 auto;
  animation: notify-spin 0.9s linear infinite;
}

.notify-loading__title {
  font-size: 18px;
  font-weight: 700;
}

.notify-loading__text {
  font-size: 14px;
  color: var(--text-muted, #64748b);
}

@keyframes notify-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   DARK MODE ADJUSTMENTS
   ============================================ */

body.theme-dark .notify-toast,
[data-theme="dark"] .notify-toast {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 2px 8px rgba(0, 0, 0, 0.3);
}

body.theme-dark .notify-modal-content,
[data-theme="dark"] .notify-modal-content {
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

body.theme-dark .notify-modal-overlay,
[data-theme="dark"] .notify-modal-overlay {
  background: rgba(0, 0, 0, 0.75);
}

body.theme-dark .notify-loading__overlay,
html.theme-dark body .notify-loading__overlay,
[data-theme="dark"] .notify-loading__overlay {
  background: rgba(2, 6, 23, 0.58);
}

body.theme-dark .notify-loading__panel,
html.theme-dark body .notify-loading__panel,
[data-theme="dark"] .notify-loading__panel {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96) 0%, rgba(17, 24, 39, 0.96) 100%);
  border-color: rgba(71, 85, 105, 0.55);
  color: #e2e8f0;
}

body.theme-dark .notify-loading__title,
html.theme-dark body .notify-loading__title,
[data-theme="dark"] .notify-loading__title {
  color: #e2e8f0;
}

body.theme-dark .notify-loading__text,
html.theme-dark body .notify-loading__text,
[data-theme="dark"] .notify-loading__text {
  color: #94a3b8;
}

body.theme-dark .notify-loading__spinner,
html.theme-dark body .notify-loading__spinner,
[data-theme="dark"] .notify-loading__spinner {
  border-color: #334155;
  border-top-color: #22d3ee;
}

body.theme-light .notify-loading__overlay,
html.theme-light body .notify-loading__overlay,
[data-theme="light"] .notify-loading__overlay {
  background: rgba(15, 23, 42, 0.35);
}

body.theme-light .notify-loading__panel,
html.theme-light body .notify-loading__panel,
[data-theme="light"] .notify-loading__panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 250, 252, 0.97) 100%);
  border-color: #dbe4ee;
  color: #0f172a;
}

body.theme-light .notify-loading__text,
html.theme-light body .notify-loading__text,
[data-theme="light"] .notify-loading__text {
  color: #475569;
}
