/* Toast container: replaces WooCommerce's inline notice banners with
   auto-dismissing toasts, top-center, styled with the theme's design tokens. */
.wm-toast-container {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: min(92vw, 420px);
  pointer-events: none;
}

.wm-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--wm-color-surface);
  border: 1px solid var(--wm-color-border);
  border-radius: var(--wm-radius-md);
  box-shadow: var(--wm-shadow-md);
  font-size: 14px;
  line-height: 1.7;
  color: var(--wm-color-text);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

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

.wm-toast.is-leaving {
  opacity: 0;
  transform: translateY(-12px);
}

.wm-toast--success {
  background: var(--wm-color-success-bg);
  color: var(--wm-color-success-text);
  border-color: rgba(2, 122, 72, 0.22);
}

.wm-toast--error {
  background: var(--wm-color-danger-bg);
  color: var(--wm-color-danger-text);
  border-color: rgba(180, 35, 24, 0.22);
}

.wm-toast--info {
  background: var(--wm-color-soft);
  color: var(--wm-color-text);
}

.wm-toast a {
  color: inherit;
  text-decoration: underline;
}

.wm-toast__close {
  margin-inline-start: auto;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
}

.wm-toast__close:hover {
  opacity: 1;
}

/* Hide the original WooCommerce notice flow — content is moved into toasts. */
.woocommerce-notices-wrapper:empty {
  display: none;
}

/* Desktop account dropdown (notifications). */
.wm-account-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 320px;
  background: var(--wm-color-surface);
  border: 1px solid var(--wm-color-border);
  border-radius: var(--wm-radius-md);
  box-shadow: var(--wm-shadow-md);
  padding: 14px;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.wm-site-header__account-wrap {
  position: relative;
}

.wm-account-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wm-account-dropdown__title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--wm-color-muted);
  margin-bottom: 10px;
}

.wm-notification-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
}

.wm-notification-item {
  padding: 10px 12px;
  border-radius: var(--wm-radius-sm);
  background: var(--wm-color-soft);
  font-size: 13px;
  line-height: 1.7;
}

.wm-notification-item--success { background: var(--wm-color-success-bg); color: var(--wm-color-success-text); }
.wm-notification-item--error { background: var(--wm-color-danger-bg); color: var(--wm-color-danger-text); }

.wm-notification-empty {
  font-size: 13px;
  color: var(--wm-color-muted);
  text-align: center;
  padding: 10px 0;
}

.wm-account-dropdown__link {
  display: block;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--wm-color-accent-dark);
}

/* Mobile account sheet notifications section. */
.wm-mobile-account-sheet__notifications {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--wm-color-border);
}

.wm-mobile-account-sheet__notifications .wm-account-dropdown__title {
  margin-bottom: 8px;
}
