/* ============================================================
   Toast Notifications
   ============================================================ */

#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  max-width: min(380px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 10px;
  background: #1e1e2e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35), 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: auto;
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.25s ease;
}

.toast--visible {
  transform: translateX(0);
  opacity: 1;
}

.toast--hiding {
  transform: translateX(calc(100% + 2rem));
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.toast__icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.toast__icon svg {
  width: 100%;
  height: 100%;
}

.toast__msg {
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 450;
}

.toast__close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
  margin-top: 1px;
}

.toast__close:hover {
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.08);
}

.toast__close svg {
  width: 14px;
  height: 14px;
}

/* Variantes */
.toast--success {
  border-color: rgba(34, 197, 94, 0.35);
  background: #0f1e17;
}
.toast--success .toast__icon { color: #22c55e; }

.toast--error {
  border-color: rgba(239, 68, 68, 0.35);
  background: #1e0f0f;
}
.toast--error .toast__icon { color: #ef4444; }

.toast--warning {
  border-color: rgba(234, 179, 8, 0.35);
  background: #1e1a0a;
}
.toast--warning .toast__icon { color: #eab308; }

.toast--info {
  border-color: rgba(59, 130, 246, 0.35);
  background: #0c1120;
}
.toast--info .toast__icon { color: #3b82f6; }

/* ============================================================
   Confirm Modal
   ============================================================ */

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  transition: background 0.2s ease, backdrop-filter 0.2s ease;
}

.confirm-overlay--visible {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.confirm-overlay--visible .confirm-modal {
  transform: scale(1);
  opacity: 1;
}

.confirm-modal {
  background: var(--color-bg-card, #1e1e2e);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.5rem;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.2s ease;
}

.confirm-modal__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
}

.confirm-modal__icon svg {
  width: 26px;
  height: 26px;
}

.confirm-modal__icon--warning {
  background: rgba(234, 179, 8, 0.12);
  color: #eab308;
  border: 1.5px solid rgba(234, 179, 8, 0.3);
}

.confirm-modal__icon--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1.5px solid rgba(239, 68, 68, 0.3);
}

.confirm-modal__icon--info {
  background: rgba(59, 130, 246, 0.12);
  color: #3b82f6;
  border: 1.5px solid rgba(59, 130, 246, 0.3);
}

.confirm-modal__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  margin: 0 0 0.625rem;
  line-height: 1.3;
}

.confirm-modal__msg {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  margin: 0 0 1.75rem;
}

.confirm-modal__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.confirm-modal__actions .btn {
  min-width: 110px;
  padding: 0.625rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
}

.confirm-modal__actions .btn:active {
  transform: scale(0.97);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.9);
}

.btn-danger {
  background: #ef4444;
  color: #fff;
}

.btn-danger:hover {
  background: #dc2626;
}

/* Mobile */
@media (max-width: 480px) {
  #toast-container {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: 100%;
  }

  .toast {
    transform: translateY(calc(100% + 2rem));
  }

  .toast--visible {
    transform: translateY(0);
  }

  .toast--hiding {
    transform: translateY(calc(100% + 2rem));
  }

  .confirm-modal__actions {
    flex-direction: column;
  }

  .confirm-modal__actions .btn {
    width: 100%;
  }
}
