/* ============================================================
   PCS Single Product CSS (clean, no duplicates)
   - Email product (CF7) modal styles
   - PCS Design modal (iframe) styles
   ============================================================ */
 

/* -------------------------
   CTA button (page)
-------------------------- */
.pcs-design-cta-wrap {
  padding: 18px 0;
}

.pcs-design-btn {
  padding: 12px 26px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* ============================================================
   PCS DESIGN MODAL (iframe)
   IMPORTANT: modal should be appended to <body> via JS
============================================================ */

/* Backdrop: less confusing, stable */
.modal-backdrop.show {
  opacity: .65 !important;
}

/* Ensure modal is above backdrop (Bootstrap default z-indexes) */
#pcs_design_modal {
  z-index: 1060 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

/* Make the dialog responsive and wide */
.pcs-design-dialog {
  width: calc(100vw - 24px);
  max-width: 1280px;
  margin: 12px auto;
}

/* Don’t vertically center on smaller screens (prevents clipping) */
@media (max-width: 992px) {
  #pcs_design_modal .modal-dialog-centered {
    align-items: flex-start;
  }
}

/* Modal content uses viewport height safely */
#pcs_design_modal .modal-content {
  height: calc(100vh - 24px);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header */
#pcs_design_modal .modal-header {
  padding: 12px 18px;
  flex: 0 0 auto;
  align-items: center;
}

#pcs_design_modal .modal-title {
  font-weight: 600;
  font-size: 16px;
  margin: 0;
}

#pcs_design_modal .close {
  opacity: 1;
  text-shadow: none;
}

/* Body fills remaining space; iframe fills body */
#pcs_design_modal .modal-body,
.pcs-iframe-modal-body {
  padding: 0;
  flex: 1 1 auto;
  min-height: 0;
  /* IMPORTANT for flex layouts */
  overflow: hidden;
}

#pcs_iframe,
.pcs-design-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}


.page-wrapper {
  z-index: unset;
}

/* Full-viewport overlay for cross-origin iframe customizer */
/* ============================================================
   PCS DESIGN OVERLAY (centered modal + single scroll)
============================================================ */

/* Backdrop */
#pcs_design_overlay.pcs-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(0, 0, 0, .55);

  display: none;
  align-items: center;
  /* vertical center */
  justify-content: center;
  /* horizontal center */
  padding: 24px;
}

#pcs_design_overlay.pcs-overlay.is-open {
  display: flex;
}

/* Panel (modal) */
#pcs_design_overlay .pcs-overlay-panel {
  width: min(1200px, 100%);
  height: calc(100vh - 48px);
  max-height: calc(100vh - 48px);

  background: #fff;
  border-radius: 10px;
  overflow: hidden;

  /* force center */
  position: relative;
  margin: 0 auto !important;

  display: flex;
  flex-direction: column;
}

/* Header */
#pcs_design_overlay .pcs-overlay-header {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 14px;
  border-bottom: 1px solid #e9e9e9;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px
}

#pcs_design_overlay .pcs-overlay-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

#pcs_design_overlay .pcs-overlay-close {
  border: 0;
  background: transparent;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* IMPORTANT: no scroll here (so no double scroll) */
#pcs_design_overlay .pcs-overlay-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  /* only iframe scroll */
  padding: 5px;
}

/* iframe is the only scroll */
#pcs_design_overlay .pcs-overlay-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* Lock background scroll */
body.pcs-scroll-lock {
  overflow: hidden !important;
  height: 100% !important;
}

/* ===== PCS overlay: HARD scroll lock (prevents background scroll) ===== */
html.pcs-scroll-lock,
body.pcs-scroll-lock {
  overflow: hidden !important;
  height: 100% !important;
}

/* Porto/VC themes sometimes scroll on wrappers */
body.pcs-scroll-lock .page-wrapper,
body.pcs-scroll-lock #page,
body.pcs-scroll-lock .vc_transform,
body.pcs-scroll-lock .vc_transform *,
body.pcs-scroll-lock .porto-wrapper {
  overflow: hidden !important;
}

/* When we use position:fixed lock, keep layout stable */
body.pcs-scroll-lock {
  position: fixed !important;
  width: 100% !important;
  left: 0;
}

.body-lock .pcs-overlay-body {
  overflow: hidden !important;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: auto;
  touch-action: none;
}