/* Gravity Forms styling for the Window Wise landing page.
   Targets the Gravity Forms 2.5+ markup ("gravity-theme"). GF's own CSS is switched off on this page
   (see inc/core.php), so this file covers layout, fields, choices, errors and the confirmation. */

.ww-gf .gform_wrapper{margin:0;padding:0;max-width:none}
.ww-gf .gform_wrapper form{margin:0}
.ww-gf .gform_heading,
.ww-gf .gform_required_legend{display:none}

/* hidden bits GF relies on its own CSS to hide */
.ww-gf .gform_validation_container,
.ww-gf .gfield--type-honeypot,
.ww-gf .gform_hidden,
.ww-gf .gfield--type-hidden,
.ww-gf .gfield_visibility_hidden,
.ww-gf .gform_ajax_spinner,
.ww-gf iframe[name^="gform_ajax_frame"]{display:none!important}
.ww-gf .screen-reader-text,
.ww-gf .gfield_required,
.ww-gf .hidden_label>.gfield_label,
.ww-gf .hidden_sub_label{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* layout: 12 column grid as in GF, used for the half-width fields */
.ww-gf .gform_fields{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:12px 14px;margin:16px 0 0;padding:0;list-style:none;border:0}
.ww-gf .gfield{grid-column:1/-1;margin:0;padding:0;border:0;min-width:0}
.ww-gf .gfield--width-quarter{grid-column:span 3}
.ww-gf .gfield--width-third{grid-column:span 4}
.ww-gf .gfield--width-five-twelfths{grid-column:span 5}
.ww-gf .gfield--width-half{grid-column:span 6}
.ww-gf .gfield--width-seven-twelfths{grid-column:span 7}
.ww-gf .gfield--width-two-thirds{grid-column:span 8}
.ww-gf .gfield--width-three-quarter{grid-column:span 9}

/* labels */
.ww-gf .gfield_label,
.ww-gf legend.gfield_label{display:block;float:none;font-weight:600;font-size:14px;line-height:1.6;margin:0 0 4px;padding:0;color:inherit}
.ww-gf fieldset.gfield{border:0;padding:0;margin:0}
.ww-gf .gfield--type-radio{margin-top:4px}
.ww-gf .gfield--type-radio legend.gfield_label{margin-bottom:6px}
.ww-gf .gfield_description,
.ww-gf .ginput_counter,
.ww-gf .instruction{font-size:13px;color:var(--mut);margin-top:4px}

/* inputs: same look as the original form */
.ww-gf .ginput_container{margin:0}
.ww-gf input[type=text],
.ww-gf input[type=tel],
.ww-gf input[type=email],
.ww-gf input[type=number],
.ww-gf select,
.ww-gf textarea{display:block;width:100%;max-width:none;min-height:48px;margin:0;padding:10px 12px;font:16px/1.4 "Open Sans",system-ui,sans-serif;color:var(--ink);background:var(--bg);border:1.5px solid var(--line);border-radius:4px;box-shadow:none;appearance:none;-webkit-appearance:none}
.ww-gf textarea{min-height:96px;height:auto;resize:vertical}
.ww-gf textarea.small{height:96px}
.ww-gf select{padding-right:36px;background:var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%235e6464' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 10px center/18px no-repeat}
.ww-gf input:focus,
.ww-gf select:focus,
.ww-gf textarea:focus{border-color:var(--acc);outline:0}
.ww-gf input:focus-visible,
.ww-gf select:focus-visible,
.ww-gf textarea:focus-visible{outline:3px solid #3b8bd9;outline-offset:2px}

/* "How would you prefer to get started?" choice chips */
.ww-gf .gfield_radio,
.ww-gf .gfield_checkbox{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0}
.ww-gf .gchoice{position:relative;display:block;margin:0;padding:0}
.ww-gf .gchoice input[type=radio],
.ww-gf .gchoice input[type=checkbox]{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer;z-index:1}
.ww-gf .gchoice label{display:flex;align-items:center;gap:10px;min-height:46px;max-width:none;margin:0;padding:8px 12px;border:1.5px solid var(--line);border-radius:4px;font-size:15px;font-weight:400;line-height:1.25;cursor:pointer;transition:border-color .15s,background .15s}
.ww-gf .gchoice label::before{content:"";flex:none;width:18px;height:18px;border-radius:50%;border:2px solid var(--line);background:var(--bg);box-sizing:border-box}
.ww-gf .gchoice input:checked+label{border-color:var(--acc);background:color-mix(in srgb,var(--acc) 8%,transparent)}
.ww-gf .gchoice input:checked+label::before{width:20px;height:20px;border:0;background:var(--blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat}
.ww-gf .gchoice input:focus-visible+label{outline:3px solid #3b8bd9;outline-offset:2px}
.ww-gf .gchoice:hover label{border-color:var(--acc)}

/* submit button: matches .btn */
.ww-gf .gform_footer,
.ww-gf .gform_page_footer{display:block;margin:16px 0 0;padding:0}
.ww-gf .gform_footer input[type=submit],
.ww-gf .gform_footer button,
.ww-gf .gform_button{display:flex;align-items:center;justify-content:center;width:100%;min-height:52px;margin:0;padding:0 24px;border-radius:4px;border:0;background:var(--cta);color:#fff;font:900 17px/1.1 Lato,system-ui,sans-serif;text-align:center;cursor:pointer;transition:background .15s;appearance:none;-webkit-appearance:none}
.ww-gf .gform_footer input[type=submit]:hover,
.ww-gf .gform_footer button:hover,
.ww-gf .gform_button:hover{background:var(--ctah)}
.ww-gf .gform_button[disabled],
.ww-gf .gform_footer button[disabled]{opacity:.7;cursor:progress}
.ww-gf .gform-loader{display:block;width:22px;height:22px;margin:10px auto 0;border:3px solid var(--line);border-top-color:var(--acc);border-radius:50%;animation:wwl-spin .8s linear infinite}
@keyframes wwl-spin{to{transform:rotate(360deg)}}

/* validation */
.ww-gf .gform_validation_errors{margin:16px 0 0;padding:0;border:0;background:none;box-shadow:none}
.ww-gf .gform_validation_errors:focus{outline:0}
.ww-gf .gform_submission_error{margin:0;font:400 14px/1.5 "Open Sans",system-ui,sans-serif;color:light-dark(#b3141b,#ff8f8f)}
.ww-gf .gform_validation_errors .gform-icon,
.ww-gf .gform_validation_error_link{display:none}
.ww-gf .gform_validation_errors ol{display:none}
.ww-gf .gform_validation_errors ol a{color:inherit}
.ww-gf .gfield_error input,
.ww-gf .gfield_error select,
.ww-gf .gfield_error textarea{border-color:var(--cta)}
.ww-gf .gfield_error .gchoice label{border-color:color-mix(in srgb,var(--cta) 55%,var(--line))}
.ww-gf .gfield_validation_message,
.ww-gf .validation_message{margin:4px 0 0;padding:0;border:0;background:none;font-size:14px;line-height:1.4;color:light-dark(#b3141b,#ff8f8f)}

/* confirmation: matches the original thank-you panel */
.ww-gf .gform_confirmation_wrapper,
.ww-gf .gform_confirmation_message{margin:0;padding:0;border:0;background:none}
.ww-gf .gform_confirmation_message::before{content:"";display:block;width:52px;height:52px;margin-bottom:12px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 52'%3E%3Ccircle cx='26' cy='26' r='25' fill='%2300519a'/%3E%3Cpath d='M15 27l7 7 15-16' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat}
.ww-gf .gform_confirmation_message h3{font-size:24px}
.ww-gf .gform_confirmation_message p{margin-top:10px}
.ww-gf .gform_confirmation_message:focus{outline:0}
.form:has(.gform_confirmation_message) .wwl-form-head,
.form:has(.gform_confirmation_message) .wwl-privacy,
.news :has(.gform_confirmation_message)~.wwl-privacy{display:none}

/* newsletter: one row of Title / First name / Last name, then email + button */
.ww-news .gform_wrapper form{display:grid;grid-template-columns:110px minmax(0,1fr) minmax(0,1fr);gap:12px}
.ww-news .gform-body,
.ww-news .gform_body,
.ww-news .gform_fields{display:contents}
.ww-news .gform_validation_errors{grid-column:1/-1;margin:0;order:9}
.ww-news .gfield{grid-column:auto}
.ww-news .ww-n-email{grid-column:1/3}
.ww-news .gform_footer{grid-column:3;align-self:start;margin:26.4px 0 0}
.ww-news .gform_footer input[type=submit],
.ww-news .gform_footer button,
.ww-news .gform_button{min-height:48px}
.ww-news .gform_confirmation_message::before{display:none}
.ww-news .gform_confirmation_message{font-weight:700}
.news .wwl-privacy{margin-top:12px}

@media(max-width:600px){
  .ww-gf .gfield{grid-column:1/-1!important}
  .ww-gf .gchoice label{font-size:14px;padding:8px 10px;gap:8px}
  .ww-news .gform_wrapper form{grid-template-columns:96px minmax(0,1fr)}
  .ww-news .gfield.ww-n-title{grid-column:1!important}
  .ww-news .gfield.ww-n-first{grid-column:2!important}
  .ww-news .gform_footer{grid-column:1/-1;margin-top:4px}
}

/* Gravity Forms 3.x: the loading spinner sits inside the submit button */
.ww-gf .gform_button .gform-loader,
.ww-gf .gform_footer button .gform-loader{display:inline-block;flex:none;width:18px;height:18px;margin:0 0 0 10px;border:3px solid rgba(255,255,255,.45);border-top-color:#fff}

/* hide the "0 of 9 max characters" counter on the postcode field */
.ww-gf .ginput_counter{display:none}
