/* toast-liquid.css (Liquid Glass, sem libs) */

#toast-liquid-stack {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: calc(16px + env(safe-area-inset-right, 0px));
  z-index: 2147483647;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(360px, calc(100vw - 24px));
  pointer-events: none; /* clique passa, mas o toast em si recebe */
}

.tl-toast {
  pointer-events: auto;
  position: relative;
  overflow: hidden;

  padding: 15px 44px 12px 12px;
  border-radius: 16px;

  /* “Liquid Glass” base */
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.20),
    inset 0 1px 0 rgba(255, 255, 255, 0.20);

  /* Animação */
  opacity: 0;
  transform: translate3d(0, -8px, 0) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;

  /* texto */
  color: rgba(255, 255, 255, 0.95);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* se tiver suporte, aplica blur real */
@supports ((-webkit-backdrop-filter: blur(12px)) or (backdrop-filter: blur(12px))) {
  .tl-toast {
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
  }
}

/* brilho “líquido” */
.tl-toast::before {
  content: "";
  position: absolute;
  inset: -40% -30% auto -30%;
  height: 120%;
  background: radial-gradient(
    circle at 20% 20%,
    rgba(255, 255, 255, 0.35),
    rgba(255, 255, 255, 0.06) 45%,
    rgba(255, 255, 255, 0.0) 70%
  );
  transform: rotate(-12deg);
  pointer-events: none;
}

/* faixa de cor por tipo */
.tl-toast::after {
  content: "";
  position: absolute;
  left: 10px;
  top: 10px;
  bottom: 10px;
  width: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.10);
  pointer-events: none;
}

.tl-default::after    { background: rgba(255, 255, 255, 0.9); }
.tl-info::after    { background: rgba(80, 200, 255, 0.90); }
.tl-warning::after { background: rgba(255, 200, 60, 0.95); }
.tl-danger::after  { background: rgba(255, 90, 120, 0.95); }

.tl-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 10px; /* espaço da faixa */
}

.tl-title {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.2px;
  opacity: 0.95;
}

.tl-message {
  font-size: 14px;
  line-height: 1.25;
  opacity: 0.98;
  word-break: break-word;
  text-transform: uppercase;
}

.tl-close {
  position: absolute;
  top: 8px;
  right: 8px;

  width: 30px;
  height: 30px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.20);

  background: rgba(0, 0, 0, 0.18);
  color: rgba(255, 255, 255, 0.92);

  display: inline-flex;
  /* align-items: center; */
  justify-content: center;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tl-close:active {
  transform: scale(0.96);
}

.tl-show {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.tl-hide {
  opacity: 0;
  transform: translate3d(0, -6px, 0) scale(0.98);
}

/* Acessibilidade: reduz movimento */
@media (prefers-reduced-motion: reduce) {
  .tl-toast {
    transition: none;
  }
}
