/* Fixed, dismissible WooCommerce toast notifications. */
.noora-toast-region {
  position: fixed;
  z-index: 100000;
  top: max(20px, env(safe-area-inset-top));
  right: max(20px, env(safe-area-inset-right));
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(430px, calc(100vw - 40px));
  pointer-events: none;
}
body.admin-bar .noora-toast-region { top: 52px; }
.wc-block-components-notices.noora-toast-region {
  margin: 0 !important;
  padding: 0 !important;
}
.noora-toast-region--blocks > :not(.noora-toast):not(.wc-block-components-notice-banner) { display: none !important; }

.noora-toast-region .noora-toast {
  --noora-notice-accent: #27aebf;
  --noora-notice-tint: #eaf9fb;
  --noora-notice-shadow: rgba(19, 60, 68, .18);
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 13px;
  min-height: 78px;
  width: 100%;
  margin: 0 !important;
  padding: 16px 18px !important;
  padding-inline-end: 58px !important;
  overflow: hidden;
  border: 1px solid rgba(35, 57, 65, .11) !important;
  border-inline-start: 4px solid var(--noora-notice-accent) !important;
  border-radius: 17px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 18px 48px var(--noora-notice-shadow), 0 3px 12px rgba(20, 32, 38, .08) !important;
  color: #253238 !important;
  direction: rtl;
  text-align: right;
  font: 500 13px/1.85 Vazirmatn, Tahoma, sans-serif !important;
  opacity: 0;
  pointer-events: auto;
  transform: translate3d(42px, 0, 0) scale(.97);
  transform-origin: top right;
  backdrop-filter: blur(16px) saturate(1.15);
  -webkit-backdrop-filter: blur(16px) saturate(1.15);
}
.noora-toast-region .noora-toast.is-visible { animation: noora-toast-enter .46s cubic-bezier(.2, .86, .28, 1.15) forwards; }
.noora-toast-region .noora-toast.is-leaving { animation: noora-toast-leave .28s cubic-bezier(.55, .08, .68, .53) forwards; }
.noora-toast-region .woocommerce-message {
  --noora-notice-accent: #2da47d;
  --noora-notice-tint: #e9f8f2;
  --noora-notice-shadow: rgba(27, 112, 84, .17);
}
.noora-toast-region .woocommerce-error {
  --noora-notice-accent: #dc5b64;
  --noora-notice-tint: #fff0f1;
  --noora-notice-shadow: rgba(153, 39, 48, .17);
}
.noora-toast-region .wc-block-components-notice-banner.is-success {
  --noora-notice-accent: #2da47d;
  --noora-notice-tint: #e9f8f2;
  --noora-notice-shadow: rgba(27, 112, 84, .17);
}
.noora-toast-region .wc-block-components-notice-banner.is-error {
  --noora-notice-accent: #dc5b64;
  --noora-notice-tint: #fff0f1;
  --noora-notice-shadow: rgba(153, 39, 48, .17);
}

.noora-toast-region .noora-toast::before {
  box-sizing: border-box;
  position: static !important;
  inset: auto !important;
  display: grid !important;
  flex: 0 0 38px;
  place-items: center;
  width: 38px !important;
  height: 38px !important;
  margin: 0 !important;
  border-radius: 12px;
  background: var(--noora-notice-tint);
  color: var(--noora-notice-accent) !important;
  content: 'i' !important;
  font: 800 19px/1 Arial, sans-serif !important;
}
.noora-toast-region .woocommerce-message::before { content: '✓' !important; }
.noora-toast-region .woocommerce-error::before { content: '!' !important; }
.noora-toast-region .wc-block-components-notice-banner.is-success::before { content: '✓' !important; }
.noora-toast-region .wc-block-components-notice-banner.is-error::before { content: '!' !important; }
.noora-toast-region .wc-block-components-notice-banner > svg { display: none !important; }
.noora-toast-region .wc-block-components-notice-banner__content {
  flex: 1 1 250px;
  min-width: 0;
  margin: 0 !important;
  padding: 0 !important;
}
.noora-toast-region .wc-block-components-notice-banner__summary {
  margin: 0 0 4px !important;
  color: #253238 !important;
  font: 700 13px/1.8 Vazirmatn, Tahoma, sans-serif !important;
}
.noora-toast-region .wc-block-components-notice-banner__list {
  margin: 0 !important;
  padding: 0 !important;
  color: #4c5a61 !important;
}
.noora-toast-region .wc-block-components-notice-banner__list li { margin: 0 !important; padding: 0 !important; }
.noora-toast-region .woocommerce-error li { margin: 0; padding: 0; list-style: none; }
.noora-toast-region .woocommerce-error li + li { margin-top: 5px; }

.noora-toast-region .noora-toast .noora-toast__close {
  position: absolute !important;
  top: 11px !important;
  right: auto !important;
  bottom: auto !important;
  left: 11px !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  min-width: 32px !important;
  height: 32px !important;
  min-height: 32px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: #f3f5f6 !important;
  box-shadow: none !important;
  color: #67737a !important;
  cursor: pointer !important;
  transition: color .2s ease, background-color .2s ease, transform .2s ease;
}
.noora-toast-region .noora-toast .noora-toast__close:hover { color: #1f2b31 !important; background: #e8edef !important; transform: rotate(6deg) scale(1.04); }
.noora-toast-region .noora-toast .noora-toast__close:focus-visible { outline: 2px solid var(--noora-notice-accent); outline-offset: 2px; }
.noora-toast-region .noora-toast .noora-toast__close svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

.noora-toast-region .noora-toast a:not(.button) { color: #147f90; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.noora-toast-region .noora-toast a:not(.button):hover { color: #0c5c69; }
.noora-toast-region .noora-toast :is(a.button, button.button) {
  box-sizing: border-box;
  order: 3;
  float: none !important;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 2px auto 0 0 !important;
  padding: 7px 15px !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: #20292d !important;
  box-shadow: none !important;
  color: #fff !important;
  font: 700 11px/1.6 Vazirmatn, Tahoma, sans-serif !important;
  text-decoration: none !important;
  white-space: nowrap;
  transition: background-color .2s ease, transform .2s ease;
}
.noora-toast-region .noora-toast :is(a.button, button.button):hover { background: var(--noora-notice-accent) !important; transform: translateY(-1px); }
.woocommerce-notices-wrapper:empty,
.woocommerce-NoticeGroup:empty { display: none !important; }

@keyframes noora-toast-enter {
  0% { opacity: 0; transform: translate3d(42px, 0, 0) scale(.97); }
  65% { opacity: 1; transform: translate3d(-4px, 0, 0) scale(1.005); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes noora-toast-leave { to { opacity: 0; transform: translate3d(48px, 0, 0) scale(.96); } }

@media (max-width: 782px) {
  body.admin-bar .noora-toast-region { top: 66px; }
}
@media (max-width: 600px) {
  .noora-toast-region {
    top: max(12px, env(safe-area-inset-top));
    right: 12px;
    width: calc(100vw - 24px);
    gap: 9px;
  }
  body.admin-bar .noora-toast-region { top: 58px; }
  .noora-toast-region .noora-toast {
    min-height: 68px;
    padding: 13px !important;
    padding-inline-end: 51px !important;
    border-radius: 14px !important;
    font-size: 12px !important;
  }
  .noora-toast-region .noora-toast::before { flex-basis: 34px; width: 34px !important; height: 34px !important; border-radius: 10px; }
  .noora-toast-region .noora-toast .noora-toast__close { top: 9px !important; left: 9px !important; width: 29px !important; min-width: 29px !important; height: 29px !important; min-height: 29px !important; }
  .noora-toast-region .noora-toast :is(a.button, button.button) { width: 100%; margin: 3px 0 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  .noora-toast-region .noora-toast.is-visible,
  .noora-toast-region .noora-toast.is-leaving { animation-duration: .01ms; }
}
