/* Top confirmation toast (publish / update) */
.hh-top-toast-host {
  position: fixed;
  top: calc(var(--header-h, 64px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: min(420px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.hh-top-toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.95rem 1rem 1.05rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #e7e5e4;
  box-shadow:
    0 1px 2px rgba(28, 25, 23, 0.04),
    0 18px 40px -16px rgba(28, 25, 23, 0.28);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-14px) scale(0.98);
  transition: opacity 0.32s ease, transform 0.32s ease;
  overflow: hidden;
}

.hh-top-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hh-top-toast.is-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.hh-top-toast__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #fff7ed, #ffedd5);
  color: #c2410c;
  box-shadow: inset 0 0 0 1px rgba(234, 88, 12, 0.12);
}

.hh-top-toast__icon svg {
  width: 22px;
  height: 22px;
}

.hh-top-toast__body {
  flex: 1;
  min-width: 0;
  padding-top: 0.1rem;
}

.hh-top-toast__headline {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #1c1917;
  line-height: 1.3;
}

.hh-top-toast__detail {
  margin: 0.2rem 0 0;
  font-size: 0.86rem;
  color: #57534e;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hh-top-toast__close {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin: -0.2rem -0.2rem 0 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #a8a29e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hh-top-toast__close:hover,
.hh-top-toast__close:focus-visible {
  background: #f5f5f4;
  color: #44403c;
  outline: none;
}

.hh-top-toast__close svg {
  width: 16px;
  height: 16px;
}

.hh-top-toast__progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #ea580c, #fb923c);
  animation: hh-top-toast-progress 4.2s linear forwards;
}

.hh-top-toast.is-paused .hh-top-toast__progress {
  animation-play-state: paused;
}

.hh-top-toast.is-leaving .hh-top-toast__progress {
  animation: none;
  opacity: 0;
}

@keyframes hh-top-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 640px) {
  .hh-top-toast-host {
    top: calc(var(--header-h, 56px) + 10px);
  }

  .hh-top-toast {
    border-radius: 14px;
    padding: 0.85rem 0.9rem 0.95rem;
  }
}
