/* Scoped to the CertWay popup: no theme/Tutor/WooCommerce element overrides. */
.cwpp-modal {
  box-sizing: border-box;
  border: 0;
  padding: 0;
  width: min(var(--cwpp-width), calc(100vw - 32px));
  max-width: var(--cwpp-width);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: var(--cwpp-radius);
  background: var(--cwpp-popup-bg, var(--cwpp-bg));
  color: var(--cwpp-text);
  box-shadow: var(--cwpp-popup-shadow, 0 30px 100px rgba(0,16,50,.25));
  font-family: inherit;
  line-height: 1.5;
  isolation: isolate;
}
.cwpp-modal::backdrop {background: rgba(0,12,38,var(--cwpp-backdrop-opacity, var(--cwpp-overlay)));}
.cwpp-modal *,.cwpp-modal *::before,.cwpp-modal *::after {box-sizing: border-box;}
.cwpp-modal .cwpp-layout {display: flex; flex-direction: column; width:100%;}
.cwpp-modal .cwpp-image {width:100%; height:var(--cwpp-image-height); min-height:0; overflow:hidden; background:var(--cwpp-image-bg,#edf3fa);}
.cwpp-modal .cwpp-image img {width:100%; height:100%; max-width:100%; display:block; object-position:center; border-radius:var(--cwpp-image-radius);}
.cwpp-modal.cwpp-fit-cover .cwpp-image img {object-fit:cover;}
.cwpp-modal.cwpp-fit-contain .cwpp-image img {object-fit:contain;}
.cwpp-modal .cwpp-content {padding:var(--cwpp-padding); text-align:center; min-width:0;}
.cwpp-modal h2 {font:inherit; font-size:var(--cwpp-title-size); font-weight:800; color:var(--cwpp-text); line-height:1.2; margin:0 0 14px; overflow-wrap:anywhere;}
.cwpp-modal p {font:inherit; color:var(--cwpp-text); font-size:var(--cwpp-body-size); line-height:1.6; margin:0 0 22px; overflow-wrap:anywhere;}
.cwpp-modal .cwpp-cta {
  display:inline-flex; justify-content:center; align-items:center; gap:9px; padding:12px 24px;
  border-radius:10px; background:var(--cwpp-accent); color:var(--cwpp-button-text);
  font-size:15px; font-weight:750; text-decoration:none !important; border:0; line-height:1.4;
  transition:transform .16s ease, filter .16s ease;
}
.cwpp-modal .cwpp-cta:hover {transform:translateY(-1px); filter:brightness(.94); color:var(--cwpp-button-text);}
.cwpp-modal .cwpp-cta:focus-visible,.cwpp-modal .cwpp-close:focus-visible {outline:3px solid var(--cwpp-accent); outline-offset:3px;}
/* v1.6: isolate the close control from theme/Elementor global button rules.
   A 10px visual button still has an invisible >=32px touch target. */
.cwpp-modal button.cwpp-close {
  all:unset; box-sizing:border-box !important;
  position:absolute !important; z-index:20; inset:auto;
  top:var(--cwpp-close-offset-v,12px);right:var(--cwpp-close-offset-h,12px);
  width:var(--cwpp-close-size,36px) !important;height:var(--cwpp-close-size,36px) !important;
  min-width:0 !important;min-height:0 !important;max-width:none !important;max-height:none !important;
  display:grid !important;place-items:center !important;
  background:var(--cwpp-close-bg,rgba(11,30,62,.82)) !important;
  background-image:none !important;
  border:var(--cwpp-close-border-width,1px) solid var(--cwpp-close-border-color,#fff) !important;
  border-radius:var(--cwpp-close-radius,50%) !important;
  color:var(--cwpp-close-icon-color,#fff) !important;
  padding:0 !important;margin:0 !important;
  box-shadow:none !important;text-transform:none !important;
  cursor:pointer; opacity:1 !important; visibility:visible !important;
  transition:background-color .18s ease,border-color .18s ease,color .18s ease;
}
.cwpp-modal button.cwpp-close:hover {
  background:var(--cwpp-close-hover-bg,rgba(20,84,162,1)) !important;
  border:var(--cwpp-close-hover-border-width,1px) solid var(--cwpp-close-hover-border-color,#fff) !important;
  color:var(--cwpp-close-hover-icon-color,#fff) !important;
  box-shadow:none !important;
}
.cwpp-modal button.cwpp-close:focus-visible {outline:2px solid #19a7ed !important;outline-offset:2px !important;}
.cwpp-modal button.cwpp-close .cwpp-close-x {
  display:block !important; flex:none;
  width:min(var(--cwpp-close-icon-size,27px),calc(var(--cwpp-close-size,36px) - 2px)) !important;
  height:min(var(--cwpp-close-icon-size,27px),calc(var(--cwpp-close-size,36px) - 2px)) !important;
  stroke:currentColor !important;stroke-width:2.6;stroke-linecap:round;
  fill:none !important;pointer-events:none;
}
.cwpp-modal button.cwpp-close::before {content:none !important;}
.cwpp-modal button.cwpp-close::after {
  content:"" !important;position:absolute;left:50%;top:50%;
  width:max(32px,100%);height:max(32px,100%);
  transform:translate(-50%,-50%); background:transparent !important;
  border:0 !important;pointer-events:auto;
}
.cwpp-modal.cwpp-close-place-top_left .cwpp-close {top:var(--cwpp-close-offset-v,12px);left:var(--cwpp-close-offset-h,12px);right:auto;bottom:auto;}
.cwpp-modal.cwpp-close-place-top_right .cwpp-close {top:var(--cwpp-close-offset-v,12px);right:var(--cwpp-close-offset-h,12px);left:auto;bottom:auto;}
.cwpp-modal.cwpp-close-place-bottom_left .cwpp-close {bottom:var(--cwpp-close-offset-v,12px);left:var(--cwpp-close-offset-h,12px);top:auto;right:auto;}
.cwpp-modal.cwpp-close-place-bottom_right .cwpp-close {bottom:var(--cwpp-close-offset-v,12px);right:var(--cwpp-close-offset-h,12px);top:auto;left:auto;}
.cwpp-modal.cwpp-layout-side .cwpp-layout {flex-direction:row; align-items:stretch;}
.cwpp-modal.cwpp-layout-side .cwpp-image {flex:0 0 var(--cwpp-side-width); width:var(--cwpp-side-width); height:auto; min-height:320px;}
.cwpp-modal.cwpp-layout-side .cwpp-content {flex:1; display:flex; flex-direction:column; justify-content:center; align-items:center;}
.cwpp-modal.cwpp-layout-side .cwpp-content p {width:100%;}
@media(max-width:620px){
  .cwpp-modal {width:calc(100vw - 24px); max-height:calc(100dvh - 24px);}
  .cwpp-modal .cwpp-image,.cwpp-modal.cwpp-layout-side .cwpp-image {height:var(--cwpp-mobile-image-height); min-height:0; width:100%; flex:auto;}
  .cwpp-modal.cwpp-layout-side .cwpp-layout {flex-direction:column;}
  .cwpp-modal .cwpp-content {padding:min(var(--cwpp-padding),24px);}
  .cwpp-modal h2 {font-size:clamp(19px,5.1vw,var(--cwpp-title-size));}
  .cwpp-modal .cwpp-cta {width:100%;}
  /* Respect the saved position/offset on mobile as well. */
}
@media(prefers-reduced-motion:reduce){.cwpp-modal .cwpp-cta {transition:none;}}

/* v1.2: make either the image or CTA a real accessible destination. */
.cwpp-modal .cwpp-image-link { display:block; width:100%; height:100%; cursor:pointer; }
.cwpp-modal .cwpp-image-link img { display:block; width:100%; height:100%; }
.cwpp-modal .cwpp-image-link:focus-visible { outline:3px solid var(--cwpp-accent); outline-offset:-3px; }

/* Placement is separate from the existing image arrangement (top/left). */
.cwpp-modal.cwpp-position-bottom_right,
.cwpp-modal.cwpp-position-bottom_left,
.cwpp-modal.cwpp-position-top_bar,
.cwpp-modal.cwpp-position-bottom_bar {
  position:fixed;
  z-index:2147483000;
  inset:auto;
  margin:0;
  max-height:min(80dvh, 760px);
  overscroll-behavior:contain;
}
.cwpp-modal.cwpp-position-bottom_right {
  bottom:var(--cwpp-edge-gap);right:var(--cwpp-edge-gap);left:auto;top:auto;
  width:min(var(--cwpp-width),calc(100vw - var(--cwpp-edge-gap) * 2));
}
.cwpp-modal.cwpp-position-bottom_left {
  bottom:var(--cwpp-edge-gap);left:var(--cwpp-edge-gap);right:auto;top:auto;
  width:min(var(--cwpp-width),calc(100vw - var(--cwpp-edge-gap) * 2));
}
.cwpp-modal.cwpp-position-top_bar,
.cwpp-modal.cwpp-position-bottom_bar {
  width:100vw; max-width:100vw; left:0; right:0;
  border-radius:0;
  max-height:min(75dvh, 640px);
  box-shadow:var(--cwpp-bar-shadow,0 10px 38px rgba(0,16,50,.25));
}
.cwpp-modal.cwpp-position-top_bar {top:0;bottom:auto;}
.cwpp-modal.cwpp-position-bottom_bar {bottom:0;top:auto;}
.cwpp-modal.cwpp-position-top_bar .cwpp-layout,
.cwpp-modal.cwpp-position-bottom_bar .cwpp-layout {
  flex-direction:row; align-items:center;
}
.cwpp-modal.cwpp-position-top_bar .cwpp-image,
.cwpp-modal.cwpp-position-bottom_bar .cwpp-image {
  flex:1 1 56%; width:auto; height:min(var(--cwpp-image-height),360px); min-height:90px;
}
.cwpp-modal.cwpp-position-top_bar .cwpp-content,
.cwpp-modal.cwpp-position-bottom_bar .cwpp-content {
  flex:1 1 44%; padding:clamp(14px,2.4vw,var(--cwpp-padding));
  min-width:0; display:flex; flex-direction:column; justify-content:center; align-items:center;
}
/* An image-only banner fills the whole viewport width, not half of it. */
.cwpp-modal.cwpp-position-top_bar .cwpp-image:only-child,
.cwpp-modal.cwpp-position-bottom_bar .cwpp-image:only-child {
  flex:1 1 100%; width:100%;
}
/* Unlike center modal, the new edge banners do not dim/block the page. */
.cwpp-modal.cwpp-position-bottom_right::backdrop,
.cwpp-modal.cwpp-position-bottom_left::backdrop,
.cwpp-modal.cwpp-position-top_bar::backdrop,
.cwpp-modal.cwpp-position-bottom_bar::backdrop { background:transparent; }
@media(max-width:620px) {
  .cwpp-modal.cwpp-position-bottom_right,
  .cwpp-modal.cwpp-position-bottom_left {
    width:calc(100vw - 24px);left:12px;right:12px;bottom:12px;
    max-height:72dvh;
  }
  .cwpp-modal.cwpp-position-top_bar,
  .cwpp-modal.cwpp-position-bottom_bar {width:100vw;left:0;right:0;max-height:70dvh;}
  .cwpp-modal.cwpp-position-top_bar .cwpp-layout,
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-layout {flex-direction:column;}
  .cwpp-modal.cwpp-position-top_bar .cwpp-image,
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-image {
    flex:0 0 auto;width:100%;height:min(var(--cwpp-mobile-image-height),260px);min-height:0;
  }
  .cwpp-modal.cwpp-position-top_bar .cwpp-content,
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-content {flex:0 0 auto;width:100%;padding:12px 48px 12px 16px;}
  .cwpp-modal.cwpp-position-top_bar .cwpp-content p,
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-content p {margin-bottom:8px;}
  .cwpp-modal.cwpp-position-top_bar .cwpp-cta,
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-cta {width:auto;}
}

/* v1.3 Auto Adapt: preserve the full image at its intrinsic aspect ratio.
 * Image height settings become upper bounds, never crop boxes. */
.cwpp-modal.cwpp-fit-auto .cwpp-image {
  display:flex;justify-content:center;align-items:center;
  height:auto;min-height:0;overflow:hidden;
}
.cwpp-modal.cwpp-fit-auto .cwpp-image-link {
  display:flex;align-items:center;justify-content:center;
  height:auto;width:100%;
}
.cwpp-modal.cwpp-fit-auto .cwpp-image img,
.cwpp-modal.cwpp-fit-auto .cwpp-image-link img {
  display:block;width:auto;height:auto;max-width:100%;
  max-height:min(var(--cwpp-image-height),60dvh);
  object-fit:contain;object-position:center;
  margin-left:auto;margin-right:auto;
}
.cwpp-modal.cwpp-layout-side.cwpp-fit-auto .cwpp-image {min-height:0;align-self:center;}
.cwpp-modal.cwpp-layout-side.cwpp-fit-auto .cwpp-image:only-child {
  flex:1 1 100%;width:100%;
}
.cwpp-modal.cwpp-position-top_bar.cwpp-fit-auto .cwpp-image,
.cwpp-modal.cwpp-position-bottom_bar.cwpp-fit-auto .cwpp-image {height:auto;min-height:0;}
@media(max-width:620px){
  .cwpp-modal.cwpp-fit-auto .cwpp-image,
  .cwpp-modal.cwpp-position-top_bar.cwpp-fit-auto .cwpp-image,
  .cwpp-modal.cwpp-position-bottom_bar.cwpp-fit-auto .cwpp-image {height:auto;min-height:0;}
  .cwpp-modal.cwpp-fit-auto .cwpp-image img,
  .cwpp-modal.cwpp-fit-auto .cwpp-image-link img {
    width:auto;height:auto;max-height:min(var(--cwpp-mobile-image-height),50dvh);
  }
}

/* v1.7: true transparency + separate hover and keyboard-focus behavior. */
.cwpp-modal { background-color:var(--cwpp-popup-bg,var(--cwpp-bg)) !important; background-image:none !important; }
.cwpp-modal .cwpp-image { background:var(--cwpp-image-bg,#edf3fa) !important; }
.cwpp-modal::backdrop { background:rgba(0,12,38,var(--cwpp-backdrop-opacity,var(--cwpp-overlay))) !important; }
.cwpp-modal button.cwpp-close {transition:background-color .18s,border-color .18s,color .18s,transform .22s !important; }
.cwpp-modal.cwpp-hover-scale button.cwpp-close:hover {transform:scale(1.09) !important;}
.cwpp-modal.cwpp-hover-rotate button.cwpp-close:hover .cwpp-close-x {transform:rotate(90deg);}
.cwpp-modal.cwpp-hover-both button.cwpp-close:hover {transform:scale(1.09) !important;}
.cwpp-modal.cwpp-hover-both button.cwpp-close:hover .cwpp-close-x {transform:rotate(90deg);}
.cwpp-modal .cwpp-close-x {transition:transform .22s ease;}
@media(prefers-reduced-motion:reduce){
 .cwpp-modal button.cwpp-close,.cwpp-modal .cwpp-close-x {transition:none !important;}
 .cwpp-modal.cwpp-hover-scale button.cwpp-close:hover,.cwpp-modal.cwpp-hover-both button.cwpp-close:hover {transform:none !important;}
 .cwpp-modal.cwpp-hover-rotate button.cwpp-close:hover .cwpp-close-x,.cwpp-modal.cwpp-hover-both button.cwpp-close:hover .cwpp-close-x {transform:none !important;}
}

/* v1.8 Transparent PNG mode: remove all panel paint layers, not the artwork pixels. */
.cwpp-modal.cwpp-artwork-transparent {
  background:transparent!important;background-color:transparent!important;background-image:none!important;
  box-shadow:none!important;border-color:transparent!important;
}
.cwpp-modal.cwpp-artwork-transparent .cwpp-layout,
.cwpp-modal.cwpp-artwork-transparent .cwpp-image,
.cwpp-modal.cwpp-artwork-transparent .cwpp-image-link {
  background:transparent!important;background-image:none!important;box-shadow:none!important;
}
.cwpp-modal.cwpp-artwork-transparent.cwpp-position-top_bar,
.cwpp-modal.cwpp-artwork-transparent.cwpp-position-bottom_bar {box-shadow:none!important;}
.cwpp-modal.cwpp-image-only .cwpp-content {display:none!important;}
.cwpp-modal.cwpp-image-only.cwpp-layout-side .cwpp-image,
.cwpp-modal.cwpp-image-only.cwpp-position-top_bar .cwpp-image,
.cwpp-modal.cwpp-image-only.cwpp-position-bottom_bar .cwpp-image {
  flex:1 1 100%;width:100%;min-height:0;
}

/* v1.9.1: video uses its own max-size controls and always preserves the complete source frame. */
.cwpp-modal .cwpp-video[data-cwpp-video-frame] {
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  width:min(var(--cwpp-video-width,640px),100%);
  height:auto;
  max-width:100%;
  max-height:var(--cwpp-video-height,640px);
  min-height:0;
  margin-inline:auto;
  overflow:hidden;
  background:transparent !important;
  aspect-ratio:var(--cwpp-video-ratio,16 / 9);
}
.cwpp-modal .cwpp-video[data-cwpp-video-frame] video,
.cwpp-modal .cwpp-video[data-cwpp-video-frame] iframe {
  display:block;
  flex:0 0 auto;
  width:100%;
  height:100%;
  min-width:0;
  min-height:0;
  max-width:100%;
  max-height:100%;
  padding:0;
  margin:0;
  border:0;
  background:transparent !important;
}
.cwpp-modal .cwpp-video[data-cwpp-video-frame] video,
.cwpp-modal.cwpp-fit-cover .cwpp-video[data-cwpp-video-frame] video,
.cwpp-modal.cwpp-fit-contain .cwpp-video[data-cwpp-video-frame] video {object-fit:contain !important;}
.cwpp-modal.cwpp-layout-side .cwpp-video[data-cwpp-video-frame] {flex:0 0 auto;align-self:center;}
.cwpp-modal.cwpp-position-top_bar .cwpp-video[data-cwpp-video-frame],
.cwpp-modal.cwpp-position-bottom_bar .cwpp-video[data-cwpp-video-frame] {flex:0 0 auto;min-width:0;}
@media(max-width:620px){
  .cwpp-modal .cwpp-video[data-cwpp-video-frame] {
    max-width:min(var(--cwpp-mobile-video-width,360px),100%);
    max-height:min(var(--cwpp-mobile-video-height,640px),70dvh);
  }
  .cwpp-modal.cwpp-layout-side .cwpp-video[data-cwpp-video-frame] {align-self:center;}
  .cwpp-modal.cwpp-position-top_bar .cwpp-video[data-cwpp-video-frame],
  .cwpp-modal.cwpp-position-bottom_bar .cwpp-video[data-cwpp-video-frame] {flex:0 0 auto;width:auto;}
}
