/* The article pop-up, laid out again (30.11). Styles only: no element of the pop-up is added or removed.
 * Served by the DN LP Fixes 30.11 plug-in after the site's own stylesheets. */

.elementor-popup-modal:has(.dn-pop-article) .dialog-widget-content {
  width: min(820px, calc(100vw - 32px)) !important;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto !important;
  border-radius: 24px;
  border: 3px solid #0D1A2E;
  box-shadow: -10px 10px 0 #7EB0F2, 0 40px 90px -30px rgba(13, 26, 46, .55);
}

.elementor-popup-modal:has(.dn-pop-article) .dialog-message,
.elementor-popup-modal:has(.dn-pop-article) .dialog-message > .elementor {
  width: 100% !important;
  max-width: 100% !important;
}

/* The close button: the X alone, centred in its touch area. */
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button {
  top: 14px !important;
  left: 14px !important;
  right: auto !important;
  transform: none !important;
  width: 40px;
  height: 40px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #0D1A2E;
  z-index: 5;
}
/* The pop-up puts the focus on the X when it opens; a colour change marks it instead of a frame. */
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button:focus { outline: none; box-shadow: none; }
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button:hover,
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button:focus-visible { color: #1A66C9; }
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button svg,
.elementor-popup-modal:has(.dn-pop-article) .dialog-close-button i {
  position: static !important;
  inset: auto !important;
  margin: 0 !important;
  width: 20px;
  height: 20px;
  font-size: 20px;
  fill: currentColor;
  color: currentColor;
}

/* Header: the icon beside the kicker and the title, start-aligned. */
.dn-pop-article {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "icon kicker"
    "icon title"
    "split split";
  column-gap: 16px;
  row-gap: 4px;
  align-items: center;
  width: 100% !important;
  max-width: none !important;
  padding: 34px 36px 32px !important;
  background: linear-gradient(180deg, #EEF4FF 0, #EEF4FF 128px, #fff 128px) !important;
  text-align: start;
}
.dn-pop-article > .elementor-element { width: auto !important; max-width: none !important; min-width: 0; margin: 0 !important; }
.dn-pop-article > .elementor-widget-html { grid-area: icon; align-self: center; }
.dn-pop-article .dn-pop-icon { width: 60px; height: 60px; margin: 0; }
.dn-pop-article > .dn-pop-kicker { grid-area: kicker; align-self: end; }
.dn-pop-article > .dn-pop-h2 { grid-area: title; align-self: start; padding-inline-end: 44px; }
.dn-pop-article .dn-pop-kicker .elementor-heading-title {
  display: inline-block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .02em;
  color: #1A66C9;
  margin: 0;
}
.dn-pop-article .dn-pop-h2 .elementor-heading-title { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; margin: 0; }

/* Body: the photo beside the text, filling its panel; the question and the button close the text. */
.dn-pop-article > .dn-pop-split {
  grid-area: split;
  display: grid !important;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  margin-top: 30px !important;
}
.dn-pop-article .dn-pop-visual {
  display: flex !important;
  align-items: stretch;
  padding: 0 !important;
  border-radius: 20px;
  overflow: hidden;
  border: 3px solid #0D1A2E;
  box-shadow: -6px 6px 0 #7EB0F2;
  background: #EEF4FF;
}
.dn-pop-article .dn-pop-img,
.dn-pop-article .dn-pop-img .elementor-widget-container { width: 100% !important; height: 100%; }
.dn-pop-article .dn-pop-img img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 330px;
  max-height: none;
  object-fit: cover;
  object-position: 50% 18%;
  border-radius: 0;
}
.dn-pop-article .dn-pop-text { display: flex !important; flex-direction: column; gap: 0; padding: 0 !important; min-width: 0; width: auto !important; }
.dn-pop-article .dn-pop-text > .elementor-element { width: 100% !important; max-width: 100% !important; }
.dn-pop-article .dn-pop-visual { min-width: 0; width: auto !important; }
.dn-pop-article .dn-pop-stat .elementor-heading-title { font-size: 15.5px; line-height: 1.7; color: #33415C; margin-bottom: 10px; }
.dn-pop-article .dn-pop-ask .elementor-heading-title {
  font-size: 19px;
  line-height: 1.4;
  margin: 6px 0 18px;
  padding: 12px 16px;
  border-inline-start: 4px solid #F29B88;
  border-radius: 10px;
  background: #FFF5F2;
  color: #0D1A2E;
}
.dn-pop-article .dn-pop-cta { margin-top: auto !important; }
.dn-pop-article .dn-pop-cta .elementor-button { width: 100%; justify-content: center; white-space: normal; }

@media (max-width: 767px) {
  .elementor-popup-modal:has(.dn-pop-article) .dialog-widget-content {
    height: auto !important;
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    width: calc(100vw - 24px) !important;
    margin: auto;
    box-shadow: -6px 6px 0 #7EB0F2;
  }
  .elementor-popup-modal:has(.dn-pop-article) .dialog-message { align-items: center !important; }
  .dn-pop-article {
    padding: 26px 20px 22px !important;
    column-gap: 12px;
    background: linear-gradient(180deg, #EEF4FF 0, #EEF4FF 112px, #fff 112px) !important;
  }
  .dn-pop-article .dn-pop-icon { width: 46px; height: 46px; }
  .dn-pop-article .dn-pop-icon svg { width: 22px; height: 22px; }
  .dn-pop-article .dn-pop-h2 .elementor-heading-title { font-size: 20px; }
  .dn-pop-article > .dn-pop-split { grid-template-columns: 1fr; margin-top: 20px !important; gap: 18px; }
  .dn-pop-article .dn-pop-visual { height: 170px; border-radius: 16px; box-shadow: -4px 4px 0 #7EB0F2; }
  .dn-pop-article .dn-pop-img img { min-height: 0; height: 170px; object-position: 50% 24%; }
  .dn-pop-article .dn-pop-stat .elementor-heading-title { font-size: 15px; }
  .dn-pop-article .dn-pop-ask .elementor-heading-title { font-size: 17px; }
}
