/* Contact Popup Pro (GFLOW) */

:root{ --cpp-brand:#ff5a2a; --cpp-dark:#121a25; --cpp-btn-bg:var(--cpp-brand); --cpp-btn-txt:#ffffff; }

body.cpp-modal-open{ overflow:hidden; }

.cpp-overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.45);
  opacity:0; pointer-events:none; transition:opacity .2s ease;
  z-index:99998;
}
.cpp-modal{
  position:fixed; inset:0; display:flex; align-items:center; justify-content:center;
  opacity:0; pointer-events:none; transition:opacity .2s ease;
  z-index:99999;
  padding:16px;
}

#cppOverlay[aria-hidden="false"],
#cppModal[aria-hidden="false"]{ opacity:1; pointer-events:auto; }

.cpp-card{
  width:100%;
  max-width:520px;
  background:#fff;
  border-radius:16px;
  box-shadow:0 30px 80px rgba(0,0,0,.25);
  padding:22px 22px 18px;
  max-height:90vh;
  overflow:auto;
  position:relative;
  font-family:inherit;
}

.cpp-card h3{ margin:0 0 14px; color:#111; font-size:26px; }

.cpp-close{
  all:unset;
  position:absolute;
  top:14px;
  right:14px;
  cursor:pointer;
  font-size:22px;
  line-height:1;
  color:var(--cpp-brand) !important;
  padding:6px;
  border-radius:10px;
}
.cpp-close:hover{ background:rgba(255,90,42,.08); }

.cpp-field{ margin:12px 0; }
.cpp-field label{ display:block; font-weight:700; color:#111; margin:0 0 6px; }
.cpp-field label span{ color:#c00; }

.cpp-field input,
.cpp-field textarea{
  width:100%;
  border:1px solid rgba(0,0,0,.35);
  border-radius:8px;
  padding:12px 12px;
  font-size:16px;
  outline:none;
  box-sizing:border-box;
  background:#fff;
}

.cpp-field input:focus,
.cpp-field textarea:focus{
  border-color:rgba(255,90,42,.9);
  box-shadow:0 0 0 3px rgba(255,90,42,.18);
}

.cpp-phone-row{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Code SMALL, phone BIG (force it even if theme overwrites) */
.cpp-phone-code{
  width:72px !important;
  max-width:72px !important;
  flex:0 0 72px !important;
  text-align:center;
}
.cpp-phone-num{
  flex:1 1 auto !important;
  width:auto !important;
  min-width:0 !important;
}

.cpp-counter{ margin-top:6px; font-size:13px; color:#666; text-align:right; }

.cpp-error{
  display:none;
  margin-top:12px;
  padding:12px 14px;
  border-radius:10px;
  background:#ffecec;
  border:1px solid #ffb3b3;
  color:#b00020;
}

.cpp-submit{
  margin-top:14px;
  appearance:none;
  border:1px solid rgba(0,0,0,.2);
  border-radius:8px;
  padding:12px 18px;
  font-weight:800;
  letter-spacing:.5px;
  text-transform:uppercase;
  cursor:pointer;
  background:var(--cpp-btn-bg) !important;
  color:var(--cpp-btn-txt) !important;
  width:auto;
  max-width:100%;
  box-sizing:border-box;
}

.cpp-submit:disabled{ opacity:.7; cursor:not-allowed; }

.cpp-success{ display:none; margin-top:16px; }

.cpp-hp{ position:absolute; left:-9999px; width:1px; height:1px; overflow:hidden; }

@media (max-width:520px){
  .cpp-modal{ padding:14px; }
  .cpp-card{ padding:18px 16px 14px; border-radius:14px; max-height:92vh; }
  .cpp-card h3{ font-size:22px; }
  .cpp-field input,
  .cpp-field textarea{ font-size:14px; padding:11px 12px; }
  .cpp-submit{ width:100% !important; }
  .cpp-phone-row{ flex-direction:column; align-items:stretch; }
  .cpp-phone-code{ width:100% !important; max-width:none !important; }
  .cpp-phone-num{ width:100% !important; }
  .cpp-math-row{ flex-direction:column; align-items:stretch; }
  .cpp-math-q{ width:100%; justify-content:flex-start; }
}


/* Math check */
.cpp-math-row{ display:flex; align-items:center; gap:12px; }
.cpp-math-q{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border:1px solid rgba(0,0,0,.18);
  border-radius:12px;
  min-width:110px;
  font-weight:700;
  background:#fff;
}
.cpp-math input{
  flex:1;
}
.cpp-help{
  margin-top:6px;
  font-size:12px;
  color:#666;
}


/* ===== Compact modal overrides (v1.0.8) ===== */
.cpp-modal{ padding:16px !important; }
.cpp-modal .cpp-card{
  /* More compact on desktop */
  max-width:440px !important;
  width:min(440px, calc(100vw - 32px)) !important;
  padding:18px 18px 14px !important;
  max-height:88vh !important;
  border-radius:14px !important;
}
.cpp-modal .cpp-card h3#cppTitle{ font-size:20px !important; margin:0 40px 10px 0 !important; }
.cpp-modal label{ margin-top:10px !important; }
.cpp-modal input[type="text"],
.cpp-modal input[type="email"],
.cpp-modal input[type="tel"],
.cpp-modal textarea{
  padding:10px 12px !important;
  font-size:14px !important;
}
.cpp-modal textarea{
  min-height:96px !important;
  max-height:160px !important;
}
.cpp-modal .cpp-submit{
  padding:12px 14px !important;
  font-size:14px !important;
}

/* Close button: no box, brand color only */
.cpp-modal .cpp-close{
  all:unset;
  position:absolute !important;
  top:12px !important;
  right:12px !important;
  cursor:pointer !important;
  font-size:22px !important;
  line-height:1 !important;
  color:var(--cpp-brand) !important;
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
  padding:4px !important;
}
.cpp-modal .cpp-close:hover{ background:transparent !important; opacity:.75; }

/* Phone row stays proportional */
.cpp-modal .cpp-phone-row{ gap:10px !important; }
.cpp-modal .cpp-phone-code{ flex:0 0 72px !important; width:72px !important; }
.cpp-modal .cpp-phone-num{ flex:1 1 auto !important; width:auto !important; min-width:0 !important; }

/* Math check compact */
.cpp-modal .cpp-math-row{ gap:10px !important; }
.cpp-modal .cpp-math-q{ flex:0 0 92px !important; }

@media (max-width: 520px){
  .cpp-modal .cpp-card{
    width:calc(100vw - 24px) !important;
    max-width:480px !important;
    padding:16px 14px 12px !important;
  }
  .cpp-modal .cpp-card h3#cppTitle{ font-size:18px !important; }
  .cpp-modal textarea{ min-height:86px !important; }
}

