.cms-popup{box-sizing:border-box;color:#17212b;background:#fff;font:16px/1.5 system-ui,-apple-system,sans-serif;border:0;border-radius:18px;padding:0;width:min(var(--popup-width,440px),calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:calc(100dvh - 32px);overflow:auto;box-shadow:0 16px 64px #0003;text-align:left;z-index:1055}
.cms-popup *, .cms-popup *::before,.cms-popup *::after{box-sizing:border-box}
.cms-popup::backdrop{background:#0c182bb3}.cms-popup--clear::backdrop{background:transparent}
.cms-popup__close{position:absolute;top:8px;right:8px;width:36px;height:36px;border:1px solid #d9dfe5;border-radius:50%;background:#fff;color:#17212b;font:26px/1 system-ui;cursor:pointer;z-index:2;box-shadow:0 2px 8px #0002}
.cms-popup__close:focus-visible,.cms-popup__action:focus-visible{outline:3px solid #0077cc;outline-offset:3px}
.cms-popup__image{display:block;width:100%;height:auto;max-height:65dvh;object-fit:contain;margin:0}
.cms-popup__copy{padding:24px}.cms-popup__copy:empty{display:none}.cms-popup__heading{font:700 23px/1.25 system-ui;margin:0 24px 12px 0;color:inherit}.cms-popup__text{font:inherit;margin:0 0 18px;white-space:pre-line;color:inherit}
.cms-popup__action{display:inline-flex;justify-content:center;background:#126b42;color:white!important;text-decoration:none;border-radius:10px;padding:12px 20px;font:600 15px/1.3 system-ui;max-width:100%;overflow-wrap:anywhere}
.cms-popup__form{margin-top:16px}.cms-popup__form form{margin:0}.cms-popup__form input,.cms-popup__form textarea,.cms-popup__form select{max-width:100%}
.cms-popup--corner,.cms-popup--contact{position:fixed;margin:0;inset:auto 20px 20px auto}
.cms-popup[data-position="bottom-left"]{inset:auto auto 0px 0px}.cms-popup[data-position="top-right"]{inset:0px 0px auto auto}.cms-popup[data-position="top-left"]{inset:0px auto auto 0px}
dialog.cms-popup{position:fixed;inset:0;margin:auto}
.cms-popup--contact{background:transparent;box-shadow:none;overflow:visible}.cms-popup--contact .cms-popup__content{display:flex;flex-direction:column-reverse;align-items:flex-end;max-height:calc(100dvh - 32px);overflow:auto;padding:4px}
.cms-popup--contact .cms-popup__image{width:150px;max-width:55%;max-height:30dvh;object-fit:contain;object-position:bottom}
.cms-popup--contact .cms-popup__copy{background:#fff;border-radius:18px;box-shadow:0 6px 24px #0002;padding:22px;margin-bottom:10px;position:relative;width:100%}
.cms-popup--contact .cms-popup__copy::after{content:"";position:absolute;bottom:-10px;right:45px;border:10px solid transparent;border-top-color:white;border-bottom:0}
.cms-popup--contact .cms-popup__close{top:10px;right:10px}
.cms-popup--fullscreen{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;background:#10151b;color:white}
.cms-popup--fullscreen .cms-popup__content{min-height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}.cms-popup--fullscreen .cms-popup__image{width:100%;max-height:80dvh;object-fit:contain}.cms-popup--fullscreen .cms-popup__copy{text-align:center}
@media(max-width:767px){.cms-popup{width:min(var(--popup-mobile-width,300px),calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}.cms-popup--corner,.cms-popup--contact{inset:auto 12px 12px auto}.cms-popup[data-mobile-position="bottom-left"]{inset:auto auto 12px 12px}.cms-popup[data-mobile-position="bottom-right"]{inset:auto 12px 12px auto}.cms-popup[data-mobile-position="top-right"]{inset:12px 12px auto auto}.cms-popup[data-mobile-position="top-left"]{inset:12px auto auto 12px}dialog.cms-popup{inset:0}.cms-popup--fullscreen{width:100vw;max-width:100vw;max-height:100dvh}.cms-popup__copy{padding:20px}.cms-popup__heading{font-size:20px}}
/* Image sizing remains independent of the popup width and preserves proportions. */
.cms-popup .cms-popup__image{width:var(--popup-image-width,100%);min-width:min(100%,var(--popup-image-min,0px));max-width:min(100%,var(--popup-image-max,100%));height:auto;margin-inline:auto;flex-shrink:0}
.cms-popup--contact .cms-popup__image{margin-inline:0}
.cms-popup--bleed{border-radius:0;box-shadow:none;max-width:100vw;max-height:100dvh;width:min(var(--popup-width,440px),100vw);inset:auto 0 0 auto}
.cms-popup--bleed[data-position="bottom-left"]{inset:auto auto 0 0}.cms-popup--bleed[data-position="top-right"]{inset:0 0 auto auto}.cms-popup--bleed[data-position="top-left"]{inset:0 auto auto 0}
.cms-popup--bleed .cms-popup__image{border-radius:0}
.cms-popup--contact.cms-popup--bleed .cms-popup__content{padding:0;max-height:100dvh}
.cms-popup--contact.cms-popup--bleed[data-position$="left"] .cms-popup__content{align-items:flex-start}
.cms-popup--contact.cms-popup--bleed[data-position^="top"] .cms-popup__content{flex-direction:column}
.cms-popup--contact.cms-popup--bleed[data-position^="top"] .cms-popup__copy{margin-block:10px 0}
.cms-popup--contact.cms-popup--bleed[data-position^="top"] .cms-popup__copy::after{top:-10px;bottom:auto;transform:rotate(180deg)}
@media(max-width:767px){
  .cms-popup--bleed{width:min(var(--popup-mobile-width,300px),100vw)}
  .cms-popup--bleed[data-mobile-position="bottom-right"]{inset:auto 0 0 auto}.cms-popup--bleed[data-mobile-position="bottom-left"]{inset:auto auto 0 0}.cms-popup--bleed[data-mobile-position="top-right"]{inset:0 0 auto auto}.cms-popup--bleed[data-mobile-position="top-left"]{inset:0 auto auto 0}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position$="left"] .cms-popup__content{align-items:flex-start}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position$="right"] .cms-popup__content{align-items:flex-end}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="top"] .cms-popup__content{flex-direction:column}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="bottom"] .cms-popup__content{flex-direction:column-reverse}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="top"] .cms-popup__copy{margin-block:10px 0}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="bottom"] .cms-popup__copy{margin-block:0 10px}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="top"] .cms-popup__copy::after{top:-10px;bottom:auto;transform:rotate(180deg)}
  .cms-popup--contact.cms-popup--bleed[data-mobile-position^="bottom"] .cms-popup__copy::after{top:auto;bottom:-10px;transform:none}
}
/* Transform only for the entrance; the settled popup keeps its normal geometry. */
.cms-popup{--popup-enter-x:0px;--popup-enter-y:0px;--popup-fold-x:0deg;--popup-fold-y:0deg;--popup-fold-origin:50% 50%}
.cms-popup[data-enter-edge="left"]{--popup-enter-x:calc(-100vw - 100%);--popup-fold-y:78deg;--popup-fold-origin:0% 50%}
.cms-popup[data-enter-edge="right"]{--popup-enter-x:calc(100vw + 100%);--popup-fold-y:-78deg;--popup-fold-origin:100% 50%}
.cms-popup[data-enter-edge="top"]{--popup-enter-y:calc(-100vh - 100%);--popup-fold-x:-78deg;--popup-fold-origin:50% 0%}
.cms-popup[data-enter-edge="bottom"]{--popup-enter-y:calc(100vh + 100%);--popup-fold-x:78deg;--popup-fold-origin:50% 100%}
@media(prefers-reduced-motion:no-preference){
  .cms-popup[data-entrance="fade"],.cms-popup[data-entrance="book"]{animation:cms-popup-fade var(--popup-enter-duration,600ms) ease-out backwards}
  .cms-popup[data-entrance="slide"]{animation:cms-popup-slide var(--popup-enter-duration,600ms) cubic-bezier(.16,1,.3,1) backwards}
  .cms-popup[data-entrance="book"].cms-popup--image-ready .cms-popup__image,
  .cms-popup[data-entrance="book"].cms-popup--no-image .cms-popup__content{
    transform-origin:var(--popup-fold-origin);
    animation:cms-popup-book var(--popup-enter-duration,600ms) cubic-bezier(.2,.7,.2,1) backwards;
  }
  .cms-popup[data-entrance="book"].cms-popup--image-ready .cms-popup__image{
    animation-name:cms-popup-book,cms-popup-colors;
  }
  .cms-popup[data-entrance="slide"]::backdrop,.cms-popup[data-entrance="fade"]::backdrop,.cms-popup[data-entrance="book"]::backdrop{
    animation:cms-popup-fade var(--popup-enter-duration,600ms) ease-out backwards;
  }
  @keyframes cms-popup-fade{from{opacity:0}to{opacity:1}}
  @keyframes cms-popup-slide{from{opacity:0;transform:translate3d(var(--popup-enter-x),var(--popup-enter-y),0)}to{opacity:1;transform:translate3d(0,0,0)}}
  @keyframes cms-popup-book{
    0%{transform:perspective(900px) rotateX(var(--popup-fold-x)) rotateY(var(--popup-fold-y)) scale(.84);opacity:0}
    18%{opacity:1}
    100%{transform:perspective(900px) rotateX(0deg) rotateY(0deg) scale(1);opacity:1}
  }
  @keyframes cms-popup-colors{
    0%,16%{filter:brightness(0) invert(1) saturate(0)}
    48%{filter:brightness(1.8) invert(0) saturate(.2)}
    100%{filter:brightness(1) invert(0) saturate(1)}
  }
}

/* A constrained image still touches the chosen outer edge in bleed mode. */
.cms-popup--bleed .cms-popup__image{margin-left:auto;margin-right:0;object-position:right bottom}
.cms-popup--bleed[data-position$="left"] .cms-popup__image{margin-left:0;margin-right:auto;object-position:left bottom}
.cms-popup--bleed[data-position="top-right"] .cms-popup__image{object-position:right top}.cms-popup--bleed[data-position="top-left"] .cms-popup__image{object-position:left top}
@media(max-width:767px){
.cms-popup--bleed[data-mobile-position$="right"] .cms-popup__image{margin-left:auto;margin-right:0;object-position:right bottom}
.cms-popup--bleed[data-mobile-position$="left"] .cms-popup__image{margin-left:0;margin-right:auto;object-position:left bottom}
.cms-popup--bleed[data-mobile-position="top-right"] .cms-popup__image{object-position:right top}.cms-popup--bleed[data-mobile-position="top-left"] .cms-popup__image{object-position:left top}
}
