@charset "utf-8";
/* CSS Document */
#buyBtn{
    /* display: inline-block; */
    padding: 11px 22px;
    border-radius: 10px;
    border: 0;
/*    font-size: 1.05rem;*/
    /* background: #4ba913; */
    /* color: #fff; */
    cursor: pointer;
    /* box-shadow: 2px 2px 2px black; */
/*    float: right;*/
    /* position-anchor: auto; */
    /* position: fixed; */
    /* right: 10px; */
    /* top: 60px; */
    z-index: 1111111;
    color:white!important;
    margin-right: 7px;
    background: #19b310;
    color: white;
    border-color: #183a1e;
}

#buyMessage {
/*    display: flex;*/
    float: right;
    font-size: 22px;
    font-weight: 500;
    margin-left: 10px;
    /* align-content: space-around; */
/*    justify-content: flex-start;*/
}

#instandDownloadText {
    font-size: 16px;
}

#lowResText {
    font-size: 12px;
    font-style: italic;
}

#priceText{
    font-size: 24px;
    font-weight: bold;
}

dialog#checkoutModal::backdrop {
background: rgba(0,0,0,.5);

}
dialog#checkoutModal {
    border: 0;
    padding: 0;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 96vw;
    width: min(520px, 96vw);
    margin: 0 auto;
    top:10%;
}
.modal-card {
    padding: 10px;
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.modal-header button {
    border: 0;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
}
.sec {
    margin-top: 14px;
}
.hint {
    font-size: .9rem;
    color: #666;
}
/* Card section expands when the button is clicked */
#cardSection {
    overflow: hidden;
    transition: max-height .35s ease;
    max-height: 80px;
}
#checkoutModal.expanded #cardSection {
    max-height: 690px;
} /* room for the card fields */
.hidden {
    display: none;
}
#checkoutModal,
.my-checkout-overlay,
.modal-overlay {
  z-index: 9999 !important; /* PayPal overlay uses ~2147483647 */
}

/* When a PayPal/Cardinal 3DS overlay is present, hide YOUR overlays
   (fix: include #checkoutModal after BOTH :has(...) selectors) */
html:has([id^="paypal-overlay-"].paypal-checkout-sandbox) #checkoutModal,
html:has([id^="paypal-overlay-"].paypal-checkout-sandbox) .my-checkout-overlay,
html:has([id^="paypal-overlay-"].paypal-checkout-sandbox) .modal-overlay,
html:has(iframe[src*="cardinalcommerce"]) #checkoutModal,
html:has(iframe[src*="cardinalcommerce"]) .my-checkout-overlay,
html:has(iframe[src*="cardinalcommerce"]) .modal-overlay,
html:has(iframe[src*="helios"]) #checkoutModal,
html:has(iframe[src*="helios"]) .my-checkout-overlay,
html:has(iframe[src*="helios"]) .modal-overlay {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* IMPORTANT: remove the <dialog> backdrop while 3DS is active */
html:has([id^="paypal-overlay-"].paypal-checkout-sandbox) #checkoutModal::backdrop,
html:has(iframe[src*="cardinalcommerce"]) #checkoutModal::backdrop,
html:has(iframe[src*="helios"]) #checkoutModal::backdrop {
  background: transparent !important;
}

      /* If you also use a non-dialog dimmer, disable it while 3DS is active */
.pp-3ds-active .modal-overlay,
.pp-3ds-active .overlay,
.pp-3ds-active .backdrop {
  opacity: 0 !important;
  pointer-events: none !important;
}
      
/* Optional: ensure PayPal’s top-level overlay stays above everything without
   touching normal button iframes (note the 'body >' root-only scope) */
body > .xcomponent-overlay,
body > .xcomponent-popup,
body > .xcomponent-outlet,
body > [id^="paypal-overlay-"].paypal-checkout-sandbox {
  position: fixed !important;
  z-index: 2147483647 !important;
}  

/* refactored with chatGPT — 08 Nov 2025, 07:46 UK */

#modal-root {
  position: fixed;
  inset: 0;
  display: none;            /* hidden by default */
  z-index: 10000;           /* above Leaflet controls etc. */
}

#modal-root.is-open { display: block; }

#modal-root .modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55); /* transparent overlay */
}

#modal-root .modal-window {
  position: absolute;
  width: 70vw;
  height: 70vh;
  max-width: 1200px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 12px;
  overflow: hidden; /* keeps rounded corners with internal scroll */
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
}

.modal-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #0b5ed7;   /* tweak to your brand */
  color: #fff;
}

.modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.modal-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.modal-content {
  padding: 16px;
  overflow: auto; /* vertical scroll for content */
  flex: 1;
}

/* Simple form styling */
#modal-root form label {
  display: block;
  margin: 10px 0 6px;
  font-weight: 600;
}
#modal-root input[type="text"],
#modal-root input[type="email"],
#modal-root textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font: inherit;
}
#modal-root button[type="submit"] {
  margin-top: 12px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: #0b5ed7;
  color: #fff;
  cursor: pointer;
}

/* Container that clips overflow so the image never scales too small */
.modal-hero {
  width: 100%;
  /* pick a sensible visible height; adjust to taste */
/*  height: min(45vh, 600px);*/
  min-height: 240px;
  overflow: hidden;           /* hides the cropped parts */
  border-radius: 8px;         /* optional, matches modal aesthetics */
  margin: 0 0 16px 0;         /* spacing under the image */
}

/* The image fills the container and is cropped instead of shrinking */
.modal-hero > img {
  display: block;
  width: 100%;
  height: 250px;
  object-fit: cover;          /* fills width + height, preserves aspect, crops overflow */
}

/* Optional: full-bleed variant if you want the image to ignore modal padding */
.modal-content.fullbleed {
  padding: 0;
}
.modal-content.fullbleed .modal-hero {
  border-radius: 0;
  margin: 0;
}
