/* BiaPal Survey */
body {
  background-color: #F6F8F5;
}
.header-container {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

.header-container * {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}
#biapal-form,
#biapal-form * {
  font-family: 'Source Sans Pro', sans-serif !important;
}
#biapal-form {
 /* max-width: 900px;*/
  /*margin: 0 auto;*/
  /*padding: 2em 1.5em;*/
  background-color: #FFFFFF;
  font-family: 'Source Sans Pro', sans-serif;
  color: #3A3A3A;
   border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.intro-box {
  background: #FFFFFF;
  padding: 0.5em 1.0em; /* Match form exactly */
  margin: 0 auto 0 auto;
  border-radius: 8px;
  max-width: 900px;
  box-sizing: border-box;
  font-family: 'Source Sans Pro', sans-serif;
  color: #3A3A3A;
}
/* Responsive wrapper for intro + form */
.survey-wrapper {
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: clamp(1rem, 5vw, 2rem);
  box-sizing: border-box;
}
#survey-anchor {
  padding-top: 1em; 
    margin: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.intro-box,
#biapal-form,
#progress-wrapper {
  width: 100%;
  box-sizing: border-box;
}
    /* Remove outer Elementor padding for this specific widget */
    body.page-id-101 .elementor-widget-html .elementor-widget-container {
      padding: 0 !important;
    }
    
    .intro-heading {
  font-size: 1.1rem;
  font-weight: 600;
  color: #3A3A3A;
}

.intro-lead {
  font-size: 1rem;
  font-weight: 500;
  margin-top: 0.5em;
}

.intro-detail {
  font-size: 0.95rem;
  color: #5B5B5B;
  line-height: 1.4;
}
/* Step heading visuals */
.step-heading {
  font-size: 1.3rem;
  font-weight: 600;
  color: #3A3A3A;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.step-heading .step-label {
  color: #3A3A3A; /* charcoal */
  font-weight: 600;
  opacity: 0.85;
}


#biapal-form .form-group:not(:last-of-type) {
   margin-bottom: 0em;
  padding-bottom: 0.4em;
  border-bottom: 1px solid #EDEDED;
}

#biapal-form label {
  display: inline-block;
  margin-top: 0.4em;
  margin-bottom: 0.4em;
  font-size: 1rem;
  font-weight: 400;
  color: #3A3A3A;
  max-width: 100%;
  white-space: normal;
}

#biapal-form label strong {
  display: inline;
  font-size: 1.1em;
  font-weight: 600;
 /* margin-bottom: 0.2em;*/
  font-weight: 400;
  color: #3A3A3A;
}

#biapal-form label.checkbox-label {
  display: flex;
  align-items: center; /* aligns checkbox + label on same line */
  gap: 0.5em;
  font-size: 1.0rem;
  line-height: 1.;
  color: #3A3A3A;
  cursor: pointer;
  flex-wrap: nowrap;
}

#biapal-form label.checkbox-label input[type="checkbox"] {
  appearance: none;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid #AFC7A7;        /* ✅ light sage green */
  border-radius: 8px;
  background-color: #fff;           /* ✅ white inside */
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}



/* Show it only on mobile */

/* Default desktop label */
.placeholder-option::before {
  content: "Select one";
}

#biapal-form label.checkbox-label {
  position: relative;
}

#biapal-form label.checkbox-label input[type="checkbox"]:checked {
  background-color: #fff;
  border-color: #AFC7A7;
}


/* Tick mark inside checkbox*/
#biapal-form label.checkbox-label input[type="checkbox"]:checked::after {
  content: '✔';
  color: #4E6C4E;                   /* ✅ dark grey tick */
  font-size: 0.85em;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%); /* ✅ centers tick perfectly */
  pointer-events: none;
  font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif;
}

#biapal-form input[type="radio"] {
  appearance: none;
  width: 1.1em;
  height: 1.1em;
  border: 2px solid #5D7FA5;
  border-radius: 50%;
  background-color: #fff;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
}

#biapal-form input[type="radio"]:checked::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0.5em;
  height: 0.5em;
  background-color: #5D7FA5;
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* Fix faint option text for all real options */
#biapal-form select option:not(:disabled):not(.question-option) {
  color: #3A3A3A !important;
}

#biapal-form input,
#biapal-form select,
#biapal-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.2em;
  margin-bottom: 0.3em;
  box-sizing: border-box;
  font-size: 1rem;
  padding: 0.4em;
  border: 1px solid #D9DED9;
  border-radius: 8px;
  background-color: #FFFFFF;
  color: #3A3A3A;
}

#biapal-form select {
  color: #3A3A3A; /* dark grey by default */
}

/* When placeholder is active (not answered yet) */
#biapal-form select:invalid {
  color: #E3EBE6 !important;
    font-style: normal;
}
select:required:invalid {
    color: #7D8D85 !important;
    }
    select option[value=""][disabled] {
    display: block !important;
    color:  #9AA29E !important;
}

.button-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.2em;
  flex-wrap: wrap;
  margin-top: 2em;
}
.button-row .biapal-button {
  padding: 0.85em 1.5em;
  font-size: 1.1em;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
  margin: 0.3em;
  box-sizing: border-box;
}

/* Green for Next and Submit */
.button-row .next-btn,
.button-row .submit-btn {
  background-color: #AFC7A7;
  color: #FFFFFF;
}
.button-row .next-btn:hover,
.button-row .submit-btn:hover {
  background-color: #BFD9BE;
  color: #3A3A3A;
}

/* Grey for Back */
.button-row .prev-btn {
  background-color: #C2C9C6;  /* lighter neutral grey-green */
  color: #3A3A3A;
}

.button-row .prev-btn:hover {
  background-color: #B2BAB6;  /* soft hover shade */
  color: #3A3A3A;
}

.button-row .biapal-button:focus {
  outline: 2px solid #AFC7A7; /* soft green ring */
  outline-offset: 2px;
  box-shadow: none;
}

#progress-wrapper {
  max-width: 600px;
  width: 100%;
  margin: 1.0em auto 0;
  padding: 1.0;
  box-sizing: border-box;
  scroll-margin-top: 40px; /* adjust as needed */
}

#progress-bar {
  background: #D9DED9;
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
}

#progress-fill {
  background: #AFC7A7;
  height: 100%;
  width: 0%;
  transition: width 0.4s ease;
}

#progress-text {
  text-align: center;
  font-size: 0.9em;
  margin-top: 0.5em;
  color: #3A3A3A;
}
/* --- BASE FORM STYLING --- */
#biapal-form .form-group {
 background-color: #EDF6EC;      /* light mint   */
  border: 1px solid #A7D2A2;      /* 🌿 clearer edge */
  border-radius: 8px;                   /* soft corners */
  margin-bottom: 1.0rem !important      ;         /* gap between cards */
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
  transition: box-shadow 0.2s ease;
  box-sizing: border-box;
  overflow: visible;
  padding: 0.5rem 0.5rem;
  position: relative; /* Acts as Tooltip anchor */
}

/* Lift on hover or when a field inside is focused */
#biapal-form .form-group:hover,
#biapal-form .form-group:focus-within {
  border-color: #7BAF71; /* brighter sage */
  background-color: #E1F3DD; /* soft mint highlight */
  box-shadow: 0 0 0 3px rgba(123, 175, 113, 0.25); /* matching the border tone */
  transition: all 0.2s ease;
}

.form-step {

  min-height: 680px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  margin-top: 0 ;
  
  background-color: transparent !important;
  /*box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);*/
  border-radius: 0px;
  padding: 1.0rem 2rem;
  border: 1px solid #E0E5E0;
}

.step-heading-wrap {
  background: #FAFBFA; /* soft, flat off-white */
  padding: 0.5rem 0;
    text-align: center;
  margin-bottom: 1.5rem;
}

.step-heading {
  font-size: 1.5rem;
  font-weight: 700;
  color: #3A3A3A;
  margin-bottom: 0.3rem;
}

.step-label {
  color: #7BAF71;
  font-weight: 700;
  margin-right: 0.4rem;
}

.secondary-intro {
  font-size: 1rem;
  color: #5B5B5B;
  margin: 0;
  line-height: 1.5;
  max-width: 70ch;
  text-align: center; /* ✅ Center the subheading */
  margin-left: auto;
  margin-right: auto;
}


.form-step h3 {
  font-size: 1.3em;
  color: #3A3A3A;
  margin-bottom: 0.6em;

}
.form-step p {
  font-size: 1rem;
  color: #5B5B5B;
  margin-top: 0.2em;
  margin-bottom: 1.0em;
  line-height: 1.5;
  max-width: 80ch;
}
.form-step p.secondary-intro {
  font-size: 1.05rem;
  font-weight: 400;
  font-style: normal;
  color: #3A3A3A;
  line-height: 1.6;
  margin-top: 0.2rem;
  margin-bottom: 1.0rem;
  max-width: 75ch;
}
.form-step.active {
    display: flex;
    border: none;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    background-color: #FAFBFA; /* soft tint */
}
.form-step label {
    display: block;
}
.form-step select,
.form-step input[type="text"] {
  width: 100%;
  margin-left: 0;
}
.form-group label,
.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  padding-left: 0.5px;
}
#biapal-form input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
}

/* 3. Tidy up the inputs & hint at interactivity */
.form-group input,
.form-group select {
  border: 1px solid #D9DED9;
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

/* style the question label */
.form-group > label {
  display: block;
  font-size: 1.125rem;        /* bump up size */
  font-weight: 600;           /* semi-bold */
  color: #3A3A3A;             
  position: relative;
  margin-bottom: 0.5rem;
}

.section-divider {
  border: none;
  border-top: 1px solid #ccc;
  margin: 2.5em 0 1.5em;
}

/* For radio groups stacked vertically with full width labels */
.form-group.radio-vertical {
  flex-direction: column;
}
#biapal-form select option:first-child:disabled {
  display: none !important;
}


@media(min-width: 768px) { 
  #biapal-form select option:first-child:disabled[selected] {
    display: none !important;
  }

  .your-container-class {
    min-height: 10vh !important;
  }

  .your-container-class img {
    max-width: 60% !important;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  .desktop-placeholder {
    display: none;
  }

    .mobile-q {
    display: none;
  }
  .desktop-placeholder::before {
    content: "Select one";
  }
 option.question-option {
    display: none !important;
  }
}

  #biapal-form,
  #biapal-form input,
  #biapal-form select,
  #biapal-form textarea,
  #biapal-form label,
  #biapal-form .helper-text,
  #biapal-form small,
  #biapal-form p {
    font-size: 1rem !important; /* 16px base */
    line-height: 1.4;
  }
#biapal-form .helper-text.step-2 {
  display: block;
  margin-left: 0.8rem;
   font-size: 0.9rem;
}

  #biapal-form h3 {
    font-size: 1.25rem;
  }
 /* 4. Un-bold the checkbox labels */
  #biapal-form .form-group label.checkbox-label {
    font-weight: normal !important;
  }
 
.checkbox-group {
  background: #F9F9F7;
  padding: 0.6em 0.8em;
  border-radius: 8px;
  margin-bottom: 0.8em;
}
#progress-wrapper-bottom {
  width: 100%;
  max-width: 700px;
  margin: 1.5em auto 1em auto;
  padding: 0 1em;
  display: block;
}

#progress-bar-bottom {
  background-color: #eee;
  height: 8px;
  border-radius: 5px;
  overflow: hidden;
}

#progress-fill-bottom {
  height: 8px;
  width: 0%;
  background-color: #5D7FA5;
  transition: width 0.3s ease;
}

#progress-text-bottom {
  text-align: right;
  font-size: 0.9em;
  margin-top: 0.5em;
  color: #666;
}

.group-label {
  font-weight: 500;
  font-size: 0.95em;
  color: #5D7FA5; /* your slate blue */
  margin: 1em 0 0.4em;
}
.form-group.checkbox-columns label.checkbox-label {
  margin-bottom: 0.2em !important;
  line-height: 1.1 !important;
  gap: 0.2em !important;
  font-weight: normal !important;
}
/*Removing spacing from hidden text*/
#step3-kids-section[style*="display: none"],
#step4-kids-header[style*="display: none"] {
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}
#step-4 {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
#step-4 h3:first-of-type {
  margin-top: 0 !important;
}
.helper-text {
  display: block;
  font-size: 0.9em;
  color: #666;
  margin-top: 0.25em;
  margin-bottom: 0.25em;
  line-height: 1.4;
}


#wrapup-section {
  display: none;
}

.tick-mark {
  display: none;
  color: #AFC7A7;
  font-size: 1em;
  margin-left: 0.6em;
  vertical-align: baseline;
  opacity: 0.85;
  user-select: none;
}
.tick-mark::before {
  content: "\2714";
  color: #AFC7A7; /* soft sage green, matches your theme */
}
/* 1) Make sure this comes *after* your existing .tick-mark rules */

/* Show the green check on any answered question */
#biapal-form .form-group.answered .tick-mark {
  display: inline-block !important;
}

/* 2) Re-declare the “before” glyph via Unicode (safer than a literal ✔) */
#biapal-form .form-group.answered .tick-mark::before {
  content: "\2714";                        /* U+2714 heavy check mark */
  font-family: "Segoe UI Symbol",
               "Arial Unicode MS",
               sans-serif;                /* fallback fonts that include ✔ */
  color: #5C875C !important;              /* your darker green for visibility */
  font-size: 1em;
  line-height: 1;
}


.range-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 0.5em;
  font-size: 0.9em;
  color: #5B5B5B;
  padding: 0 4px;
}
.range-ticks span {
  flex: 1;
  text-align: center;
}
/* Placeholder (unanswered) style */
#biapal-form select:required:invalid {
  color: #9AA29E !important;
}
/* Placeholder option styling */
#biapal-form select option[value=""][disabled] {
  display: block !important;
  color: #9AA29E !important;
  font-style: italic;
}

/* Selected answers (normal options) */
#biapal-form select option:not([disabled]) {
  color: #3A3A3A !important;
}
#biapal-form select {
  color: #3A3A3A !important;
}
/* Make the question label pop */
#biapal-form .form-group > label {
  display: flex;
  align-items: center;
  font-size: 1.125rem;                  /* bump up size */
  font-weight: 600;                     /* semi-bold */
  color: #3A3A3A;
  position: relative;
  padding-left: 0.2rem;                   /*indent of text questions */
  margin-bottom: 0.75rem;
}
.inline-other-input {
  display: none;
}

input[type="checkbox"][value="Other"]:checked + .inline-other-input {
  display: inline-block;
}

:root{
  --offset-step1 : 0px;   /* header only  → set by JS */
  --offset-steps : 0px;   /* header + bar → set by JS */
}

/* browser keeps every scroll target clear of header+bar */
html{ scroll-padding-top: var(--offset-steps); }

#biapal-form .form-group.answered {
  /*background-color: #D5E9D4 !important;
  border-color: #AFC7A7 !important; */
    background-color: #D5E9D4 !important;  /* keep this */
  border: 2px solid #7BAF71 !important;   /* 🌱 deeper, 2 px */
  box-shadow: 0 0 0 2px rgba(92,135,92,0.08);  /* subtle inset ring */
  border-radius: 8px;
  transition: background 0.3s ease;
}

#biapal-form .form-group.answered > label strong {
  font-weight: 400;
  color: #5B5B5B;
  opacity: 0.9;
}

/* ToolTip for not answering Q1 */
.form-group.show-tooltip {
  position: relative;
}

.form-group.show-tooltip {
  border: 2px solid #D9822B !important;
  background-color: #FFF7EB;
  box-shadow: 0 0 0 2px #F2C185;
}
/* Tooltip bubble — shared base styles */
.form-group.show-tooltip {
  position: relative;
}
.form-group.show-tooltip::after {
  content: "Oops — we need this one!";
  position: absolute;
  top: calc(100% + 0.4em);  /* ✅ below the entire .form-group */
  left: 5em;              /* ✅ shifted right for nicer alignment */
  background: #F2C185;
  color: #3A3A3A;
  padding: 0.4em 0.6em;
  font-size: 0.9em;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: normal;
  max-width: 90vw;
  z-index: 9999;
}

#biapal-form input:focus,
#biapal-form select:focus,
#biapal-form textarea:focus {
  border: 2px solid #AFC7A7;
  box-shadow: 0 0 0 2px rgba(175, 199, 167, 0.25);
  background-color: #F6F8F5;
  outline: none;
}

.checkbox-label:has(input[type="checkbox"]:checked) {
  background-color: #E1F3DD; /* soft mint */
  border-radius: 6px;
  padding: 0.4em 0.6em;
  transition: background 0.2s ease;
}


/* Mobile: show below the select */

 @media (max-width: 767px) {
  body.survey #biapal-form,
  body.survey #biapal-form * {
    font-family: 'Source Sans Pro', sans-serif !important;
    font-size: 16px !important;
    line-height: 1.45 !important;
  }

   .form-group.show-tooltip::after {
    top: calc(100% + 0.2em);
    bottom: auto;
    left: calc(0.8em + 1.6em); /* semantic & responsive */

    font-size: 0.85em;
  }

    #biapal-form .form-group{                       /* unanswered */
        background:#F2F8F0;          /* a whisper-green */
        border:1px solid #C4DEC1;    /* very light border */
      }
      #biapal-form .form-group.answered{              /* answered */
        background:#D9EFD4;
        border:1px solid #7FAF6F;    /* matches tick colour */
      }

  
    #biapal-form,
   .survey-wrapper,
  .intro-box {
    padding-left: clamp(0.5rem, 3vw, 1.2rem) !important;
    padding-right: clamp(0.5rem, 3vw, 1.2rem) !important;
    padding-top: 1.4rem !important; /* more space on mobile */
    padding-bottom: 1rem !important; /* optional: balance */
  }

  .intro-box .intro-heading {
    margin-top: 0.2rem; /* nudge text down slightly */
    display: block;
  }


 .form-step, .form-step.active {
   background-color: transparent !important;
   /*background-color: #F6F8F5 ; */
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }

  /* placeholder */
  #biapal-form select:invalid{
    color:#9AAF9A;
    font-style:italic;
  }

  /* normal option + selected value */
  #biapal-form select option:not(:disabled){
    color:#2F342F !important;
    font-style:normal;
  }


  #biapal-form .form-group > label {
    margin-bottom: 0.25rem !important;
    padding-left: 0.2rem !important;  /* tightened */
  }
  helper-text {
    margin-bottom: 0.4rem  !important;
    margin-top: 0 !important;
    padding-left: 1.5rem;  /* ✅ aligns it more naturally with label+field */
    font-size: 0.9em;
    color: #5B5B5B;
    
  }
  /* 1) Tighter cards on mobile */
  #biapal-form .form-group {
    overflow: visible !important;        /* so nothing (✔) gets clipped */
    padding:       0.4rem 0.4rem !important;
    margin-bottom: 0.4rem    !important;
  }


  /* Keep answered-state green */

     #biapal-form .form-group.answered label .tick-mark {
    display: inline !important;
     }
      /* Full-width inputs, selects, textareas & buttons */
   #biapal-form .form-group,
  #biapal-form input:not([type="checkbox"]):not([type="radio"]),
  #biapal-form select,
  #biapal-form textarea,
  #biapal-form .button-row .biapal-button {
    width:     100% !important;
    max-width: 100% !important;
     margin-bottom: 0.25rem;
  }
  /* 4) Tidy buttons */
  #biapal-form .button-row {
    justify-content: space-between;
  }
  #biapal-form .button-row .biapal-button {
    flex: 1;
    padding: 0.9em 1.2em;
    font-size: 1.1em;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  }


/* --- Tappable radio cards --- */
.radio-card-group {
  display: flex;
  flex-direction: column;
  gap: 0.5em;
}

.radio-card {
  background: #F9F9F7;
  border: 2px solid #D9DED9;
  border-radius: 10px;
  padding: 0.75em 1em;
  font-size: 1rem;
  font-weight: 500;
  color: #3A3A3A;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.radio-card input[type="radio"] {
  margin-right: 0.8em;
  flex-shrink: 0;
}

.radio-card:hover {
  border-color: #AFC7A7;
  background-color: #F1F6F0;
}

.radio-card input[type="radio"]:checked + span,
.radio-card input[type="radio"]:checked {
  font-weight: 600;
}

.radio-card input[type="radio"]:checked ~ * {
  color: #3A3A3A;
}

.radio-card input[type="radio"]:checked {
  border-color: #7BAF71;
  background-color: #E1F3DD;
  box-shadow: 0 0 0 2px rgba(123, 175, 113, 0.25);
}


  /* 6) Ensure selects stay legible */
  #biapal-form select {
    color: #3A3A3A !important;
     padding-left:.9rem;
    padding-right:.9rem;
  }
     /* undo the “width:100%” on checkbox labels and inputs, make them inline-sized */
    #biapal-form .form-group.checkbox-columns label.checkbox-label,
    #biapal-form .form-group.checkbox-columns input[type="checkbox"] {
      display: inline-flex !important;
      width: auto !important;
      max-width: none !important;
    }
      /* 3. Bigger checkboxes */
  #biapal-form label.checkbox-label input[type=checkbox]{
    width:24px;
    height:24px;
  }
    /* add a little spacing between items */
    #biapal-form .form-group.checkbox-columns label.checkbox-label {
      margin-right: 1rem;
      margin-bottom: 0.5rem;
          min-height:40px;
    align-items:center;
    }
    #biapal-form .form-group.checkbox-columns label.checkbox-label,
    #biapal-form .form-group.checkbox-columns input[type="checkbox"] {
      display: inline-flex !important;   /* inline, not block */
      width: auto !important;            /* let content size it */
      max-width: none !important;        /* override any 100% */
      margin-right: 1rem;                /* space between items */
      margin-bottom: 0.5rem;             /* breathing room below */
    }
    
     #biapal-form select:focus {
    border: 2px solid #AFC7A7;
    box-shadow: 0 0 0 2px rgba(175, 199, 167, 0.25);
    background-color: #F6F8F5;
    outline: none;
  }
  
    /* 4. Helper text breathing room */
  #biapal-form .helper-text{margin-top:.25rem;}

  /* 5. Progress bar side gutter */
  #progress-wrapper{margin:1rem 1.2rem 0;}
}





