/* HomeVilla toast notifications (shared across the site). */
.hv-toast-stack {
  position: fixed;
  right: 24px;
  top: 16px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  width: 380px;
  max-width: calc(100vw - 32px);
  pointer-events: none;
  transition: top .2s ease;
}

.hv-toast {
  --hv-toast-accent: #D87A61;
  --hv-toast-tint: rgba(216, 122, 97, .12);
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px 44px 18px 16px;
  background: #fff;
  color: #283148;
  border-radius: 14px;
  border: 1px solid rgba(40, 49, 72, .08);
  box-shadow: 0 18px 40px -12px rgba(40, 49, 72, .28), 0 4px 12px rgba(40, 49, 72, .08);
  font-family: 'DM Sans', 'Open Sans', system-ui, sans-serif;
  overflow: hidden;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(calc(100% + 32px)) scale(.96);
  transition: transform .45s cubic-bezier(.16, 1, .3, 1), opacity .3s ease;
}
.hv-toast.is-visible { opacity: 1; transform: translateX(0) scale(1); }
.hv-toast.is-leaving {
  opacity: 0;
  transform: translateX(calc(100% + 32px)) scale(.96);
  transition: transform .3s ease-in, opacity .25s ease-in;
}

.hv-toast--success { --hv-toast-accent: #2F9E6E; --hv-toast-tint: rgba(47, 158, 110, .12); }
.hv-toast--info    { --hv-toast-accent: #D87A61; --hv-toast-tint: rgba(216, 122, 97, .12); }
.hv-toast--warning { --hv-toast-accent: #E0A030; --hv-toast-tint: rgba(224, 160, 48, .14); }
.hv-toast--error   { --hv-toast-accent: #D64545; --hv-toast-tint: rgba(214, 69, 69, .12); }

.hv-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--hv-toast-accent);
}

.hv-toast__icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--hv-toast-tint);
  color: var(--hv-toast-accent);
  font-size: 16px;
}
.hv-toast.is-visible .hv-toast__icon { animation: hv-toast-pop .5s cubic-bezier(.34, 1.56, .64, 1) .1s both; }

.hv-toast__body { flex: 1 1 auto; min-width: 0; padding-top: 1px; }
.hv-toast__title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.3; color: #283148; }
.hv-toast__message { margin: 3px 0 0; font-size: 14px; line-height: 1.45; color: #5B6275; overflow-wrap: anywhere; }

.hv-toast__close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #8A90A0;
  font-size: 14px;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.hv-toast__close:hover { background: rgba(40, 49, 72, .07); color: #283148; }
.hv-toast__close:focus-visible { outline: 2px solid var(--hv-toast-accent); outline-offset: 1px; }

.hv-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: var(--hv-toast-accent);
  opacity: .35;
  transform-origin: left center;
  animation: hv-toast-progress linear forwards;
}
.hv-toast:hover .hv-toast__progress { animation-play-state: paused; }

@keyframes hv-toast-progress { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes hv-toast-pop { 0% { transform: scale(.4); } 100% { transform: scale(1); } }

@media (max-width: 640px) {
  .hv-toast-stack { right: 16px; left: 16px; width: auto; max-width: none; }
  .hv-toast { padding: 14px 40px 16px 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .hv-toast, .hv-toast.is-leaving { transition: opacity .2s ease; transform: none; }
  .hv-toast.is-visible .hv-toast__icon { animation: none; }
}
