/**
 * Partners "Apply Now" popup (#partners-program) — OLD theme styling.
 *
 * Extracted from the legacy stylesheets (colortokens.min.css, bootstrap, page
 * hubspot styles) exactly as they apply to the popup on legacy pages, and
 * scoped to #partners-program so it can be loaded on any page without
 * touching anything else.
 *
 * - Legacy CSS was written for a 10px root (html 62.5%), so every rem value
 *   is expressed as calc(N * var(--lrem)) and --lrem follows the old root
 *   (10px / 8.8px below 1680px / 8px below 1400px).
 * - The "2026 overrides" block at the bottom beats the new theme's
 *   forms.scss / _hubspot.scss !important rules inside the popup only.
 */

#partners-program { --lrem: 10px; color: #212529; font-family: Montserrat, sans-serif; font-size: calc(1.6 * var(--lrem)); line-height: 1.5; text-align: left; }
@media (max-width: 1679px) { #partners-program { --lrem: 8.8px; } }
@media (max-width: 1399px) { #partners-program { --lrem: 8px; } }

/* ---------- Bootstrap reboot / grid (old theme) ---------- */
#partners-program, #partners-program *, #partners-program *::before, #partners-program *::after { box-sizing: border-box; }
#partners-program * { line-height: inherit; } /* new theme resets * { line-height: 1 } */
#partners-program h2 { margin-top: 0; margin-bottom: calc(0.5 * var(--lrem)); line-height: 1.2; }
#partners-program p { margin-top: 0; margin-bottom: calc(1 * var(--lrem)); }
#partners-program a { color: red; text-decoration: none; background-color: transparent; }
#partners-program a:hover { color: red; text-decoration: none; }
#partners-program svg { overflow: hidden; vertical-align: middle; }
#partners-program label { display: inline-block; margin-bottom: calc(0.5 * var(--lrem)); }
#partners-program input, #partners-program select, #partners-program textarea { margin: 0; font-family: inherit; font-size: inherit; line-height: inherit; }
#partners-program input { overflow: visible; }
#partners-program select { text-transform: none; overflow-wrap: normal; }
#partners-program [type="submit"] { -webkit-appearance: button; appearance: button; }
#partners-program [type="submit"]:not(:disabled) { cursor: pointer; }
#partners-program textarea { overflow: auto; resize: vertical; }
#partners-program fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
#partners-program .container-fluid { width: 100%; padding-right: 15px; padding-left: 15px; margin-right: auto; margin-left: auto; }
#partners-program .row { display: flex; flex-wrap: wrap; margin-right: -15px; margin-left: -15px; }
#partners-program .row::before, #partners-program .row::after { display: none; }
#partners-program .col-sm-12 { position: relative; width: 100%; padding-right: 15px; padding-left: 15px; }
@media (min-width: 576px) { #partners-program .col-sm-12 { flex: 0 0 100%; max-width: 100%; } }
#partners-program .m-0 { margin: 0 !important; }
#partners-program .text-center { text-align: center !important; }
#partners-program .font-weight-normal { font-weight: 400 !important; }
#partners-program .text-red { color: #d22630; letter-spacing: 1px; display: inline-block !important; }

/* ---------- Old typography ---------- */
#partners-program h2 { font-family: Montserrat, sans-serif !important; font-weight: 700; font-stretch: normal; font-style: normal; line-height: 1.17; letter-spacing: normal; font-size: calc(3.2 * var(--lrem)); }
#partners-program p { font-family: Montserrat, sans-serif !important; font-size: calc(1.6 * var(--lrem)); font-weight: 400; font-stretch: normal; font-style: normal; line-height: 1.5; letter-spacing: normal; }

/* ---------- Popup shell ---------- */
#partners-program.full-popup { height: 100vh; width: 100%; position: fixed; top: 0; left: 0; background-color: rgba(0, 0, 0, .8); z-index: 2147483647; opacity: 1; visibility: visible; display: none; transition: all .3s; animation: zoominoutsinglefeatured .5s linear; }
@keyframes zoominoutsinglefeatured { 0% { transform: scale(0, 0); } 50% { transform: scale(.5, .5); } 100% { transform: scale(1, 1); } }

#partners-program .full-popup__content { padding: 30px; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(1); opacity: 1; width: 100%; height: 100%; background-color: #fff; transition: all .5s .2s; }
@media only screen and (max-width: 991px) { #partners-program .full-popup__content { background-blend-mode: multiply; background-image: radial-gradient(circle at 71% 34%, #f0f0f0, #fff 55%); } }
@media only screen and (max-width: 767px) { #partners-program .full-popup__content { padding: 15px 0 0; } }
@media only screen and (max-width: 576px) { #partners-program .full-popup__content { overflow-y: scroll; } }
#partners-program .full-popup__content { background-image: url("../images/xcloud-popup-bg.png") !important; background-size: cover !important; }
@media only screen and (max-height: 740px) and (min-width: 768px) { #partners-program .full-popup__content { overflow-y: scroll; } }
#partners-program .full-popup__content .ct-center-vhalign-bk { padding: 30px 0; }

#partners-program .full-popup__close { position: absolute; right: 22px; top: 22px; display: inline-block; line-height: 1; z-index: 1; }

#partners-program .middle-wrapper { width: 100%; margin: 0 auto; text-align: center; }
@media only screen and (min-width: 1400px) { #partners-program .middle-wrapper { width: 968px; } }
#partners-program .middle-wrapper .middle-wrapper-logo { margin-bottom: 30px; }
@media only screen and (min-width: 991px) { #partners-program .middle-wrapper .middle-wrapper-logo { margin-bottom: 60px; } }

#partners-program .heading { font-family: Montserrat, sans-serif !important; font-weight: 700 !important; font-size: 48px; margin-bottom: 80px; font-stretch: normal; font-style: normal; line-height: normal !important; letter-spacing: normal !important; color: #212529; }
@media only screen and (max-width: 767px) { #partners-program .heading { font-size: 24px; margin-bottom: 40px; } }

#partners-program .form-wrapper { width: 100%; max-width: 854px; margin: 0 auto; }
#partners-program span.error { position: absolute; font-size: 12px; color: #ec0000; }

/* ---------- Terms ---------- */
#partners-program .terms { font-family: Montserrat, sans-serif !important; font-size: 12px !important; font-weight: 400 !important; font-stretch: normal !important; font-style: normal !important; letter-spacing: normal !important; line-height: 1.43; text-align: center; color: #000; margin: 4vh auto; }
@media only screen and (max-width: 575px) { #partners-program .terms { font-size: 10px; width: auto; margin: 0 auto 30px; } }
#partners-program .terms a, #partners-program .terms a:hover { text-decoration: none; color: #d12730; font-weight: 700; }

/* ---------- HubSpot form (old styles) ---------- */
#partners-program .field { border: 1px solid #000; background-color: #fff; padding: 10px 15px; height: 44px; width: 410px; font-size: 16px; color: #000; font-family: Montserrat, sans-serif !important; letter-spacing: 1px; }
@media only screen and (max-width: 768px) { #partners-program .field { width: 100%; } }
@media only screen and (max-width: 767px) { #partners-program .field { border-width: 0 0 1px; border-style: none none solid; border-color: #000; padding: 0; height: 5vh; font-size: 14px; } }
@media only screen and (max-width: 992px) { #partners-program .field { background-color: transparent; } }
#partners-program.full-popup .field { border: none; }
#partners-program .hbspt-form { width: 100%; }
#partners-program .hbspt-form .hs-form-field { position: relative; padding: 0; background: none; height: calc(8.125 * var(--lrem)); }
#partners-program .hbspt-form .hs-form-field > label { font-family: Montserrat, sans-serif !important; font-size: calc(1.6 * var(--lrem)); font-weight: 500; font-stretch: normal; font-style: normal; line-height: normal; letter-spacing: 3.2px; text-transform: uppercase; text-align: left; color: silver; top: 0; position: absolute; transition: all 150ms ease-in-out; }
#partners-program .hbspt-form .hs-form-field.focus > label,
#partners-program .hbspt-form .hs-form-field.hs-fieldtype-select > label { font-size: calc(1.4 * var(--lrem)); top: -14px; }
#partners-program .hbspt-form .hs-form-field > label .hs-form-required { color: red; }
#partners-program .form-columns-2 label span { text-transform: capitalize; letter-spacing: 0; }

#partners-program .hbspt-form .hs-form-field .hs-input { width: 100%; background-color: transparent; border: 0; border-bottom: 1px solid silver; color: #000; font-family: Montserrat, sans-serif !important; font-size: calc(1.6 * var(--lrem)); font-weight: 500; }
#partners-program .hbspt-form .hs-form-field .hs-input.error { border-bottom: 1px solid red; }
#partners-program .hbspt-form .hs-form-field .hs-input:focus-visible { outline: 0; }
#partners-program .hbspt-form .hs-form-field .hs-input:-webkit-autofill { -webkit-text-fill-color: #000; background-color: transparent; }
#partners-program .hbspt-form .hs-form-field .hs-input::placeholder { color: transparent; }
#partners-program .hbspt-form .hs-form-field.hs-fieldtype-select option { color: #000; }

#partners-program input[type="text"], #partners-program select { border-bottom: 1px solid #fff; font-size: 16px; padding-left: 2px; font-weight: 300; width: 100%; border-radius: 0; border-top: 0 !important; border-left: 0 !important; border-right: 0 !important; font-family: Montserrat, sans-serif !important; }
#partners-program input[type="text"], #partners-program input[type="text"]:-webkit-autofill, #partners-program input[type="text"]:focus, #partners-program input[type="text"]:active,
#partners-program select, #partners-program select:-webkit-autofill, #partners-program select:focus, #partners-program select:active { background-color: transparent !important; color: #000 !important; -webkit-text-fill-color: #000 !important; box-shadow: 0 0 0 30px #fff inset !important; }
#partners-program select { font-weight: 500 !important; }
#partners-program input[type="email"], #partners-program input[type="number"] { -webkit-text-fill-color: #000 !important; }
@media (max-width: 992px) { #partners-program select { -webkit-text-fill-color: silver !important; } }
#partners-program .hs-input:focus, #partners-program .hs-input::selection { background: none !important; color: #000 !important; }
#partners-program textarea.hs-input { padding-top: 2px !important; padding-bottom: 2px !important; height: calc(2.7 * var(--lrem)); resize: none; overflow: hidden; color: #000 !important; -webkit-text-fill-color: #000 !important; }

#partners-program .form-columns-2 { max-width: 100%; display: flex; align-items: center; gap: calc(6 * var(--lrem)); }
#partners-program .form-columns-2 .input { margin-right: 0; }
@media (max-width: 576px) {
  #partners-program .form-columns-2 { flex-direction: column; row-gap: 0; }
  #partners-program .hs-input { width: 100% !important; }
}

#partners-program .hbspt-form .hs-form-field .hs-error-msgs { padding: 0; color: red; list-style-type: none; font-weight: 600; font-size: calc(1.4 * var(--lrem)); }
#partners-program .hbspt-form .hs-form-field .hs-error-msgs .hs-error-msg { font-size: calc(1.4 * var(--lrem)); }
#partners-program .hbspt-form .hs_error_rollup { display: none; }
#partners-program .submitted-message p { font-size: calc(2.65 * var(--lrem)); display: block; text-align: center; }
@media (max-width: 576px) { #partners-program .submitted-message p { font-size: calc(2.1 * var(--lrem)); } }

#partners-program .hs-button { display: block; width: 100%; max-width: 240px; margin: calc(3 * var(--lrem)) auto; text-align: center; color: #fff; font-size: 20px !important; font-weight: 700 !important; height: 56px !important; line-height: 56px; border: 0 !important; border-radius: 200px !important; box-shadow: none; background-color: red; background-image: none; transition: all .5s ease; }
#partners-program .hs-button:hover { cursor: pointer; transform: scale(1.05); }
@media (max-width: 576px) { #partners-program .hs-button { padding: 0; margin-top: 0 !important; } }

/* ---------- 2026 overrides: neutralise forms.scss / _hubspot.scss inside the popup ---------- */
#partners-program .hbspt-form,
#partners-program .hs-form { max-width: none; }
#partners-program .hs-form-field { margin-bottom: 0 !important; flex: 0 1 auto; display: block; }
#partners-program .hs-form-field > label:not(.hs-error-msg) { display: inline-block !important; }
#partners-program .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { background: transparent !important; border: 0 !important; border-bottom: 1px solid silver !important; color: #000 !important; border-radius: 0 !important; padding: 1px 2px 1px 2px; }
#partners-program .hs-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus { border-bottom-color: silver !important; }
#partners-program .hs-input.error:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
#partners-program .hs-input.invalid:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { border-bottom-color: red !important; }
#partners-program .hs-button,
#partners-program .hs-button.primary.large,
#partners-program .hs-button:hover,
#partners-program .hs-button:focus { background-color: red !important; color: #fff !important; border: 0 !important; border-radius: 200px !important; padding: 1px 6px; letter-spacing: normal; text-transform: none; }
#partners-program .hs-submit { margin-top: 0; }
#partners-program ul.hs-error-msgs { list-style: none !important; padding: 0 !important; margin: 0 !important; }
#partners-program label.hs-error-msg { color: red !important; }
#partners-program .submitted-message { color: #000; background: none; padding: 0; }
#partners-program textarea.hs-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { padding: 2px !important; }
#partners-program select.hs-input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) { padding: 0 0 0 2px !important; }
#partners-program .hs-form-required { margin-left: 0; }
#partners-program .terms a, #partners-program .terms a.text-red { color: #d12730 !important; }


/* Floating labels (2026-10-23): the .focus rule above needs the class from the onFormReady script in
   template-parts/partner-popup.php. :focus-within lifts the label as soon as a field is focused. */
#partners-program .hbspt-form .hs-form-field:focus-within > label {
  font-size: calc(1.4 * var(--lrem));
  top: -14px;
}
