/* Avisos globales — estilo MARK2 */
.app-toast-stack {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: max(0.85rem, env(safe-area-inset-top, 0px)) 0.85rem 1rem;
  pointer-events: none;
}

.app-toast-stack__backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
  pointer-events: auto;
}

.app-toast-stack__list {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(100%, 26rem);
  pointer-events: auto;
}

.app-toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 0.7rem;
  width: 100%;
  padding: 0.85rem 0.9rem 0.85rem 1.05rem;
  overflow: hidden;
  border: 0;
  border-radius: 0.95rem;
  background: #0874e8;
  box-shadow: 0 10px 24px rgba(0, 76, 169, 0.28);
  animation: app-toast-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.app-toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0.28rem;
  background: #ffc400;
}

.app-toast--success {
  background: #0055c9;
}

.app-toast--error {
  background: #073b83;
}

.app-toast--warning {
  background: #0874e8;
}

.app-toast--info {
  background: #0874e8;
}

.app-toast__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  background: #0a0a0a;
  color: #ffc400;
}

.app-toast--error .app-toast__icon {
  color: #fecaca;
}

.app-toast--success .app-toast__icon {
  color: #ffc400;
}

.app-toast__icon svg {
  width: 1.05rem;
  height: 1.05rem;
}

.app-toast > .app-toast__msg {
  grid-column: 1 / -1;
}

.app-toast__body {
  min-width: 0;
}

.app-toast__title {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
}

.app-toast__msg {
  margin: 0.28rem 0 0;
  font-size: 0.7rem;
  line-height: 1.5;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
}

.app-toast__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.7rem;
  height: 1.7rem;
  margin: -0.15rem -0.1rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #ffc400;
  color: #0a0a0a;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.app-toast__close:active {
  opacity: 0.85;
}

.app-toast-stack.is-hiding {
  pointer-events: none;
}

.app-toast-stack.is-hiding .app-toast {
  animation: app-toast-out 0.2s ease-in forwards;
}

@keyframes app-toast-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes app-toast-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-toast {
    animation: none !important;
  }
}
