/**
 * Site popup (dyouville theme).
 */
.site-popup {
  /* Brand colors from storybook-config/tailwind.config.js */
  --site-popup-accent: #B02424;       /* red.DEFAULT */
  --site-popup-accent-hover: #681519; /* red.dark */
  --site-popup-accent-text: #fff;
  --site-popup-heading: #2E2F7D;      /* violet.DEFAULT */
  --site-popup-bg: #fff;
  --site-popup-text: #0F1113;
  --site-popup-radius: 6px;

  width: min(520px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--site-popup-text);
  overflow: visible;

  /* Don't inherit typography from the region the block is placed in */
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 400;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  white-space: normal;
}
.site-popup::-webkit-backdrop {
  background: rgb(0 0 0 / 0.6);
}
.site-popup::backdrop {
  background: rgb(0 0 0 / 0.6);
}
html.site-popup-lock {
  overflow: hidden;
}
.site-popup[open] {
  -webkit-animation: site-popup-in 0.25s ease-out;
          animation: site-popup-in 0.25s ease-out;
}
@-webkit-keyframes site-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
@keyframes site-popup-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
}
/* Photo on top, text below (all screen sizes) */
.site-popup__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 2rem);
  background: var(--site-popup-bg);
  border-radius: var(--site-popup-radius);
  box-shadow: 0 20px 50px rgb(0 0 0 / 0.3);
  overflow-x: hidden;
  overflow-y: auto;
}
/* Absolute image so Drupal's field/media wrappers can't break the fill */
.site-popup__media {
  position: relative;
  flex-shrink: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #E5EAEE;
}
/* Media/field wrappers vary, so force all of them to fill the box */
.site-popup__media > *,
.site-popup__media div,
.site-popup__media article,
.site-popup__media picture {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.site-popup__media img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  -o-object-fit: cover;
     object-fit: cover;
}
.site-popup__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.25rem, 4vw, 2rem);
}
.site-popup__title {
  margin: 0;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  line-height: 1.15;
  color: var(--site-popup-heading);
}
.site-popup__text,
.site-popup__text p,
.site-popup__text li {
  font-size: 1.0625rem;
  line-height: 1.55;
}
.site-popup__text p {
  margin: 0 0 0.75em;
}
.site-popup__text > :first-child { margin-top: 0; }
.site-popup__text > :last-child { margin-bottom: 0; }
.site-popup__cta {
  align-self: flex-start;
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.75em 1.75em;
  background: var(--site-popup-accent);
  color: var(--site-popup-accent-text);
  font-family: Oswald, "Arial Narrow", sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 0;
}
.site-popup__cta:hover,
.site-popup__cta:focus-visible {
  background: var(--site-popup-accent-hover);
  color: var(--site-popup-accent-text);
}
.site-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.92);
  color: #1a1a1a;
  box-shadow: 0 1px 4px rgb(0 0 0 / 0.25);
  cursor: pointer;
}
.site-popup__close:hover {
  background: #fff;
}
.site-popup__close:focus-visible,
.site-popup__cta:focus-visible {
  outline: 3px solid var(--site-popup-accent);
  outline-offset: 3px;
}
/* No photo: keep the heading clear of the X */
.site-popup--no-image .site-popup__title {
  padding-right: 2rem;
}
@media (prefers-reduced-motion: reduce) {
  .site-popup[open] { -webkit-animation: none; animation: none; }
}
/* Storybook only: show the popup inline over a faux backdrop */
.site-popup-preview {
  min-height: 100vh;
  padding: 3rem 1rem;
  background: rgb(0 0 0 / 0.6);
}
.site-popup-preview .site-popup {
  position: static;
  margin: 0 auto;
}
/* Region styles (footer ribbon) override the popup text; win explicitly */
.site-popup .site-popup__text,
.site-popup .site-popup__text * {
  font-size: 1.0625rem !important;
  line-height: 1.55 !important;
  white-space: normal !important;
}
.site-popup a.site-popup__cta {
  padding: 0.55em 1.4em !important;
  font-family: Oswald, "Arial Narrow", sans-serif !important;
  font-size: 1.5rem !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

