/* =========================================================================
   NS Support — Co-pay Assistance Program modal
   Design: Figma – Co-pay Assistance Program Modal Updated (6108:14039).
   Loaded globally via styles/compound (functions.php).
   Opens via `.trigger-model-copay-assis` / `#copay-assis` (legacy selector kept).
   ========================================================================= */

.cpm-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.8);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s ease,
    visibility 0.2s ease;
  box-sizing: border-box;
}

.cpm-overlay[data-open="true"] {
  opacity: 1;
  visibility: visible;
}

/* Legacy support — some pages toggle `.d-none` on #copay-assis. */
.cpm-overlay.d-none {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.cpm-overlay *,
.cpm-overlay *::before,
.cpm-overlay *::after {
  box-sizing: border-box;
}

/* ---- modal shell ---- */
.cpm {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  max-width: 760px;
  max-height: 95vh;
  background: #fff;
  padding: 40px;
  font-family:
    "Source Sans 3", "Source Sans Pro", "Public Sans", Arial, sans-serif;
  transform: translateY(12px);
  transition: transform 0.2s ease;
}

.cpm-overlay[data-open="true"] .cpm {
  transform: translateY(0);
}

/* ---- close X (top-right) — 60x60 hit area, 50% opacity per Figma ---- */
.cpm-x {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  background: none;
  color: #000;
  cursor: pointer;
  line-height: 0;
  opacity: 0.5;
  transition: opacity 0.15s ease;
}

@media (max-width: 768px) {
  .cpm-x {
    top: -7px;
  }
}

.cpm-x svg {
  width: 25px;
  height: 25px;
}



/* ---- scrollable body — hidden scrollbar per project pattern ---- */
.cpm-scroll {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none; /* IE & Edge */
  scrollbar-width: none; /* Firefox */
}

.cpm-scroll::-webkit-scrollbar {
  display: none;
}

/* ---- head (title + copy) ---- */
.cpm-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cpm-title {
  margin: 0;
  font-size: 36px;
  line-height: 38px;
  font-weight: 600;
  color: #003f73;
}

.cpm-lede {
  margin: 0;
  font-size: 21px;
  line-height: 30px;
  font-weight: 400;
  color: #000;
}

.cpm-note {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400 !important;
  color: #000;
  margin-bottom: 24px;
  margin-top: 8px;
  font-style: italic;
}

/* ---- steps container ---- */
.cpm-steps {
  list-style: none;
  margin: 0;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 36px;
  background: #f5f5f5;
}

.cpm-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.cpm-step + .cpm-step {
  padding-top: 36px;
  border-top: 1px solid #ddd;
}

.cpm-step-head {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cpm-num {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #00adee;
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
}

.cpm-step-title {
  margin: 0;
  font-size: 21px;
  line-height: 24px;
  font-weight: 600;
  color: #000;
}

.cpm-step-copy {
  margin: 0;
  font-size: 18px;
  line-height: 24px;
  font-weight: 400;
  color: #000 !important;
}
.cpm-step-copy a,
.cpm-step-copy a[href^="tel:"],
.cpm-step-copy a[href^="fax:"] {
    color: #000 !important;
    text-decoration: none !important;
}
.cpm-step-copy--address {
  margin-bottom: 12px;
}

/* ---- download link (step 1) ---- */
.cpm-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--nsh-navy, #00406d);
  text-decoration: none;
}
.cpm-link:hover,
.cpm-link:focus-visible,
.cpm-link:focus {
  text-decoration: none;
}
.cpm-link:hover svg path,
.cpm-link:focus-visible svg path,
.cpm-link:focus svg path {
  fill: #00adee;
}
.cpm-link-text {
  border-bottom: 1px solid #002454;
}
.cpm-link svg:hover path,
.cpm-link:focus-visible svg path,
.cpm-link:focus svg path {
  fill: #00adee;
}
.cpm-link svg:hover .cpm-link-text,
.cpm-link:focus-visible svg .cpm-link-text,
.cpm-link:focus svg .cpm-link-text {
  border-bottom-color: #00adee;
  color: #00406d;
}
.cpm-link:hover .cpm-link-text,
.cpm-link:focus-visible .cpm-link-text,
.cpm-link:focus .cpm-link-text {
  border-bottom-color: #00adee;
  color: #00406d;
}

.cpm-link-icon {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  color: var(--nsh-navy, #00406d);
}

.cpm-link:hover .cpm-link-icon,
.cpm-link:focus-visible .cpm-link-icon,
.cpm-link:focus .cpm-link-icon {
  color: #00adee;
}

/* ---- footer / Close button (outlined, angled notch — matches gsm) ---- */
.cpm-foot {
  display: flex;
  justify-content: center;
}

.cpm-close-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 40px;
  font-family: inherit;
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  color: var(--nsh-navy, #00406d);
  background: #fff;
  border: 1px solid var(--nsh-navy, #00406d);
  border-radius: 0 10px;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition:
    background 0.15s ease,
    color 0.15s ease;
}

.cpm-close-btn:hover,
.cpm-close-btn:focus-visible,
.cpm-close-btn:focus {
  background: #00406d;
  color: #fff;
}

/* prevent body scroll behind the modal */
body.cpm-open {
  overflow: hidden;
}

/* =========================================================================
   Mobile (<= 768px) — Figma: Co-pay Assistance Program Modal (6243:14610)
   ========================================================================= */
@media (max-width: 768px) {

 .cpm-overlay {
    padding: 0;
    align-items: stretch;
  }

  .cpm {
    max-width: none;
     max-height: 100vh;
    height: 100%;
    padding: 40px 20px;
    margin: 0 20px;
    gap: 24px;
  }

  .cpm-x {
    width: 60px;
    height: 60px;
  }

  .cpm-x svg {
    width: 25px;
    height: 25px;
  }

  .cpm-head {
    gap: 12px;
  }

  .cpm-title {
    font-size: 28px;
    line-height: 32px;
  }

  .cpm-lede {
    font-size: 18px;
    line-height: 28px;
    /* Parent gap (12) + this margin (12) = 24px to the italic note per Figma. */
    margin: 0 0 12px 0;
  }

  .cpm-note {
    font-size: 16px;
    line-height: 24px;
    margin: 0;
    margin-bottom: 24px;
  }

  .cpm-steps {
    padding: 20px;
    gap: 24px;
  }

  .cpm-step {
    gap: 12px;
  }

  .cpm-step + .cpm-step {
    padding-top: 24px;
  }

  .cpm-step-head {
    gap: 9px;
  }

  .cpm-num {
    width: 30px;
    height: 30px;
    font-size: 18px;
    line-height: 24px;
  }

  .cpm-step-title {
    font-size: 18px;
    line-height: 21px;
  }

  .cpm-step-copy {
    font-size: 16px;
    line-height: 24px;
  }
  .cpm-link {
    font-size: 18px;
    line-height: 24px;
  }

  .cpm-step-copy--address {
    margin-bottom: 12px;
  }

  .cpm-close-btn {
    padding: 8px 40px;
    font-size: 18px;
    line-height: 24px;
  }
}
