:root {
  --jchd-notify-blue: #376fe6;
  --jchd-notify-text: #25272d;
  --jchd-notify-muted: #697386;
  --jchd-notify-bg: #fff;
  --jchd-notify-border: rgba(31, 41, 55, .14);
  --jchd-notify-shadow: 0 22px 60px rgba(17, 24, 39, .24), 0 4px 16px rgba(17, 24, 39, .10);
  --jchd-notify-success: #20a557;
  --jchd-notify-info: #376fe6;
  --jchd-notify-warning: #d47a00;
  --jchd-notify-error: #d54242;
}

html[data-theme="dark"],
html.dark,
body.dark,
body.theme-dark,
[data-color-scheme="dark"] {
  --jchd-notify-text: #f3f5f8;
  --jchd-notify-muted: #b2bac8;
  --jchd-notify-bg: #1e212a;
  --jchd-notify-border: rgba(255, 255, 255, .12);
  --jchd-notify-shadow: 0 24px 70px rgba(0, 0, 0, .56), 0 4px 16px rgba(0, 0, 0, .32);
}


.jchd-notify-root {
  position: fixed;
  inset: 0;
  z-index: 2147482980;
  pointer-events: none;
  contain: layout style;
}
.jchd-notify-root[aria-hidden="true"] { visibility: hidden; }
.jchd-notify-root.is-active { visibility: visible; }

.jchd-notify-region {
  --jchd-notify-top: 92px;
  --jchd-notify-side: 20px;
  --jchd-notify-width: 380px;
  position: fixed;
  z-index: 20;
  display: flex;
  width: min(var(--jchd-notify-width), calc(100vw - (var(--jchd-notify-side) * 2)));
  max-height: calc(100vh - 24px);
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.jchd-notify-region[data-position^="top-"] { top: var(--jchd-notify-top); }
.jchd-notify-region[data-position^="bottom-"] { bottom: 20px; }
.jchd-notify-region[data-position$="-right"] { right: var(--jchd-notify-side); }
.jchd-notify-region[data-position$="-left"] { left: var(--jchd-notify-side); }
.jchd-notify-region[data-position$="-center"] { left: 50%; transform: translateX(-50%); }

.jchd-notify-region[data-position="center-center"] {
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  width: min(var(--jchd-notify-width), calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  transform: translate(-50%, -50%);
}

.jchd-notify-backdrop {
  --jchd-backdrop-opacity: .38;
  position: fixed;
  inset: 0;
  z-index: 10;
  background: rgba(7, 11, 20, var(--jchd-backdrop-opacity));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  will-change: opacity;
  transition: opacity .20s ease, visibility 0s linear .20s;
}

.jchd-notify-backdrop.is-visible {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.jchd-notify-backdrop[data-block="1"].is-visible,
.jchd-notify-backdrop.is-closable.is-visible { pointer-events: auto; }
html.jchd-notify-backdrop-active { overflow: hidden; scrollbar-gutter: stable; }

.jchd-notify {
  --jchd-accent: var(--jchd-notify-info);
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: start;
  overflow: hidden;
  box-sizing: border-box;
  width: 100%;
  padding: 16px 16px 15px;
  color: var(--jchd-notify-text);
  background: var(--jchd-notify-bg);
  border: 1px solid var(--jchd-notify-border);
  border-radius: 16px;
  box-shadow: var(--jchd-notify-shadow);
  pointer-events: auto;
  opacity: 0;
  transform: translate3d(18px, -5px, 0) scale(.985);
  will-change: opacity, transform;
  transition: opacity .20s ease, transform .20s ease;
}
.jchd-notify.is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.jchd-notify.is-leaving { opacity: 0; transform: translate3d(12px, -3px, 0) scale(.985); }
.jchd-notify--success { --jchd-accent: var(--jchd-notify-success); }
.jchd-notify--info { --jchd-accent: var(--jchd-notify-info); }
.jchd-notify--warning { --jchd-accent: var(--jchd-notify-warning); }
.jchd-notify--error { --jchd-accent: var(--jchd-notify-error); }

.jchd-notify::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--jchd-accent);
}
.jchd-notify__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--jchd-accent);
  border-radius: 50%;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--jchd-accent) 28%, transparent);
}
.jchd-notify__icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.jchd-notify__content { min-width: 0; padding-top: 1px; }
.jchd-notify__title { margin: 0 0 4px; font-size: 15px; font-weight: 750; line-height: 1.25; color: var(--jchd-notify-text); }
.jchd-notify__message { margin: 0; font-size: 14px; font-weight: 450; line-height: 1.5; color: var(--jchd-notify-muted); overflow-wrap: anywhere; }
.jchd-notify__message a { color: var(--jchd-notify-blue); }
.jchd-notify__close {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin: -5px -5px 0 0;
  padding: 0;
  color: var(--jchd-notify-muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
}
.jchd-notify__close:hover,
.jchd-notify__close:focus-visible { color: var(--jchd-notify-text); background: color-mix(in srgb, var(--jchd-notify-text) 8%, transparent); outline: none; }
.jchd-notify__close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.jchd-notify__progress { position: absolute; inset: auto 0 0; height: 3px; background: color-mix(in srgb, var(--jchd-accent) 14%, transparent); }
.jchd-notify__progress > span { display: block; width: 100%; height: 100%; background: var(--jchd-accent); transform-origin: left center; animation: jchd-notify-progress var(--jchd-duration) linear forwards; }
.jchd-notify.is-paused .jchd-notify__progress > span { animation-play-state: paused; }
@keyframes jchd-notify-progress { to { transform: scaleX(0); } }

/* Modal style used by the website for centered notifications. */
.jchd-notify-region[data-position="center-center"] .jchd-notify {
  grid-template-columns: 38px minmax(0, 1fr) 32px;
  gap: 14px;
  padding: 22px 22px 20px;
  border-radius: 18px;
  transform: translate3d(0, 8px, 0) scale(.97);
}
.jchd-notify-region[data-position="center-center"] .jchd-notify::before { display: none; }
.jchd-notify-region[data-position="center-center"] .jchd-notify__title {
  margin-top: 1px;
  margin-bottom: 7px;
  font-size: 20px;
  line-height: 1.25;
  letter-spacing: -.015em;
}
.jchd-notify-region[data-position="center-center"] .jchd-notify__message {
  font-size: 15px;
  line-height: 1.55;
}
.jchd-notify-region[data-position="center-center"] .jchd-notify.is-visible { transform: translate3d(0, 0, 0) scale(1); }
.jchd-notify-region[data-position="center-center"] .jchd-notify.is-leaving { transform: translate3d(0, 5px, 0) scale(.98); }

@media (max-width: 640px) {
  .jchd-notify-region {
    --jchd-notify-side: 12px !important;
    --jchd-notify-top: 76px !important;
    width: calc(100vw - 24px);
    gap: 9px;
  }
  .jchd-notify { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; padding: 13px 13px 12px; border-radius: 14px; }
  .jchd-notify__icon { width: 34px; height: 34px; }
  .jchd-notify__title, .jchd-notify__message { font-size: 13px; }
  .jchd-notify-region[data-position="center-center"] { width: calc(100vw - 28px); }
  .jchd-notify-region[data-position="center-center"] .jchd-notify {
    grid-template-columns: 34px minmax(0, 1fr) 30px;
    gap: 11px;
    padding: 18px 17px 17px;
    border-radius: 16px;
  }
  .jchd-notify-region[data-position="center-center"] .jchd-notify__title { font-size: 18px; }
  .jchd-notify-region[data-position="center-center"] .jchd-notify__message { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .jchd-notify,
  .jchd-notify-backdrop { transition: none; transform: none; }
}
