/*!
 * form-builder.css - Form Builder forms (FormDefinition.php)
 *
 * Version 1.00.0  (19/11/2026)
 *
 * ChangeLog:
 * 1.00.0 19/11/2026 - New (Form Builder stage 1b).
 *
 * Works the same on Bootstrap 3, Bootstrap 5 or no Bootstrap: the grid and
 * layout are the form's own (fb-*), sizes are in em (Bootstrap 3 sets the
 * html font size to 10px, so rem would be tiny). A skin can restyle with:
 *   --fb-accent        buttons, choice buttons, section titles (default #337ab7)
 *   --fb-accent-text   text on the accent colour (default #fff)
 *   --fb-border        input and section borders
 *   --fb-label-width   label column in the horizontal layout (default 32%)
 * e.g.  .fb-form { --fb-accent: #43632e; }   (a form's own Accent setting wins)
 */
/* Defaults with no specificity (:where), so any skin rule such as .fb-form{--fb-accent:...} wins. */
:where(.fb-form){--fb-accent:#337ab7;--fb-accent-text:#fff;--fb-border:#d5d9de;--fb-muted:#6b7280;--fb-error:#a94442;--fb-label-width:32%;--fb-gap:1em}
.fb-form{text-align:left;max-width:100%;margin:0 0 1.5em}
.fb-form *,.fb-form *::before,.fb-form *::after{box-sizing:border-box}
.fb-form .fb-sr{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* ---- grid ---- */
.fb-form .fb-row{display:flex;flex-wrap:wrap;margin:0 calc(var(--fb-gap) / -2)}
.fb-form .fb-col{position:relative;width:100%;min-width:0;padding:0 calc(var(--fb-gap) / 2);flex:0 0 100%;max-width:100%}
.fb-form fieldset.fb-col{border:0;margin:0;min-inline-size:0}
.fb-form [hidden]{display:none!important}
.fb-form .fb-col-1{flex:0 0 8.3333%;max-width:8.3333%}
.fb-form .fb-col-2{flex:0 0 16.6667%;max-width:16.6667%}
.fb-form .fb-col-3{flex:0 0 25.0000%;max-width:25.0000%}
.fb-form .fb-col-4{flex:0 0 33.3333%;max-width:33.3333%}
.fb-form .fb-col-5{flex:0 0 41.6667%;max-width:41.6667%}
.fb-form .fb-col-6{flex:0 0 50.0000%;max-width:50.0000%}
.fb-form .fb-col-7{flex:0 0 58.3333%;max-width:58.3333%}
.fb-form .fb-col-8{flex:0 0 66.6667%;max-width:66.6667%}
.fb-form .fb-col-9{flex:0 0 75.0000%;max-width:75.0000%}
.fb-form .fb-col-10{flex:0 0 83.3333%;max-width:83.3333%}
.fb-form .fb-col-11{flex:0 0 91.6667%;max-width:91.6667%}
.fb-form .fb-col-12{flex:0 0 100.0000%;max-width:100.0000%}
@media (min-width:576px){
  .fb-form .fb-col-sm-1{flex:0 0 8.3333%;max-width:8.3333%}
  .fb-form .fb-col-sm-2{flex:0 0 16.6667%;max-width:16.6667%}
  .fb-form .fb-col-sm-3{flex:0 0 25.0000%;max-width:25.0000%}
  .fb-form .fb-col-sm-4{flex:0 0 33.3333%;max-width:33.3333%}
  .fb-form .fb-col-sm-5{flex:0 0 41.6667%;max-width:41.6667%}
  .fb-form .fb-col-sm-6{flex:0 0 50.0000%;max-width:50.0000%}
  .fb-form .fb-col-sm-7{flex:0 0 58.3333%;max-width:58.3333%}
  .fb-form .fb-col-sm-8{flex:0 0 66.6667%;max-width:66.6667%}
  .fb-form .fb-col-sm-9{flex:0 0 75.0000%;max-width:75.0000%}
  .fb-form .fb-col-sm-10{flex:0 0 83.3333%;max-width:83.3333%}
  .fb-form .fb-col-sm-11{flex:0 0 91.6667%;max-width:91.6667%}
  .fb-form .fb-col-sm-12{flex:0 0 100.0000%;max-width:100.0000%}
}
@media (min-width:768px){
  .fb-form .fb-col-md-1{flex:0 0 8.3333%;max-width:8.3333%}
  .fb-form .fb-col-md-2{flex:0 0 16.6667%;max-width:16.6667%}
  .fb-form .fb-col-md-3{flex:0 0 25.0000%;max-width:25.0000%}
  .fb-form .fb-col-md-4{flex:0 0 33.3333%;max-width:33.3333%}
  .fb-form .fb-col-md-5{flex:0 0 41.6667%;max-width:41.6667%}
  .fb-form .fb-col-md-6{flex:0 0 50.0000%;max-width:50.0000%}
  .fb-form .fb-col-md-7{flex:0 0 58.3333%;max-width:58.3333%}
  .fb-form .fb-col-md-8{flex:0 0 66.6667%;max-width:66.6667%}
  .fb-form .fb-col-md-9{flex:0 0 75.0000%;max-width:75.0000%}
  .fb-form .fb-col-md-10{flex:0 0 83.3333%;max-width:83.3333%}
  .fb-form .fb-col-md-11{flex:0 0 91.6667%;max-width:91.6667%}
  .fb-form .fb-col-md-12{flex:0 0 100.0000%;max-width:100.0000%}
}
@media (min-width:992px){
  .fb-form .fb-col-lg-1{flex:0 0 8.3333%;max-width:8.3333%}
  .fb-form .fb-col-lg-2{flex:0 0 16.6667%;max-width:16.6667%}
  .fb-form .fb-col-lg-3{flex:0 0 25.0000%;max-width:25.0000%}
  .fb-form .fb-col-lg-4{flex:0 0 33.3333%;max-width:33.3333%}
  .fb-form .fb-col-lg-5{flex:0 0 41.6667%;max-width:41.6667%}
  .fb-form .fb-col-lg-6{flex:0 0 50.0000%;max-width:50.0000%}
  .fb-form .fb-col-lg-7{flex:0 0 58.3333%;max-width:58.3333%}
  .fb-form .fb-col-lg-8{flex:0 0 66.6667%;max-width:66.6667%}
  .fb-form .fb-col-lg-9{flex:0 0 75.0000%;max-width:75.0000%}
  .fb-form .fb-col-lg-10{flex:0 0 83.3333%;max-width:83.3333%}
  .fb-form .fb-col-lg-11{flex:0 0 91.6667%;max-width:91.6667%}
  .fb-form .fb-col-lg-12{flex:0 0 100.0000%;max-width:100.0000%}
}

/* ---- sections ---- */
.fb-form fieldset.fb-section{border:0;margin:0 0 1.6em;padding:0;min-inline-size:0}
.fb-form .fb-section-title{display:block;width:100%;float:none;font-size:1.3em;font-weight:bold;line-height:1.3;color:var(--fb-accent);
  border:0;border-bottom:2px solid var(--fb-accent);margin:0 0 .9em;padding:0 0 .35em}
.fb-form .fb-section-intro{margin:-.3em 0 1em;color:var(--fb-muted)}
.fb-form .fb-section-intro p:last-child{margin-bottom:0}
.fb-form .fb-heading{font-size:1.1em;font-weight:bold;margin:.4em 0 .8em}
.fb-form .fb-paragraph{margin:0 0 1em}
.fb-form .fb-divider{border:0;border-top:1px solid var(--fb-border);margin:.5em 0 1.4em}

/* ---- fields ---- */
.fb-form .fb-field{margin:0 0 1.1em}
.fb-form .fb-label{display:block;font-weight:bold;margin:0 0 .35em;line-height:1.35}
.fb-form .fieldRequired{color:var(--fb-error);margin-left:.15em}
.fb-form .form-control,.fb-form .form-select{width:100%;max-width:100%;min-height:2.6em;font-size:1em;border:1px solid var(--fb-border);border-radius:.35em;
  padding:.5em .75em;background-color:#fff;color:#333;box-shadow:none;height:auto}
.fb-form textarea.form-control{min-height:6em;resize:vertical}
.fb-form .form-control:focus,.fb-form .form-select:focus{border-color:var(--fb-accent);outline:0;box-shadow:0 0 0 3px rgba(51,122,183,.18)}
.fb-form .fb-help{display:block;font-size:.85em;color:var(--fb-muted);margin:.35em 0 0}
.fb-form label.error{display:block;color:var(--fb-error);font-weight:normal;font-size:.9em;margin:.35em 0 0}
.fb-form .form-control.error,.fb-form .form-select.error{border-color:var(--fb-error)}

/* horizontal layout: label beside the field from 768px */
@media (min-width:768px){
  .fb-layout-horizontal .fb-layout-row{display:grid;grid-template-columns:var(--fb-label-width) minmax(0,1fr);column-gap:1em;align-items:start}
  .fb-layout-horizontal .fb-layout-row>.fb-label{margin:0;padding-top:.55em;text-align:right}
  .fb-layout-horizontal .fb-col-md-6 .fb-layout-row,.fb-layout-horizontal .fb-col-md-4 .fb-layout-row,
  .fb-layout-horizontal .fb-col-md-3 .fb-layout-row{grid-template-columns:40% minmax(0,1fr)}
}

/* ---- choices ---- */
.fb-form .fb-choices{display:flex;flex-direction:column;gap:.35em;padding-top:.2em}
.fb-form .fb-choices-inline{flex-direction:row;flex-wrap:wrap;gap:.4em 1.4em}
.fb-form .fb-choice{display:inline-flex;align-items:flex-start;gap:.45em;font-weight:normal;margin:0;cursor:pointer;line-height:1.35}
.fb-form .fb-choice input{margin:.2em 0 0;flex:0 0 auto;width:1.05em;height:1.05em;position:static}
.fb-form .fb-choices-buttons{flex-direction:row;flex-wrap:wrap;gap:.5em}
.fb-form .fb-choices-buttons .fb-choice{position:relative;gap:0}
.fb-form .fb-choices-buttons .fb-choice input{position:absolute;opacity:0;width:1px;height:1px;margin:0}
.fb-form .fb-choices-buttons .fb-choice span{display:inline-block;padding:.55em 1.05em;border:1px solid var(--fb-border);border-radius:2em;background:#fff;
  color:#333;transition:background-color .15s,border-color .15s,color .15s}
.fb-form .fb-choices-buttons .fb-choice:hover span{border-color:var(--fb-accent)}
.fb-form .fb-choices-buttons .fb-choice input:checked+span{background:var(--fb-accent);border-color:var(--fb-accent);color:var(--fb-accent-text)}
.fb-form .fb-choices-buttons .fb-choice input:focus-visible+span{outline:2px solid var(--fb-accent);outline-offset:2px}
.fb-form .fb-check{margin:0}
.fb-form .fb-check-label{font-weight:normal;display:inline}

/* ---- repeating sections ---- */
.fb-form fieldset.fb-instance{border:1px solid var(--fb-border);border-radius:.5em;padding:1em 1em .2em;margin:0 0 1em;min-inline-size:0;background:#fcfcfc}
.fb-form .fb-instance-head{display:flex;align-items:center;justify-content:space-between;margin:0 0 .8em}
.fb-form .fb-instance-title{font-weight:bold;font-size:1.05em;color:var(--fb-accent)}
.fb-form .fb-remove{background:none;border:0;color:var(--fb-error);font-size:.9em;padding:.2em .4em;cursor:pointer;text-decoration:underline}
.fb-form .fb-add{margin:0 0 .5em;border-radius:2em;padding:.5em 1.2em;font-size:.95em}

/* ---- submit ---- */
.fb-form .fb-submit{margin-top:.5em}
.fb-form .fb-submit-btn{background:var(--fb-accent);border-color:var(--fb-accent);color:var(--fb-accent-text);font-size:1.05em;padding:.65em 1.8em;border-radius:2em}
.fb-form .fb-submit-btn:hover,.fb-form .fb-submit-btn:focus{filter:brightness(1.08);background:var(--fb-accent);border-color:var(--fb-accent);color:var(--fb-accent-text)}
@media (min-width:768px){ .fb-layout-horizontal .fb-submit{padding-left:calc(var(--fb-label-width) + 1em)} }

/* ---- sent ---- */
.fb-form.fb-sent{display:flex;gap:1em;align-items:flex-start;border:1px solid var(--fb-accent);border-radius:.6em;padding:1.2em 1.4em;background:#fff;outline:0}
.fb-form .fb-sent-icon{flex:0 0 auto;width:2.2em;height:2.2em;border-radius:50%;background:var(--fb-accent);color:var(--fb-accent-text);
  display:flex;align-items:center;justify-content:center;font-size:1.1em;font-weight:bold}
.fb-form .fb-sent-text p:last-child{margin-bottom:0}

/* jQuery UI date picker above skin headers */
.ui-datepicker{z-index:1060!important}
