/*
  WC Mods – Notifications
  Toast-style bottom notifications built from Woo notices.
*/

/* Disable native Woo notice output completely when this submodule is active. */
.woocommerce-notices-wrapper,
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  display: none !important;
}

.se-wc-notify-stack {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 16px;
  z-index: 999999;
  pointer-events: none;
  padding: 0 16px;
}

.se-wc-notify-stack::before {
  content: "";
  display: block;
  height: env(safe-area-inset-bottom);
}

.se-wc-notify {
  width: min(1472px, 100%);
  margin: 0 auto;
  pointer-events: auto;

  position: relative;

  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  column-gap: 16px;

  padding: 10px 18px;
  line-height: 1.35;
  color: var(--se-wc-notify-text, #2b2b2b) !important;

  background: var(--se-wc-notify-bg, #eef7ff) !important;
  border: 1px solid var(--se-wc-notify-border, #b9dcff) !important;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.10);
  outline: none;

  transform: translateY(18px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.se-wc-notify + .se-wc-notify {
  margin-top: 10px;
}

.se-wc-notify.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.se-wc-notify.is-hiding {
  transform: translateY(18px);
  opacity: 0;
}

.se-wc-notify__icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--se-wc-notify-icon-bg, rgba(0, 0, 0, 0.08));
}

.se-wc-notify__icon svg {
  width: 24px;
  height: 24px;
  fill: var(--se-wc-notify-icon, rgba(0, 0, 0, 0.65));
}

.se-wc-notify__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.se-wc-notify__actions {
  display: inline-flex;
  align-items: center;
  align-self: center;
  justify-content: flex-end;
  gap: 12px;
  white-space: nowrap;
  justify-self: end;
}

.se-wc-notify__title {
  font-family: var(--e-global-typography-accent-font-family, inherit);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 17px;
  line-height: 1.1;
  color: var(--se-wc-notify-title, inherit);
}

.se-wc-notify__content {
  font-size: 15px;
  opacity: 0.9;
  min-width: 0;
}

.se-wc-notify__content a {
  color: inherit;
  text-decoration: underline;
}

.se-wc-notify__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  line-height: 1;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  vertical-align: middle;
  margin: 0;
}

/* Make sure the label stays visible above glass overlays */
.se-wc-notify__action.glassy-btn1 > span {
  color: #0c0d0e !important;
  -webkit-text-fill-color: #0c0d0e !important;
}

/* Close button: CSS-drawn × (reliable + theme-proof) */
.se-wc-notify__close {
  flex: 0 0 auto;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none;
  -webkit-appearance: none;

  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  margin: 0 !important;
  border-radius: 6px !important;
  line-height: 0 !important;
  font-size: 0 !important;
  font-weight: 400 !important;
  cursor: pointer;

  color: var(--se-wc-notify-close, rgba(0, 0, 0, 0.35)) !important;
  -webkit-text-fill-color: var(--se-wc-notify-close, rgba(0, 0, 0, 0.35)) !important;
  opacity: 1 !important;
  filter: none !important;
  text-shadow: none !important;
  mix-blend-mode: normal !important;
  position: relative !important;
}

/* Thin X drawn with two lines so font weight can't make it “fat”. */
.se-wc-notify__close::before,
.se-wc-notify__close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--se-wc-notify-close, rgba(0, 0, 0, 0.35)) !important;
}

.se-wc-notify__close::before {
  transform: rotate(45deg);
}

.se-wc-notify__close::after {
  transform: rotate(-45deg);
}

.se-wc-notify__close:hover {
  color: var(--se-wc-notify-close-hover, rgba(0, 0, 0, 0.55)) !important;
  -webkit-text-fill-color: var(--se-wc-notify-close-hover, rgba(0, 0, 0, 0.55)) !important;
}

.se-wc-notify__close:hover::before,
.se-wc-notify__close:hover::after {
  background: var(--se-wc-notify-close-hover, rgba(0, 0, 0, 0.55)) !important;
}

.se-wc-notify__close:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Type palettes */
.se-wc-notify[data-type="success"],
.se-wc-notify[data-type="message"] {
  --se-wc-notify-bg: #DFF2D8;
  --se-wc-notify-border: #9ACB8C;
  --se-wc-notify-icon-bg: rgba(85, 160, 70, 0.18);
  --se-wc-notify-icon: #2F7A22;
  --se-wc-notify-title: #2F7A22;
  --se-wc-notify-close: #2F7A22;
  --se-wc-notify-close-hover: #245f1b;
}

.se-wc-notify[data-type="warning"],
.se-wc-notify[data-type="notice"] {
  --se-wc-notify-bg: #F8F0C6;
  --se-wc-notify-border: #D8C062;
  --se-wc-notify-icon-bg: rgba(180, 140, 0, 0.18);
  --se-wc-notify-icon: #8B6A00;
  --se-wc-notify-title: #8B6A00;
  --se-wc-notify-close: #8B6A00;
  --se-wc-notify-close-hover: #6f5400;
}

.se-wc-notify[data-type="error"] {
  --se-wc-notify-bg: #F3D4D4;
  --se-wc-notify-border: #D17A7A;
  --se-wc-notify-icon-bg: rgba(200, 40, 40, 0.18);
  --se-wc-notify-icon: #B22A2A;
  --se-wc-notify-title: #B22A2A;
  --se-wc-notify-close: #B22A2A;
  --se-wc-notify-close-hover: #8e2222;
}

.se-wc-notify[data-type="info"] {
  --se-wc-notify-bg: #D6ECFF;
  --se-wc-notify-border: #7DB7E7;
  --se-wc-notify-icon-bg: rgba(30, 120, 200, 0.18);
  --se-wc-notify-icon: #1C6FB8;
  --se-wc-notify-title: #1C6FB8;
  --se-wc-notify-close: #1C6FB8;
  --se-wc-notify-close-hover: #155a96;
}

/* Breakpoints observed across the plugin: 1200 / 768 / 480 */
@media (max-width: 1200px) {
  .se-wc-notify-stack { padding: 0 14px; }
}

@media (max-width: 768px) {
  .se-wc-notify-stack { bottom: 12px; padding: 0 12px; }
  .se-wc-notify {
    padding: 10px 12px;
    grid-template-columns: 44px 1fr auto;
    column-gap: 12px;
  }
  .se-wc-notify__icon { width: 44px; height: 44px; }
  .se-wc-notify__icon svg { width: 22px; height: 22px; }
  .se-wc-notify__title { font-size: 16px; }
}

@media (max-width: 480px) {
  .se-wc-notify { padding: 10px 10px; }
  .se-wc-notify__content { font-size: 14px; }
  .se-wc-notify__close { width: 32px !important; height: 32px !important; min-width: 32px !important; min-height: 32px !important; }
  .se-wc-notify__close::before,
  .se-wc-notify__close::after { width: 16px; }
}
