
/* V32.6.5 – Public form alignment / overflow fix */
*,
*::before,
*::after{box-sizing:border-box}

html,body{max-width:100%;overflow-x:hidden}

/* Generic public form protection */
form,fieldset,.formbox,.form-card,.appointment-form,.intake-form,.wizard-card,.card{
  min-width:0;
  max-width:100%;
}
form input,
form select,
form textarea,
.formbox input,
.formbox select,
.formbox textarea,
.appointment-form input,
.appointment-form select,
.appointment-form textarea,
.intake-form input,
.intake-form select,
.intake-form textarea{
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
form .grid,
.formbox .grid,
.appointment-form .grid,
.intake-form .grid{
  min-width:0;
}
form .grid>*,
.formbox .grid>*,
.appointment-form .grid>*,
.intake-form .grid>*{
  min-width:0;
  max-width:100%;
}

/* Appointment / booking page – prevent right column overflow */
#randevu .appt-grid,
.appointment-v16 .appt-grid,
.appointment-section .appt-grid,
.booking-grid,
.appointment-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:36px;
  align-items:start;
}
#randevu .contact-box,
#randevu .formbox,
.appointment-v16 .contact-box,
.appointment-v16 .formbox,
.appointment-section .contact-box,
.appointment-section .formbox,
.booking-grid>*,
.appointment-layout>*{
  min-width:0 !important;
  width:100% !important;
  max-width:100% !important;
}
#randevu .formbox,
.appointment-v16 .formbox,
.appointment-section .formbox{
  overflow:hidden;
}
#randevu .formbox .grid,
.appointment-v16 .formbox .grid,
.appointment-section .formbox .grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:12px;
}
#randevu .formbox .full,
.appointment-v16 .formbox .full,
.appointment-section .formbox .full{
  grid-column:1/-1;
}

/* Buttons must not overflow their card */
#randevu button,
#randevu .btn,
.appointment-v16 button,
.appointment-v16 .btn,
.appointment-section button,
.appointment-section .btn{
  max-width:100%;
  white-space:normal;
}

/* Safety / red flag checklist */
.safety-check,
.safety-checks,
.red-flags,
.redflag-list,
.security-check,
.warning-checks{
  display:grid !important;
  grid-template-columns:1fr !important;
  gap:10px !important;
  width:100% !important;
  min-width:0 !important;
}
.safety-check label,
.safety-checks label,
.red-flags label,
.redflag-list label,
.security-check label,
.warning-checks label,
.safety-option,
.redflag-item,
.safety-item{
  display:grid !important;
  grid-template-columns:26px minmax(0,1fr) !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
  min-width:0 !important;
  min-height:58px !important;
  padding:12px 14px !important;
  border:1px solid #d7e4df !important;
  border-radius:16px !important;
  background:#fff !important;
  text-align:left !important;
}
.safety-check input[type="checkbox"],
.safety-checks input[type="checkbox"],
.red-flags input[type="checkbox"],
.redflag-list input[type="checkbox"],
.security-check input[type="checkbox"],
.warning-checks input[type="checkbox"],
.safety-option input[type="checkbox"],
.redflag-item input[type="checkbox"],
.safety-item input[type="checkbox"]{
  width:20px !important;
  height:20px !important;
  min-width:20px !important;
  margin:0 !important;
  justify-self:start !important;
  accent-color:#0d6553 !important;
}
.safety-check label span,
.safety-checks label span,
.red-flags label span,
.redflag-list label span,
.security-check label span,
.warning-checks label span,
.safety-option span,
.redflag-item span,
.safety-item span,
.safety-check label strong,
.safety-checks label strong,
.red-flags label strong,
.redflag-list label strong,
.security-check label strong,
.warning-checks label strong{
  min-width:0 !important;
  width:auto !important;
  max-width:none !important;
  margin:0 !important;
  text-align:left !important;
  font-size:15px !important;
  line-height:1.35 !important;
  font-weight:800 !important;
}

/* Wizard nav */
.form-nav,.step-nav,.wizard-nav,.intake-actions{
  display:flex !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:12px !important;
  width:100% !important;
}
.form-nav>*,
.step-nav>*,
.wizard-nav>*,
.intake-actions>*{
  min-width:0 !important;
}

/* Tablet/mobile */
@media(max-width:900px){
  #randevu .appt-grid,
  .appointment-v16 .appt-grid,
  .appointment-section .appt-grid,
  .booking-grid,
  .appointment-layout{
    grid-template-columns:1fr !important;
    gap:22px !important;
  }
}
@media(max-width:640px){
  #randevu .formbox .grid,
  .appointment-v16 .formbox .grid,
  .appointment-section .formbox .grid{
    grid-template-columns:1fr !important;
  }
  #randevu .formbox .full,
  .appointment-v16 .formbox .full,
  .appointment-section .formbox .full{
    grid-column:auto !important;
  }
  .safety-check label,
  .safety-checks label,
  .red-flags label,
  .redflag-list label,
  .security-check label,
  .warning-checks label,
  .safety-option,
  .redflag-item,
  .safety-item{
    grid-template-columns:24px minmax(0,1fr) !important;
    gap:10px !important;
    padding:11px 12px !important;
  }
  .safety-check label span,
  .safety-checks label span,
  .red-flags label span,
  .redflag-list label span,
  .security-check label span,
  .warning-checks label span,
  .safety-option span,
  .redflag-item span,
  .safety-item span{
    font-size:14px !important;
  }
}
