.important-overlay-root[hidden] {
  display: none;
}

.important-overlay-root {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
}

.important-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 14, .68);
  backdrop-filter: blur(7px);
  animation: important-overlay-fade .22s ease both;
}

.important-overlay-card {
  width: min(820px, 100%);
  max-height: min(760px, calc(100dvh - 32px));
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 18px;
  overflow: auto;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid #cde2d7;
  border-radius: 26px;
  background:
    radial-gradient(circle at 92% 4%, rgba(32, 183, 122, .13), transparent 32%),
    #fff;
  color: #14201b;
  box-shadow: 0 30px 90px rgba(3, 16, 10, .34);
  animation: important-overlay-in .3s cubic-bezier(.2, .8, .2, 1) both;
  overscroll-behavior: contain;
}

.important-overlay-card.urgent {
  border-color: #edc2bd;
  background:
    radial-gradient(circle at 92% 4%, rgba(199, 77, 66, .13), transparent 32%),
    #fff;
}

.important-overlay-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #def6e9;
  color: #11875a;
}

.important-overlay-icon svg {
  width: 27px;
  height: 27px;
}

.important-overlay-card.urgent .important-overlay-icon {
  background: #ffe6e2;
  color: #b74338;
}

.important-overlay-copy {
  min-width: 0;
  padding: 3px 28px 0 0;
}

.important-overlay-copy small {
  color: #11875a;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.important-overlay-card.urgent .important-overlay-copy small {
  color: #b74338;
}

.important-overlay-copy h2 {
  margin: 6px 0 12px;
  overflow-wrap: anywhere;
  color: #101a16;
  font-size: clamp(24px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.035em;
}

@media (min-width: 650px) {
  .important-overlay-copy h2 {
    font-size: clamp(22px, 3vw, 32px);
    white-space: nowrap;
  }
}

.important-overlay-copy p {
  margin: 0;
  overflow-wrap: anywhere;
  color: #46534d;
  font-size: 15px;
  line-height: 1.7;
  white-space: pre-line;
}

.notification-inline-link {
  color: #087f59;
  font-weight: 750;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}

.notification-inline-link:hover {
  color: #075f45;
  text-decoration-thickness: 2px;
}

body.dark .notification-inline-link {
  color: #72e2b5;
}

.important-overlay-actions {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.important-overlay-action,
.important-overlay-dismiss {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 17px;
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.important-overlay-action {
  border: 1px solid #14201b;
  background: #14201b;
  color: #fff;
  text-decoration: none;
}

.important-overlay-action svg {
  width: 15px;
}

.important-overlay-dismiss {
  border: 1px solid #d8e2dd;
  background: #fff;
  color: #26342e;
}

.important-overlay-action:hover,
.important-overlay-dismiss:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 18px rgba(20, 32, 27, .12);
}

.important-overlay-x {
  width: 38px;
  height: 38px;
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: rgba(20, 32, 27, .06);
  color: #34423c;
  cursor: pointer;
}

.important-overlay-x:hover {
  background: rgba(20, 32, 27, .1);
}

.important-overlay-x svg {
  width: 18px;
}

body.important-overlay-open {
  overflow: hidden;
}

body.dark .important-overlay-backdrop {
  background: rgba(1, 7, 4, .78);
}

body.dark .important-overlay-card,
body.dark .important-overlay-card.urgent {
  border-color: #41554b;
  background:
    radial-gradient(circle at 92% 4%, rgba(42, 201, 137, .13), transparent 32%),
    #17231e;
  color: #fff;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
}

body.dark .important-overlay-card.urgent {
  border-color: #6c413c;
  background:
    radial-gradient(circle at 92% 4%, rgba(221, 84, 71, .13), transparent 32%),
    #211b19;
}

body.dark .important-overlay-copy h2,
body.dark .important-overlay-copy p {
  color: #fff;
}

body.dark .important-overlay-dismiss,
body.dark .important-overlay-x {
  border-color: #52645b;
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

@keyframes important-overlay-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes important-overlay-in {
  from { opacity: 0; transform: translateY(14px) scale(.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 600px) {
  .important-overlay-root {
    align-items: end;
    padding: 10px;
  }

  .important-overlay-card {
    max-height: calc(100dvh - 20px);
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
    padding: 24px 19px 20px;
    border-radius: 22px;
  }

  .important-overlay-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .important-overlay-icon svg {
    width: 21px;
  }

  .important-overlay-copy {
    padding-right: 26px;
  }

  .important-overlay-copy h2 {
    margin-top: 5px;
    font-size: 23px;
  }

  .important-overlay-copy p {
    font-size: 14px;
    line-height: 1.62;
  }

  .important-overlay-actions {
    grid-column: 1 / -1;
  }

  .important-overlay-action,
  .important-overlay-dismiss {
    flex: 1 1 150px;
  }

  .important-overlay-x {
    top: 14px;
    right: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .important-overlay-backdrop,
  .important-overlay-card {
    animation: none;
  }
}
