/* Vitrelum · Alertas flotantes */
.hv-toasts {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  right: 16px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(390px, calc(100vw - 24px));
  pointer-events: none;
}
.hv-toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 14px 17px 15px;
  overflow: hidden;
  border: 1px solid #dfe5ef;
  border-left: 6px solid #1d6b43;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px -16px rgba(9, 33, 67, 0.45), 0 2px 8px rgba(9, 33, 67, 0.08);
  color: #14253a;
  font-family: "DM Sans", Manrope, sans-serif;
  pointer-events: auto;
  animation: hvToastIn 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.hv-toast.is-leaving { animation: hvToastOut 0.24s ease-in both; }
.hv-toast--error { border-left-color: #b93434; }
.hv-toast--info { border-left-color: #1d4577; }
.hv-toast__icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #e6f5ec;
  color: #1d6b43;
}
.hv-toast--error .hv-toast__icon { background: #fdeeee; color: #b93434; }
.hv-toast--info .hv-toast__icon { background: #e8eef8; color: #1d4577; }
.hv-toast__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.hv-toast__title { color: #092143; font: 800 16px/1.3 Manrope, sans-serif; }
.hv-toast__text { color: #3c4a60; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.hv-toast__action {
  align-self: flex-start;
  margin-top: 8px;
  padding: 7px 14px;
  border-radius: 9px;
  background: #ff7a2f;
  color: #fff !important;
  font: 800 13.5px/1.2 Manrope, sans-serif;
  text-decoration: none !important;
  box-shadow: 0 3px 0 #d85d16;
}
.hv-toast__action:hover { background: #ff8c4a; }
.hv-toast__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: -4px -4px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #53627c;
  cursor: pointer;
}
.hv-toast__close:hover { background: #f3f6fb; color: #092143; }
.hv-toast__close:focus-visible,
.hv-toast__action:focus-visible { outline: 3px solid #092143; outline-offset: 2px; }
.hv-toast__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: currentColor;
  color: #1d6b43;
  opacity: 0.35;
  transform-origin: left;
  animation: hvToastBar linear forwards;
}
.hv-toast--error .hv-toast__bar { color: #b93434; }
.hv-toast--info .hv-toast__bar { color: #1d4577; }

/* El enlace "Ver carrito" que WooCommerce pone bajo el botón ya sale en la alerta */
a.added_to_cart.wc-forward { display: none !important; }

@keyframes hvToastIn { from { opacity: 0; transform: translateX(24px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes hvToastOut { to { opacity: 0; transform: translateX(24px); } }
@keyframes hvToastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

@media (max-width: 600px) {
  .hv-toasts { right: 12px; left: 12px; width: auto; }
  @keyframes hvToastIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  .hv-toast, .hv-toast.is-leaving { animation: none; }
  .hv-toast__bar { animation: none; display: none; }
}
