/* NS sections - shared popup (<dialog class="ns-modal">, built by modal.js). */

html.ns-modal-open {
  overflow: hidden;
}

.ns-modal {
  --ns-primary: #025188;
  --ns-primary-hover: #004272;
  --ns-ink: #1d1d1f;
  --ns-ink-80: #333333;
  --ns-parchment: #f5f5f7;

  background: transparent;
  border: 0;
  box-sizing: border-box;
  color: var(--ns-ink);
  font-family: "Dosis", system-ui, sans-serif;
  max-height: calc(100dvh - 48px);
  max-width: min(900px, calc(100vw - 48px));
  overflow: visible;
  padding: 0;
  width: 100%;
}
.ns-modal[open] {
  animation: ns-modal-in 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.ns-modal::backdrop {
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: rgba(29, 29, 31, 0.45);
}
.ns-modal *,
.ns-modal *::before,
.ns-modal *::after {
  box-sizing: border-box;
}

.ns-modal__dialog {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25);
  display: flex;
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  position: relative;
}
.ns-modal__scroll {
  outline: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  width: 100%;
}

/* Narrow screens: the close button gets a white strip above the picture. */
.ns-modal .ns-modal__close {
  align-items: center;
  background: var(--ns-parchment);
  border: 0;
  border-radius: 9999px;
  color: var(--ns-ink);
  cursor: pointer;
  display: flex;
  height: 40px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 8px;
  top: 8px;
  width: 40px;
  z-index: 2;
}
.ns-modal .ns-modal__close:hover {
  background: #e8e8ed;
}
.ns-modal__dialog {
  padding-top: 56px;
}
/* Wide screens: it moves next to the card's top-right corner, onto the dimmed page. */
@media screen and (min-width: 1000px) {
  .ns-modal .ns-modal__close {
    background: #fff;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    right: -56px;
    top: 0;
  }
  .ns-modal .ns-modal__close:hover {
    background: var(--ns-parchment);
  }
  .ns-modal__dialog {
    padding-top: 0;
  }
}
.ns-modal .ns-modal__close:active {
  transform: scale(0.95);
}

/* Webinar graphics are ~16:9 with the logo top-right and the speaker's circle near the
   bottom edge: show the full width and trim only a strip off the bottom. */
.ns-modal__media {
  aspect-ratio: 39 / 20;
  background: var(--ns-parchment);
  overflow: hidden;
}
.ns-modal__media img {
  display: block;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  width: 100%;
}

.ns-modal__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 40px 40px;
}
.ns-modal .ns-modal__title {
  color: var(--ns-ink);
  font-family: inherit;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: normal;
  line-height: 1.2;
  margin: 0;
  text-transform: none;
  text-wrap: balance;
}

.ns-modal .ns-modal__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ns-modal .ns-modal__chip {
  align-items: center;
  background: var(--ns-parchment);
  border-radius: 9999px;
  color: var(--ns-ink);
  display: flex;
  font-size: 14px;
  font-weight: 600;
  gap: 7px;
  line-height: 1.3;
  margin: 0;
  padding: 7px 14px;
}
.ns-modal .ns-modal__chip svg {
  color: var(--ns-primary);
  flex: none;
}

/* Description written in the webinar's editor (classic WYSIWYG). */
.ns-modal .ns-modal__content {
  color: var(--ns-ink-80);
  font-size: 17px;
  line-height: 1.55;
}
.ns-modal .ns-modal__content > :first-child {
  margin-top: 0;
}
.ns-modal .ns-modal__content > :last-child {
  margin-bottom: 0;
}
.ns-modal .ns-modal__content p {
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  margin: 0 0 14px;
}
.ns-modal .ns-modal__content h2,
.ns-modal .ns-modal__content h3,
.ns-modal .ns-modal__content h4 {
  color: var(--ns-ink);
  font-family: inherit;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  margin: 20px 0 10px;
  text-transform: none;
}
.ns-modal .ns-modal__content ul,
.ns-modal .ns-modal__content ol {
  margin: 0 0 14px;
  padding-left: 20px;
}
.ns-modal .ns-modal__content li {
  margin-bottom: 8px;
}
.ns-modal .ns-modal__content strong,
.ns-modal .ns-modal__content b {
  color: var(--ns-ink);
  font-weight: 600;
}
.ns-modal .ns-modal__content a {
  color: var(--ns-primary);
}

.ns-modal .ns-modal__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 8px;
}
.ns-modal .ns-modal__btn {
  align-items: center;
  background: var(--ns-primary);
  border-radius: 9999px;
  color: #fff;
  display: inline-flex;
  font-size: 17px;
  font-weight: 500;
  gap: 8px;
  line-height: 1.2;
  min-height: 44px;
  padding: 12px 24px;
  text-decoration: none;
  transition: background-color 0.2s;
}
.ns-modal .ns-modal__btn:hover {
  background: var(--ns-primary-hover);
  color: #fff;
  text-decoration: none;
}
.ns-modal .ns-modal__btn:active {
  transform: scale(0.95);
}
.ns-modal .ns-modal__text-btn {
  background: none;
  border: 0;
  color: var(--ns-primary);
  cursor: pointer;
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  min-height: 44px;
  padding: 12px 8px;
}
.ns-modal .ns-modal__text-btn:hover {
  text-decoration: underline;
}
.ns-modal a:focus-visible,
.ns-modal button:focus-visible {
  box-shadow: 0 0 0 3px rgba(2, 81, 136, 0.45);
  outline: 0;
}

@keyframes ns-modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media screen and (max-width: 599px) {
  .ns-modal {
    max-height: calc(100dvh - 24px);
    max-width: calc(100vw - 24px);
  }
  .ns-modal__dialog {
    max-height: calc(100dvh - 24px);
  }
  .ns-modal__body {
    padding: 24px 20px 28px;
  }
  .ns-modal .ns-modal__content {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ns-modal[open] {
    animation: none;
  }
  .ns-modal .ns-modal__btn:active,
  .ns-modal .ns-modal__close:active {
    transform: none;
  }
}
