/**
 * Apply Now Modal — dialog reset, scrim, close states.
 * Unlayered so it beats the UA <dialog> styles.
 */

/* The dialog is the full-viewport scrim; the panel scrolls inside it. */
.apply-now-modal {
  @apply p-4;

  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--color-scrim-dark);
  backdrop-filter: blur(7px);
}

/* :target is the no-JS fallback; drupal.js adds html.js. */
.apply-now-modal[open],
html:not(.js) .apply-now-modal:target {
  display: flex;
}

/* Scrim is the dialog itself, so hide the native backdrop. */
.apply-now-modal::backdrop {
  background: transparent;
}

/* Unlayered, so it beats the description atom's text-body utility. */
.apply-now-modal__text {
  @apply text-15;
}

.apply-now-modal__close {
  @apply text-ink-primary;
}

.apply-now-modal__close:hover {
  @apply bg-neutral-0;
}

.apply-now-modal__close:active {
  @apply bg-border-card;
}

.apply-now-modal__close:focus-visible {
  outline: 2px solid var(--ink-primary);
  outline-offset: 2px;
}

/* Scroll lock for every modal (src/js/modal.js); the gutter stays reserved so the page doesn't shift. */
html.is-modal-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}
