/* ============================================================
   TechWyse — CTA standard popup (.twrb-pop)

   Printed by includes/class-cta-popup.php for a Popup-mode CTA,
   opened by assets/js/techwyse-cta-popup.js.

   Business-card layout: a white, rounded dialog over a dimmed,
   softly blurred page; a thin cobalt-to-green brand rule along
   the top edge (.twrb-pop__bar); an ink title and grey intro
   copy; bordered form fields with a cobalt focus ring; a green
   pill submit; and a light footer strip carrying the logo. The
   close button is a quiet round icon button in the top-right
   corner.

   Self-contained: it carries its own tokens and Poppins faces so
   it looks the same on every page family (core, ecom, guide).
   Every rule is prefixed with `.twrb-pop` so an Elementor kit's
   `h3` / `a` / `input` typography cannot outrank it. The form
   rules target Contact Form 7's markup plus the .twrb-pop-row /
   .twrb-pop-choice / .twrb-pop-submit helpers used by
   docs/contact-form-7-cta-popup.md.
   ============================================================ */

@font-face{font-family:"Poppins";src:url("../fonts/Poppins-Regular.woff") format("woff"),url("../fonts/Poppins-Regular.ttf") format("truetype");font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("../fonts/Poppins-Medium.woff") format("woff"),url("../fonts/Poppins-Medium.ttf") format("truetype");font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:"Poppins";src:url("../fonts/Poppins-SemiBold.woff") format("woff"),url("../fonts/Poppins-SemiBold.ttf") format("truetype");font-weight:600;font-style:normal;font-display:swap}

html.twrb-pop-lock,html.twrb-pop-lock body{overflow:hidden}

.twrb-pop{
  --twrb-pop-green:#8CC63E;
  --twrb-pop-green-dk:#76AE2C;
  --twrb-pop-blue:#1B3E93;
  --twrb-pop-ink:#141A24;
  --twrb-pop-text:#4A5363;
  --twrb-pop-muted:#8A929F;
  --twrb-pop-line:#D7DCE3;
  --twrb-pop-soft:#F5F7FA;
  --twrb-pop-error:#C62828;
  position:fixed;inset:0;z-index:999999;
  display:flex;align-items:center;justify-content:center;
  padding:24px 16px;box-sizing:border-box;
  font-family:"Poppins",sans-serif;
  opacity:0;visibility:hidden;
  transition:opacity .25s ease,visibility 0s linear .25s;
}
.twrb-pop[hidden]{display:none!important}
.twrb-pop.is-open{opacity:1;visibility:visible;transition:opacity .25s ease,visibility 0s}
.twrb-pop *,.twrb-pop *::before,.twrb-pop *::after{box-sizing:border-box}

.twrb-pop .twrb-pop__overlay{position:absolute;inset:0;background:rgba(10,14,22,.62);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);cursor:pointer}

.twrb-pop .twrb-pop__dialog{
  position:relative;width:100%;max-width:620px;max-height:100%;
  display:flex;flex-direction:column;
  overflow-y:auto;overscroll-behavior:contain;
  background:#fff;color:var(--twrb-pop-text);
  border-radius:16px;
  box-shadow:0 30px 80px -20px rgba(10,14,22,.45),0 0 0 1px rgba(10,14,22,.06);
  transform:translateY(14px) scale(.985);transition:transform .25s ease;
}
.twrb-pop.is-open .twrb-pop__dialog{transform:none}

/* brand rule along the top edge */
.twrb-pop .twrb-pop__bar{order:-1;flex:none;height:5px;background:linear-gradient(90deg,var(--twrb-pop-blue) 0%,#426FDB 55%,var(--twrb-pop-green) 100%)}

.twrb-pop .twrb-pop__close{
  position:absolute;top:18px;right:18px;z-index:2;
  width:38px;height:38px;min-width:0;min-height:0;padding:0;margin:0;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--twrb-pop-line);border-radius:50%;
  background:#fff;color:var(--twrb-pop-ink);box-shadow:none;
  cursor:pointer;
  transition:background-color .2s ease,border-color .2s ease,color .2s ease;
}
.twrb-pop .twrb-pop__close:hover,.twrb-pop .twrb-pop__close:focus-visible{background:var(--twrb-pop-soft);border-color:#C3CAD4;color:var(--twrb-pop-blue)}
.twrb-pop .twrb-pop__close:focus-visible{outline:2px solid var(--twrb-pop-blue);outline-offset:2px}
.twrb-pop .twrb-pop__close svg{display:block;width:18px;height:18px}

.twrb-pop .twrb-pop__body{flex:none;padding:36px 40px 34px;color:var(--twrb-pop-text)}
.twrb-pop .twrb-pop__title{margin:0 48px 10px 0;padding:0;font-family:inherit;font-size:26px;line-height:1.25;font-weight:600;color:var(--twrb-pop-ink);text-transform:none;letter-spacing:-.01em}
.twrb-pop .twrb-pop__content{margin:0 0 26px;font-size:15px;line-height:1.65;color:var(--twrb-pop-text)}
.twrb-pop .twrb-pop__title + .twrb-pop__form{margin-top:22px}
.twrb-pop .twrb-pop__content > :first-child{margin-top:0}
.twrb-pop .twrb-pop__content > :last-child{margin-bottom:0}
.twrb-pop .twrb-pop__content a{color:var(--twrb-pop-blue);text-decoration:underline;text-underline-offset:2px}
.twrb-pop .twrb-pop__body > :first-child:not(.twrb-pop__title){margin-top:28px}

.twrb-pop .twrb-pop__foot{display:flex;justify-content:flex-start;align-items:center;flex:none;min-height:0;padding:16px 40px;background:var(--twrb-pop-soft);border-top:1px solid #E6EAF0}
.twrb-pop .twrb-pop__logo{display:block;width:auto;max-width:132px;max-height:34px;height:auto;margin:0;border:0;border-radius:0;box-shadow:none}

/* ---- form (Contact Form 7 or similar) ------------------------- */
.twrb-pop .twrb-pop__form{color:var(--twrb-pop-text);font-size:15px;line-height:1.5}
.twrb-pop .twrb-pop__form form{margin:0}
.twrb-pop .twrb-pop__form p{margin:0 0 16px}
.twrb-pop .twrb-pop__form br{display:none}
.twrb-pop .twrb-pop__form .twrb-pop__note{padding:12px 16px;border:1px dashed var(--twrb-pop-line);border-radius:8px;background:var(--twrb-pop-soft);color:var(--twrb-pop-text);font-size:14px;line-height:1.5}
.twrb-pop .twrb-pop__form label{color:var(--twrb-pop-ink);font-size:14px;font-weight:500}
.twrb-pop .twrb-pop__form .wpcf7-form-control-wrap{display:block}
.twrb-pop .twrb-pop-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:0 0 16px}
.twrb-pop .twrb-pop-row > *,.twrb-pop .twrb-pop-row p{margin:0}

.twrb-pop .twrb-pop__form input[type="text"],
.twrb-pop .twrb-pop__form input[type="email"],
.twrb-pop .twrb-pop__form input[type="tel"],
.twrb-pop .twrb-pop__form input[type="url"],
.twrb-pop .twrb-pop__form input[type="number"],
.twrb-pop .twrb-pop__form input[type="date"],
.twrb-pop .twrb-pop__form select,
.twrb-pop .twrb-pop__form textarea{
  display:block;width:100%;max-width:100%;height:50px;margin:0;padding:0 16px;
  border:1px solid var(--twrb-pop-line);border-radius:8px;background:#fff;box-shadow:none;
  font-family:inherit;font-size:15px;line-height:1.4;font-weight:400;color:var(--twrb-pop-ink);
  transition:border-color .2s ease,box-shadow .2s ease;
}
.twrb-pop .twrb-pop__form textarea{height:132px;min-height:96px;padding:13px 16px;resize:vertical}
.twrb-pop .twrb-pop__form input::placeholder,.twrb-pop .twrb-pop__form textarea::placeholder{color:var(--twrb-pop-muted);opacity:1}
.twrb-pop .twrb-pop__form input:hover,.twrb-pop .twrb-pop__form select:hover,.twrb-pop .twrb-pop__form textarea:hover{border-color:#B9C1CC}
.twrb-pop .twrb-pop__form input:focus,.twrb-pop .twrb-pop__form select:focus,.twrb-pop .twrb-pop__form textarea:focus{outline:0;border-color:var(--twrb-pop-blue);box-shadow:0 0 0 3px rgba(27,62,147,.14)}
.twrb-pop .twrb-pop__form .wpcf7-not-valid{border-color:var(--twrb-pop-error)}

/* "Do you have a website?* ( ) Yes ( ) No" */
.twrb-pop .twrb-pop-choice{display:flex;flex-wrap:wrap;align-items:center;gap:6px 14px;color:var(--twrb-pop-ink);font-size:14px;font-weight:500}
.twrb-pop .twrb-pop__form .wpcf7-radio,.twrb-pop .twrb-pop__form .wpcf7-checkbox{display:inline-flex;flex-wrap:wrap;gap:4px 18px}
.twrb-pop .twrb-pop-choice .wpcf7-form-control-wrap{display:inline-block}
.twrb-pop .twrb-pop__form .wpcf7-list-item{margin:0}
.twrb-pop .twrb-pop__form .wpcf7-list-item label{display:inline-flex;align-items:center;gap:7px;font-weight:400;color:var(--twrb-pop-text);cursor:pointer}
.twrb-pop .twrb-pop__form input[type="radio"],.twrb-pop .twrb-pop__form input[type="checkbox"]{width:16px;height:16px;margin:0;accent-color:var(--twrb-pop-blue)}

/* submit */
.twrb-pop .twrb-pop-submit{display:flex;justify-content:flex-end;align-items:center;flex-wrap:wrap;gap:10px;margin:24px 0 0}
.twrb-pop .twrb-pop__form input[type="submit"],
.twrb-pop .twrb-pop__form button[type="submit"]{
  display:inline-block;min-width:170px;height:50px;margin:0;padding:0 52px 0 28px;
  border:0;border-radius:999px;cursor:pointer;box-shadow:none;
  background:var(--twrb-pop-green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10h10M10.8 5.8 15 10l-4.2 4.2' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 24px center/18px 18px;
  font-family:inherit;font-size:15px;line-height:50px;font-weight:600;color:#fff;text-transform:none;letter-spacing:.01em;
  transition:background-color .2s ease,box-shadow .2s ease,transform .2s ease;
}
.twrb-pop .twrb-pop__form input[type="submit"]:hover,
.twrb-pop .twrb-pop__form button[type="submit"]:hover{background-color:var(--twrb-pop-green-dk);box-shadow:0 12px 26px -12px rgba(118,174,44,.8);transform:translateY(-1px)}
.twrb-pop .twrb-pop__form input[type="submit"]:focus-visible,
.twrb-pop .twrb-pop__form button[type="submit"]:focus-visible{outline:2px solid var(--twrb-pop-blue);outline-offset:3px}
.twrb-pop .twrb-pop__form input[type="submit"]:disabled,
.twrb-pop .twrb-pop__form button[type="submit"]:disabled{opacity:.6;cursor:default;transform:none;box-shadow:none}
.twrb-pop .twrb-pop__form .wpcf7-spinner{margin:0}

/* CF7 messages */
.twrb-pop .twrb-pop__form .wpcf7-not-valid-tip{margin-top:6px;font-size:13px;font-weight:500;color:#fff}
.twrb-pop .twrb-pop__form .wpcf7-response-output{margin:20px 0 0!important;padding:11px 14px!important;border:1px solid var(--twrb-pop-line)!important;border-left-width:4px!important;border-radius:8px;background:var(--twrb-pop-soft);font-size:14px;line-height:1.5;color:var(--twrb-pop-ink)}
.twrb-pop .twrb-pop__form form.sent .wpcf7-response-output{border-color:var(--twrb-pop-green)!important;background:#F3F9EA}
.twrb-pop .twrb-pop__form form:is(.invalid,.unaccepted,.payment-required) .wpcf7-response-output{border-color:#E0A100!important;background:#FFF8E6}
.twrb-pop .twrb-pop__form form:is(.failed,.aborted,.spam) .wpcf7-response-output{border-color:var(--twrb-pop-error)!important;background:#FDECEC}

/* Colour lock: theme / kit form styles (often `!important`, e.g. white
   text meant for dark footer forms) must not recolour the popup form,
   so every text colour inside it is pinned here. */
.twrb-pop .twrb-pop__form,
.twrb-pop .twrb-pop__form p,
.twrb-pop .twrb-pop__form div,
.twrb-pop .twrb-pop__form span,
.twrb-pop .twrb-pop__form .wpcf7-list-item label,
.twrb-pop .twrb-pop__form .wpcf7-list-item-label,
.twrb-pop .twrb-pop__form .wpcf7-acceptance,
.twrb-pop .twrb-pop__form .twrb-pop__note,
.twrb-pop .twrb-pop__form small{color:var(--twrb-pop-text)!important;-webkit-text-fill-color:currentColor!important;opacity:1}
.twrb-pop .twrb-pop__form label,
.twrb-pop .twrb-pop__form legend,
.twrb-pop .twrb-pop__form .twrb-pop-choice,
.twrb-pop .twrb-pop__form .wpcf7-response-output{color:var(--twrb-pop-ink)!important;-webkit-text-fill-color:currentColor!important}
.twrb-pop .twrb-pop__form .wpcf7-list-item label,
.twrb-pop .twrb-pop__form .wpcf7-list-item label span{color:var(--twrb-pop-text)!important}
.twrb-pop .twrb-pop__form a{color:var(--twrb-pop-blue)!important;-webkit-text-fill-color:currentColor!important}
.twrb-pop .twrb-pop__form input[type="text"],
.twrb-pop .twrb-pop__form input[type="email"],
.twrb-pop .twrb-pop__form input[type="tel"],
.twrb-pop .twrb-pop__form input[type="url"],
.twrb-pop .twrb-pop__form input[type="number"],
.twrb-pop .twrb-pop__form input[type="date"],
.twrb-pop .twrb-pop__form select,
.twrb-pop .twrb-pop__form select option,
.twrb-pop .twrb-pop__form textarea{color:var(--twrb-pop-ink)!important;-webkit-text-fill-color:var(--twrb-pop-ink)!important;background-color:#fff!important;caret-color:var(--twrb-pop-ink)}
.twrb-pop .twrb-pop__form input::placeholder,
.twrb-pop .twrb-pop__form textarea::placeholder{color:var(--twrb-pop-muted)!important;-webkit-text-fill-color:var(--twrb-pop-muted)!important;opacity:1!important}
.twrb-pop .twrb-pop__form input:-webkit-autofill,
.twrb-pop .twrb-pop__form textarea:-webkit-autofill,
.twrb-pop .twrb-pop__form select:-webkit-autofill{-webkit-text-fill-color:var(--twrb-pop-ink)!important;-webkit-box-shadow:0 0 0 1000px #fff inset!important}
.twrb-pop .twrb-pop__form input[type="radio"],
.twrb-pop .twrb-pop__form input[type="checkbox"]{accent-color:var(--twrb-pop-blue)!important}
.twrb-pop .twrb-pop__form .wpcf7-not-valid-tip{color:#fff!important;-webkit-text-fill-color:#fff!important}
/* Validation tip: the live theme (home banner popup) paints the tip red on
   its red badge with an ID-level `!important` rule, so the :is() below
   borrows ID specificity (the IDs never need to exist) to keep it white. */
:is(.twrb-pop,#twrb-pop-lock-a#twrb-pop-lock-b) .twrb-pop__form :is(.wpcf7-not-valid-tip,[class*="not-valid-tip"]),
:is(.twrb-pop,#twrb-pop-lock-a#twrb-pop-lock-b) .twrb-pop__form :is(.wpcf7-not-valid-tip,[class*="not-valid-tip"]) *{color:#fff!important;-webkit-text-fill-color:#fff!important;opacity:1!important}
/* TechWyse form validation message (span.error on its red badge): the
   span colour lock above paints it dark, so pin it white with ID-level
   specificity that outranks both the lock and theme rules. */
:is(.twrb-pop,#twrb-pop-lock-a#twrb-pop-lock-b#twrb-pop-lock-c) .twrb-pop__form span.error,
:is(.twrb-pop,#twrb-pop-lock-a#twrb-pop-lock-b#twrb-pop-lock-c) .twrb-pop__form span.error *,
:is(.twrb-pop,#twrb-pop-lock-a#twrb-pop-lock-b#twrb-pop-lock-c) .twrb-pop__form .error > span.error{color:#fff!important;-webkit-text-fill-color:#fff!important}
.twrb-pop .twrb-pop__form input[type="submit"],
.twrb-pop .twrb-pop__form button[type="submit"],
.twrb-pop .twrb-pop__form button[type="submit"] *{color:#fff!important;-webkit-text-fill-color:#fff!important}

@media (max-width:767px){
  .twrb-pop{padding:12px}
  .twrb-pop .twrb-pop__dialog{border-radius:12px}
  .twrb-pop .twrb-pop__close{top:14px;right:14px;width:34px;height:34px}
  .twrb-pop .twrb-pop__body{padding:28px 20px 24px}
  .twrb-pop .twrb-pop__title{margin-right:44px;font-size:21px}
  .twrb-pop .twrb-pop__content{margin-bottom:20px;font-size:14px}
  .twrb-pop .twrb-pop-row{grid-template-columns:minmax(0,1fr);gap:14px}
  .twrb-pop .twrb-pop__form p,.twrb-pop .twrb-pop-row{margin-bottom:14px}
  .twrb-pop .twrb-pop__form input[type="text"],
  .twrb-pop .twrb-pop__form input[type="email"],
  .twrb-pop .twrb-pop__form input[type="tel"],
  .twrb-pop .twrb-pop__form input[type="url"],
  .twrb-pop .twrb-pop__form input[type="number"],
  .twrb-pop .twrb-pop__form input[type="date"],
  .twrb-pop .twrb-pop__form select{height:48px;padding:0 14px}
  .twrb-pop .twrb-pop__form textarea{height:112px;padding:12px 14px}
  .twrb-pop .twrb-pop-submit{margin-top:20px}
  .twrb-pop .twrb-pop__form input[type="submit"],
  .twrb-pop .twrb-pop__form button[type="submit"]{width:100%}
  .twrb-pop .twrb-pop__foot{padding:14px 20px}
  .twrb-pop .twrb-pop__logo{max-width:112px;max-height:30px}
}

@media (prefers-reduced-motion:reduce){
  .twrb-pop,.twrb-pop.is-open,.twrb-pop .twrb-pop__dialog,.twrb-pop .twrb-pop__close,
  .twrb-pop .twrb-pop__form input[type="submit"],.twrb-pop .twrb-pop__form button[type="submit"]{transition:none}
}
