/*!
 * Toastify js 1.12.0
 * https://github.com/apvarun/toastify-js
 * @license MIT licensed
 *
 * Copyright (C) 2018 Varun A P
 *
 * ─── Game Notification Skin ──────────────────────────────────────────────────
 *   Mantém o DNA arcade dos botões mas com identidade própria de notificação:
 *   • Pill arredondado (20px) — mais suave que botões (12px)
 *   • Borda fina (2px) + glow colorido externo — "flutuante", não pressionado
 *   • Barra de acento interna à esquerda via inset box-shadow
 *   • Barra de progresso animada no rodapé
 *   • Entrada com tilt+spring bounce; saída slide direcional via :not(.on)
 *   • Error shake automático; shimmer empilhado após entrada
 * ─────────────────────────────────────────────────────────────────────────────
 */

/* ── Keyframes ──────────────────────────────────────────────────────────────── */

@keyframes toast-slide-in-right {
  0%   { transform: translateX(115%) rotate(5deg)   scale(0.85); opacity: 0; }
  55%  { transform: translateX(-14px) rotate(-1.5deg) scale(1.03); opacity: 1; }
  75%  { transform: translateX(7px)  rotate(0.5deg)  scale(1);    opacity: 1; }
  100% { transform: translateX(0)   rotate(0deg)    scale(1);    opacity: 1; }
}

@keyframes toast-slide-in-left {
  0%   { transform: translateX(-115%) rotate(-5deg)  scale(0.85); opacity: 0; }
  55%  { transform: translateX(14px)  rotate(1.5deg) scale(1.03); opacity: 1; }
  75%  { transform: translateX(-7px)  rotate(-0.5deg) scale(1);   opacity: 1; }
  100% { transform: translateX(0)    rotate(0deg)   scale(1);    opacity: 1; }
}

@keyframes toast-pop-in {
  0%   { transform: scale(0.45) translateY(-35px) rotate(-4deg); opacity: 0; }
  60%  { transform: scale(1.07) translateY(7px)   rotate(1.5deg); opacity: 1; }
  80%  { transform: scale(0.96) translateY(-3px)  rotate(0deg);  opacity: 1; }
  100% { transform: scale(1)    translateY(0)     rotate(0deg);  opacity: 1; }
}

@keyframes toast-shake {
  0%, 100% { transform: translateX(0) rotate(0deg); }
  18%       { transform: translateX(-9px) rotate(-2.5deg); }
  36%       { transform: translateX(8px)  rotate(2deg); }
  54%       { transform: translateX(-5px) rotate(-1deg); }
  72%       { transform: translateX(3px)  rotate(0.5deg); }
}

@keyframes toast-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

@keyframes toast-progress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* ── Base ────────────────────────────────────────────────────────────────────── */

.toastify {
  /* layout */
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px 16px 18px;    /* padding-bottom absorve sombra inferior */
  position: fixed;
  z-index: 2147483647;
  cursor: pointer;
  text-decoration: none;
  max-width: calc(50% - 20px);
  min-width: 240px;

  /* tipografia */
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.025em;

  /* paleta padrão — info (azul) */
  --t-light:  #7db4ff;
  --t-mid:    #4d87f5;
  --t-dark:   #2a5fd6;
  --t-border: #1a3ea8;
  --t-bottom: #0f2872;
  --t-shadow: #0a1d55;
  --t-text:   #ffffff;
  --t-glow:   rgba(77, 135, 245, 0.45);
  --t-accent: rgba(255, 255, 255, 0.6);

  color: var(--t-text);
  text-shadow:
     1px  1px 0 var(--t-shadow),
    -1px -1px 0 var(--t-shadow);

  /* gradiente diagonal — mais dinâmico que o gradiente vertical dos botões */
  background: linear-gradient(
    155deg,
    var(--t-light) 0%,
    var(--t-mid)   45%,
    var(--t-dark)  100%
  );

  /* pill — mais arredondado que botões */
  border: 2px solid var(--t-border);
  border-radius: 20px;

  /* floating look: acento esquerdo + profundidade menor + glow colorido */
  box-shadow:
    inset 4px 0 0 var(--t-accent),
    0 4px 0 var(--t-bottom),
    0 6px 24px var(--t-glow),
    0 12px 32px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);

  /* transição para a saída direcional */
  opacity: 0;
  transition:
    transform  0.32s cubic-bezier(0.55, 0, 0.7, 1),
    opacity    0.32s ease,
    box-shadow 0.15s ease;
}

/* ── Barra de progresso ──────────────────────────────────────────────────────── */

.toastify::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 18px;
  right: 18px;
  height: 3px;
  background: rgba(255, 255, 255, 0.4);
  border-radius: 2px;
  transform-origin: left center;
  animation: toast-progress var(--t-duration, 3s) linear 0.5s forwards;
}

/* ── Visível ─────────────────────────────────────────────────────────────────── */

.toastify.on {
  opacity: 1;
}

/* ── Saída direcional — estado final da transição quando .on é removido ─────── */

.toastify-right:not(.on)  { transform: translateX(110%); }
.toastify-left:not(.on)   { transform: translateX(-110%); }
.toastify-center:not(.on) { transform: scale(0.82) translateY(-12px); }

/* ── Hover — levanta, intensifica glow ───────────────────────────────────────── */

.toastify:hover {
  transform: translateY(-3px);
  box-shadow:
    inset 4px 0 0 var(--t-accent),
    0 7px 0 var(--t-bottom),
    0 10px 32px var(--t-glow),
    0 16px 40px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ── Active — leve press (menos profundo que botões) ─────────────────────────── */

.toastify:active {
  transform: translateY(2px);
  box-shadow:
    inset 4px 0 0 var(--t-accent),
    0 2px 0 var(--t-bottom),
    0 4px 12px var(--t-glow),
    0 4px 8px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ── Botão fechar ────────────────────────────────────────────────────────────── */

.toast-close {
  background: transparent;
  border: 0;
  color: var(--t-text);
  cursor: pointer;
  font-family: inherit;
  font-size: 1.1em;
  font-weight: 900;
  opacity: 0.45;
  padding: 0 0 0 8px;
  margin-left: auto;
  line-height: 1;
  transition: opacity 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.toast-close:hover {
  opacity: 1;
  transform: scale(1.2) rotate(15deg);
}

/* ── Posicionamento ──────────────────────────────────────────────────────────── */

.toastify-right  { right: 20px; }
.toastify-left   { left:  20px; }
.toastify-top    { top:    -200px; }
.toastify-bottom { bottom: -200px; }

.toastify-center {
  margin-left: auto;
  margin-right: auto;
  left: 0;
  right: 0;
  max-width: fit-content;
  max-width: -moz-fit-content;
}

/* ── Avatar / ícone inline ───────────────────────────────────────────────────── */

.toastify-avatar {
  width: 1.6em;
  height: 1.6em;
  margin: 0;
  border-radius: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  flex-shrink: 0;
}

.toastify-rounded {
  border-radius: 999px;
}

/* ── Animações de entrada ────────────────────────────────────────────────────── */

.toastify-right.on  { animation: toast-slide-in-right 0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.toastify-left.on   { animation: toast-slide-in-left  0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.toastify-center.on { animation: toast-pop-in         0.48s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }

/* Shimmer: empilhado com entrada (inicia após entrada terminar) */
.toastify-shimmer.toastify-right.on  { animation: toast-slide-in-right 0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shimmer 2.5s linear 0.55s infinite; }
.toastify-shimmer.toastify-left.on   { animation: toast-slide-in-left  0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shimmer 2.5s linear 0.55s infinite; }
.toastify-shimmer.toastify-center.on { animation: toast-pop-in         0.48s cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shimmer 2.5s linear 0.53s infinite; }

/* Error: shake automático após entrar */
.toastify-error.toastify-right.on  { animation: toast-slide-in-right 0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shake 0.5s ease 0.55s both; }
.toastify-error.toastify-left.on   { animation: toast-slide-in-left  0.5s  cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shake 0.5s ease 0.55s both; }
.toastify-error.toastify-center.on { animation: toast-pop-in         0.48s cubic-bezier(0.175, 0.885, 0.32, 1.275) both, toast-shake 0.5s ease 0.53s both; }

/* ── Variante: Success ── verde ─────────────────────────────────────────────── */

.toastify-success {
  --t-light:  #5de87a;
  --t-mid:    #22c55e;
  --t-dark:   #15803d;
  --t-border: #166534;
  --t-bottom: #0c4020;
  --t-shadow: #052012;
  --t-text:   #f0fff4;
  --t-glow:   rgba(34, 197, 94, 0.42);
  --t-accent: rgba(255, 255, 255, 0.65);
}

/* ── Variante: Warning ── âmbar ─────────────────────────────────────────────── */

.toastify-warning {
  --t-light:  #fde68a;
  --t-mid:    #f59e0b;
  --t-dark:   #b45309;
  --t-border: #92400e;
  --t-bottom: #5a2800;
  --t-shadow: #3b1800;
  --t-text:   #fffbeb;
  --t-glow:   rgba(245, 158, 11, 0.45);
  --t-accent: rgba(255, 255, 255, 0.5);
}

/* ── Variante: Error ── vermelho ────────────────────────────────────────────── */

.toastify-error {
  --t-light:  #fca5a5;
  --t-mid:    #ef4444;
  --t-dark:   #b91c1c;
  --t-border: #991b1b;
  --t-bottom: #5f0f0f;
  --t-shadow: #3b0000;
  --t-text:   #fff1f1;
  --t-glow:   rgba(239, 68, 68, 0.5);
  --t-accent: rgba(255, 210, 210, 0.65);
}

/* ── Variante: Info ── azul (mesma que padrão) ──────────────────────────────── */

.toastify-info {
  --t-light:  #7db4ff;
  --t-mid:    #4d87f5;
  --t-dark:   #2a5fd6;
  --t-border: #1a3ea8;
  --t-bottom: #0f2872;
  --t-shadow: #0a1d55;
  --t-text:   #f0f6ff;
  --t-glow:   rgba(77, 135, 245, 0.45);
  --t-accent: rgba(255, 255, 255, 0.55);
}

/* ── Variante: Neutral ── tema escuro do projeto ────────────────────────────── */

.toastify-neutral {
  --t-light:  #2d5a40;
  --t-mid:    #1a3d28;
  --t-dark:   #003c1b;
  --t-border: #002410;
  --t-bottom: #00120a;
  --t-shadow: #000805;
  --t-text:   #d4f0e0;
  --t-glow:   rgba(26, 61, 40, 0.6);
  --t-accent: rgba(212, 240, 224, 0.4);
}

/* ── Shimmer base — só gradient; animation aplicada nos compostos acima ──────── */

.toastify-shimmer {
  background: linear-gradient(
    105deg,
    var(--t-dark)  0%,
    var(--t-mid)   30%,
    var(--t-light) 50%,
    var(--t-mid)   70%,
    var(--t-dark)  100%
  );
  background-size: 200% auto;
}

/* ── Mobile ─────────────────────────────────────────────────────────────────── */

@media only screen and (max-width: 480px) {
  .toastify {
    max-width: calc(100% - 32px);
    min-width: unset;
    font-size: 0.95rem;
    padding: 11px 16px 14px 14px;
  }

  .toastify-right,
  .toastify-left {
    margin-left: auto;
    margin-right: auto;
    left: 16px;
    right: 16px;
    max-width: calc(100% - 32px);
  }
}
