/**
 * Toasts globales — esquina superior derecha.
 * Tipos: .weu-toast--success | --warning | --error
 */

.weu-toast-container {
  position: fixed;
  top: var(--weu-toast-top, 4.5rem);
  right: 1rem;
  left: auto;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  max-width: min(22.5rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.weu-toast {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.625rem;
  width: max-content;
  max-width: 100%;
  padding: 0.8125rem 0.75rem 0.8125rem 0.9375rem;
  border: 1px solid rgba(10, 18, 16, 0.1);
  border-radius: 2px;
  background: #ffffff;
  color: var(--weu-color-dark, #0a1210);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 0.35rem 1.25rem rgba(10, 18, 16, 0.12);
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
  pointer-events: auto;
}

.weu-toast--leaving {
  opacity: 0;
  transform: translateX(0.75rem);
}

.weu-toast__icon.jmgx-heroicon {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.1rem;
  mask-size: 1.125rem;
  -webkit-mask-size: 1.125rem;
  background-color: currentColor;
}

.weu-toast__text {
  flex: 1;
  min-width: 0;
}

.weu-toast__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  margin: -0.2rem -0.15rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  cursor: pointer;
}

.weu-toast__close:hover,
.weu-toast__close:focus-visible {
  opacity: 1;
  outline: none;
  background: rgba(10, 18, 16, 0.06);
}

.weu-toast__close .jmgx-heroicon {
  width: 0.9rem;
  height: 0.9rem;
  mask-size: 0.9rem;
  -webkit-mask-size: 0.9rem;
  background-color: currentColor;
}

.weu-toast--success {
  border-color: rgba(34, 160, 107, 0.35);
  background: #ffffff;
  color: #0f5132;
  box-shadow: 0 0.35rem 1.25rem rgba(10, 18, 16, 0.14), inset 3px 0 0 #22a06b;
}

.weu-toast--success .weu-toast__icon {
  color: #22a06b;
  background-color: #22a06b;
}

.weu-toast--warning {
  border-color: rgba(181, 129, 14, 0.4);
  background: #ffffff;
  color: #7a5a00;
  box-shadow: 0 0.35rem 1.25rem rgba(10, 18, 16, 0.14), inset 3px 0 0 #c79100;
}

.weu-toast--warning .weu-toast__icon {
  color: #c79100;
  background-color: #c79100;
}

.weu-toast--error {
  border-color: rgba(205, 10, 10, 0.35);
  background: #ffffff;
  color: #8a0d0d;
  box-shadow: 0 0.35rem 1.25rem rgba(10, 18, 16, 0.14), inset 3px 0 0 var(--weu-color-error, #cd0a0a);
}

.weu-toast--error .weu-toast__icon {
  color: var(--weu-color-error, #cd0a0a);
  background-color: var(--weu-color-error, #cd0a0a);
}

#notifications.weu-notifications--toasted,
#notifications[hidden] {
  display: none !important;
}

.weu-cart-toast-container,
.weu-stock-toast-container {
  display: none !important;
}

@media (max-width: 575.98px) {
  .weu-toast-container {
    right: 0.75rem;
    left: 0.75rem;
    max-width: none;
    align-items: stretch;
  }

  .weu-toast {
    width: 100%;
  }
}
