/* vendorplus-form.css — Form inputs, validation, file upload input, form-row/check-wrapper, Select2, Quill editor, form-field-combine */

/* FORM */
sup.required {
  color: var(--danger); /* Figma text/danger (4.31.0; was #e84242). sign-in.css hides it on purpose */
}
input.error {
  color: #e84242;
  background: red;
  border-color: #e84242;
}

#vplus-login {
  width: 6.25rem;
}

.file-upload {
  font-size: var(--bs-body-font-size);
  font-weight: 400;
  height: 100%;
  min-height: 0;
  line-height: 1rem;
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  padding: var(--space-2, 0.5rem);
  background: #fff;
  box-sizing: border-box;
  color: var(--bs-body-color);
  border-top-left-radius: var(--bs-border-radius) !important;
  border-bottom-left-radius: var(--bs-border-radius) !important;
}
.file-upload--hidden + .file-upload {
  border-right: 0;
}
.file-upload--hidden + .file-upload + .btn {
  border-left: 0;
  padding: .25rem .75rem;
}
.file-upload--hidden + .file-upload + .btn:before {
  border-left: 1px dashed var(--bs-border-color);
  content: "";
  margin-right: .5rem;
}
.file-upload--hidden:hover + .file-upload + .btn {
  background: transparent;
  color: var(--bs-primary);
}
.file-upload--hidden.d-none + .file-upload,
.file-upload--hidden.d-none + .file-upload + .btn {
  background-color: var(--bs-secondary-bg);
}
.file-upload--hidden.d-none + .file-upload + .btn {
  border-color: var(--bs-border-color);
  color: var(--bs-gray-700);
}

.input-group .file-upload--hidden {
  position: absolute;
  opacity: 0;
  width: 100%;
  z-index: 3;
  height: 100%;
}
.input-group.input-group div ~ button {
  border: var(--bs-border-width) solid var(--bs-border-color);
  border-left-color: transparent;
}
.input-group.input-group div ~ button:hover {
  background: transparent;
  color: var(--bs-primary);
}
.input-group:has(.form-floating + button) input {
  border-right-color: transparent;
}

.input-group:has(.d-none + input) input {
  border-top-left-radius: var(--bs-border-radius) !important;
  border-bottom-left-radius: var(--bs-border-radius) !important;
}

.input-group:has(input + .d-none) input {
  border-top-right-radius: var(--bs-border-radius) !important;
  border-bottom-right-radius: var(--bs-border-radius) !important;
}

.vplus-form-status:empty,
.vplus-file-photo-ai-uploaded:empty {
  display: none;
}
.vplus-file-photo-ai-uploaded {
  position: relative;
}
.vplus-file-photo-ai-uploaded img {
  border: 1px solid #f2f2f2;
  max-width: 100%;
  height: auto;
  border-radius: var(--bs-border-radius);
}
.form-row {
  /* align-self: center; */
  margin-bottom: 0.5rem;
}
.form-check-wrapper,
.form-radio-wrapper {
  min-height: 3.625rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-group .description {
  margin-top: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: var(--bs-body-font-size);
  color: #666;
}

.vplus-text-editor-wrapper {
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}

.vplus-text-editor-wrapper .ql-editor.ql-editor {
  font-size: var(--bs-body-font-size);
  padding: .5rem;
}

.vplus-file-wrapper {
  display: none;
  padding: 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: var(--bs-border-radius);
}
.vplus-file-wrapper.show {
  display: block !important;
  margin-top: 1rem;
}

.is-invalid + .select2 .select2-selection {
  border-color: var(--bs-danger);
  color: var(--bs-danger);
}

.form-floating > label {
  color: #666;
  font-weight: var(--vplus-font-weight-light);
}

.input-group.input-group.input-group:has(.invalid-feedback)
  .input-group-text
  + .form-floating
  .form-control {
  border-right: 1px solid var(--bs-border-color);
}
.input-group.input-group.input-group:has(.invalid-feedback)
  .input-group-text
  + .form-floating
  .form-control,
.input-group.input-group.input-group:has(.invalid-feedback)
  .form-floating
  + .btn,
.input-group.input-group.input-group:has(.invalid-feedback)
  .form-floating
  + .input-group-text {
  border-top-right-radius: var(--bs-border-radius);
  border-bottom-right-radius: var(--bs-border-radius);
}

/* Front-end admin bar: WordPress adds margin-top to <html>; Select2 subtracts
   it when positioning a body-level dropdown, so the panel opened over its
   field. Shift the container back. wp-admin uses padding (no offset needed). */
body.admin-bar:not(.wp-admin) > .select2-container.select2-container--open {
  margin-top: 2.875rem;
}
@media (min-width: 783px) {
  body.admin-bar:not(.wp-admin) > .select2-container.select2-container--open {
    margin-top: 2rem;
  }
}
.card-featured {
  --bs-card-border-color: var(--bs-warning-border-subtle);
  box-shadow: 0 0 0 0.25rem rgba(var(--bs-warning-rgb), 0.75);
}

.form-field-combine {
  display: flex;
}
.form-field-combine > .form-field-combine-item {
  flex: 1;
}
.form-field-combine > .form-field-combine-item:not(:last-child) input {
  border-radius: 0;
  border-right: 0;
}
.form-field-combine > .form-field-combine-item:first-child input {
  border-radius: var(--bs-border-radius) 0 0 var(--bs-border-radius);
  border-right: 0;
}
.form-field-combine > .form-field-combine-item:last-child input {
  border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
  border-left-style: dashed;
}

#vplus-sign-in-form .row {
  gap: 1rem;
}

[data-ref].invalid-feedback:empty {
  display: none;
}

/* Field feedback under an adorned field (5.10.0). With adornment_before /
   adornment_after the form builder wraps the control in .input-group and
   prints the [data-ref] feedback slot after the group (after .form-floating
   too when the label floats), so Bootstrap's sibling rule
   (.is-invalid ~ .invalid-feedback) never reaches it. Show the filled slot
   while a control inside that group is invalid. Each field has its own
   .form-group, so only that field's slot can match; a plain field has no
   .input-group before its slot and keeps Bootstrap's own rule (one slot per
   field, so nothing shows twice). Was a vp-auction-manager page rule
   (1.40.0, .vplus-item-form only). */
.input-group:has(.is-invalid) ~ [data-ref].invalid-feedback:not(:empty),
.form-floating:has(> .input-group .is-invalid) ~ [data-ref].invalid-feedback:not(:empty) {
  display: block;
}

.alert:empty {
  display: none;
}

.ql-editor.ql-editor > * {
  margin-bottom: 1rem;
}

.card-body .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--bs-border-color);
}
.card-body .ql-editor {
  padding: 1rem 0;
}
.card-body .ql-container {
  font-family: var(--vplus-font-family-base);
  font-size: 1rem;
}
.card-body .ql-container *:not(strong) {
  font-weight: var(--vplus-font-weight-light);
}
.card-body .ql-container.ql-snow {
  border: 0;
}

.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  z-index: 100;
}

.form-row .btn-group .btn {
  border-color: #ccc;
  margin-bottom: 0;
}

.form-row-separator {
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.select2-container--bootstrap-5.select2-container--bootstrap-5
  .select2-selection--single
  .select2-selection__rendered
  .select2-selection__placeholder {
  font-weight: var(--bs-font-weight-light);
}

.select2-container--bootstrap-5.select2-container--bootstrap-5
  .select2-selection,
.select2-container--bootstrap-5.select2-container--bootstrap-5.select2-container--disabled
  .select2-selection,
.select2-container--bootstrap-5.select2-container--bootstrap-5.select2-container--disabled.select2-container--focus
  .select2-selection {
  border-color: var(--bs-border-color);
}
.form-floating .select2.select2-container--bootstrap-5 .select2-selection {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* =============================================================================
   Select2 default theme -> Figma `Chrome / Select` (77:14463)
   Desktop 36px / Mobile 44px, 1px border/strong, 6px radius, 13px text/muted,
   12px side padding, 13px light chevron. Appearance only: width stays with
   the caller (vplusInitSelect2() defaults to 100%).
   Every selector carries an extra .select2-container class: the vendor
   select2.min.css can print after this file (it does on the front end), and
   at equal specificity its 28px height / grey border / top:1px arrow won.
   ============================================================================= */

.select2-container.select2-container--default {
  --vplus-select2-height: 2.25rem;
  --vplus-select2-chevron-size: 0.75rem;
  font-size: var(--bs-body-font-size);
  font-family: inherit;
}

@media (max-width: 575px) {
  .select2-container.select2-container--default {
    --vplus-select2-height: 2.75rem;
    --vplus-select2-chevron-size: 0.875rem;
  }
}

.select2-container.select2-container--default .select2-selection--single {
  display: flex;
  align-items: center;
  height: var(--vplus-select2-height);
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 0.375rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.select2-container.select2-container--default .select2-selection--single .select2-selection__rendered {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 2rem 0 0.75rem;
  line-height: calc(var(--vplus-select2-height) - 2px);
  color: var(--ink);
}

.select2-container.select2-container--default .select2-selection--single .select2-selection__placeholder {
  color: var(--ink-3);
}

/* Chevron: a Font Awesome Light `chevron-down` (<i class="fal fa-chevron-down
   vplus-select2-chevron">) that vplusInitSelect2() appends to the selection
   (select2.js), 4.43.0, user decision D7 2026-11-16 (design-rules §4: FA Light
   only; was a CSS mask-drawn chevron). The FA kit may swap the <i> for an <svg>
   with the same classes, so the rules target the class, not the tag. The vendor
   arrow is hidden. */
.select2-container.select2-container--default .select2-selection--single .select2-selection__arrow {
  display: none;
}

.select2-container.select2-container--default .select2-selection .vplus-select2-chevron {
  position: absolute;
  top: 50%;
  right: 0.75rem;
  width: var(--vplus-select2-chevron-size);
  height: var(--vplus-select2-chevron-size);
  font-size: var(--vplus-select2-chevron-size);
  line-height: 1;
  color: var(--ink-3); /* icon/muted */
  transform: translateY(-50%);
  transition: transform 0.2s;
  pointer-events: none;
}

.select2-container.select2-container--default.select2-container--open .select2-selection .vplus-select2-chevron {
  transform: translateY(-50%) rotate(180deg);
}

.select2-container.select2-container--default .select2-selection--single .select2-selection__clear {
  margin: 0 0 0 0.5rem;
  font-weight: 400;
  color: var(--ink-4);
}

.select2-container.select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: var(--ink);
}

.select2-container.select2-container--default .select2-selection--single:hover {
  border-color: var(--line-hover); /* Figma border/control-hover (4.31.0; was --line-strong) */
}

/* Figma Chrome / Select Focus: shared focus ring (4.31.0; was 1px navy border + 1px shadow). */
.select2-container.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container.select2-container--default.select2-container--open .select2-selection--single {
  border-color: var(--line-2);
  box-shadow: var(--focus-ring);
  outline: none;
}

.select2-container.select2-container--default.select2-container--open.select2-container--below .select2-selection--single,
.select2-container.select2-container--default.select2-container--open.select2-container--above .select2-selection--single {
  border-radius: 0.375rem;
}

/* Figma disabled: bg/muted fill, border/default, no opacity change. */
.select2-container.select2-container--default.select2-container--disabled .select2-selection--single {
  background: var(--bg-3);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

/* Multi-select: same box as single; chosen values as compact chips. */
.select2-container.select2-container--default .select2-selection--multiple {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--vplus-select2-height);
  padding: 0.1875rem 2rem 0.1875rem 0.75rem;
  background: #fff;
  border: 1px solid var(--line-2);
  border-radius: 0.375rem;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.select2-container.select2-container--default .select2-selection--multiple::after {
  content: "";
}

.select2-container.select2-container--default .select2-selection--multiple .select2-selection__rendered {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0;
}

.select2-container.select2-container--default .select2-selection--multiple .select2-selection__choice {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin: 0;
  padding: 0 0.5rem;
  line-height: 1.5rem;
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 0.25rem;
  color: var(--ink);
}

.select2-container.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
  margin: 0;
  color: var(--ink-4);
  font-weight: 400;
}

.select2-container.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
  color: var(--ink);
}

.select2-container.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
  margin: 0;
  padding: 0;
  height: 1.5rem;
  font-size: var(--bs-body-font-size);
  font-family: inherit;
}

.select2-container.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field::placeholder {
  color: var(--ink-3);
}

.select2-container.select2-container--default .select2-selection--multiple:hover {
  border-color: var(--line-hover); /* 4.31.0; was --line-strong */
}

.select2-container.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container.select2-container--default.select2-container--open .select2-selection--multiple {
  border: 1px solid var(--line-2);
  box-shadow: var(--focus-ring); /* 4.31.0; was 1px navy border + 1px shadow */
  border-radius: 0.375rem;
  outline: none;
}

.select2-container.select2-container--default.select2-container--disabled .select2-selection--multiple {
  background: var(--bg-3);
  border-color: var(--line);
  cursor: not-allowed;
}

/* Error (4.31.0): border/danger on a Select2 whose <select> has .is-invalid.
   The older `.is-invalid + .select2 .select2-selection` rule above lost to
   the 1px border/control rules at equal specificity. */
.is-invalid + .select2-container.select2-container--default .select2-selection--single,
.is-invalid + .select2-container.select2-container--default .select2-selection--multiple {
  border-color: var(--danger);
}

.select2-container.select2-container--default .select2-dropdown {
  margin-top: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: #fff;
  box-shadow: 0 0.5rem 1.5rem rgba(29, 30, 27, 0.08), 0 1px 2px rgba(29, 30, 27, 0.06);
  overflow: hidden;
  font-size: var(--bs-body-font-size);
}

.select2-container.select2-container--default .select2-dropdown--above {
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.select2-container.select2-container--default .select2-search--dropdown {
  padding: 0.5rem;
  border-bottom: 1px solid var(--line);
}

.select2-container.select2-container--default .select2-search--dropdown .select2-search__field {
  height: 2rem;
  padding: 0 var(--space-3, 0.75rem);
  border: 1px solid var(--line-2);
  border-radius: 0.375rem;
  font-size: var(--bs-body-font-size);
}

.select2-container.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--line-2);
  box-shadow: var(--focus-ring); /* 4.31.0; fits inside the 8px search padding */
  outline: none;
}

.select2-container.select2-container--default .select2-results > .select2-results__options {
  max-height: 16rem;
  padding: 0.25rem;
}

.select2-container.select2-container--default .select2-results__option {
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  color: var(--ink);
}

.select2-container.select2-container--default .select2-results__option[aria-selected="true"] {
  background: var(--selected-bg);
  font-weight: 500;
}

.select2-container.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background: var(--accent-tint);
  color: var(--accent);
}

.select2-container.select2-container--default .select2-results__option[aria-disabled="true"] {
  color: var(--ink-4);
}

.select2-container.select2-container--default .select2-results__message {
  color: var(--ink-3);
}

/* Reserve room for the shared Select2 height, including mobile touch sizing. */
.flatpickr-calendar .flatpickr-months .flatpickr-month,
.flatpickr-calendar .flatpickr-current-month {
  height: 3.25rem;
}

.flatpickr-calendar .flatpickr-current-month {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding-top: 0;
}

.flatpickr-current-month > .select2-container.select2-container--default {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
}

.flatpickr-current-month > .numInputWrapper {
  flex: 0 0 6ch;
}

.flatpickr-calendar .flatpickr-months .flatpickr-prev-month,
.flatpickr-calendar .flatpickr-months .flatpickr-next-month {
  display: flex;
  align-items: center;
  height: 3.25rem;
}

.form-control.disabled {
  background-color: var(--bg-3); /* Figma bg/muted (4.31.0; was --bs-secondary-bg) */
  border-color: var(--line);
  opacity: 1;
}

/* =============================================================================
   Figma form control states (4.31.0): Chrome / Input 77:14452, Select 77:14463,
   Date input 1115:390083, Textarea 1115:390084. Bootstrap 5.3.3 hard-codes its
   focus (#86b7fe + blue ring) and invalid-icon (#dc3545) colours, so they are
   restyled here; front end only (this file never loads in wp-admin).
   ============================================================================= */

.form-control,
.form-select {
  border-color: var(--line-2);   /* border/control */
  color: var(--ink);             /* text/default */
}

.form-control:hover:not(:disabled):not(:focus):not(.is-invalid),
.form-select:hover:not(:disabled):not(:focus):not(.is-invalid) {
  border-color: var(--line-hover); /* border/control-hover */
}

.form-control:focus,
.form-select:focus {
  border-color: var(--line-2);
  box-shadow: var(--focus-ring);
  color: var(--ink);
  outline: 0;
}

/* Filled disabled: bg/muted + border/default. */
.form-control:disabled,
.form-select:disabled {
  background-color: var(--bg-3);
  border-color: var(--line);
}

/* Error: red border only, no icon inside the field (Figma Chrome / Input
   Error 1321:12340). The message row under the field carries a Font Awesome
   Light circle-exclamation (form-builder.js). 4.43.0, user decision D7
   2026-11-16; was a data-URI icon drawn in the field. */
.was-validated .form-control:invalid,
.form-control.is-invalid {
  background-image: none;
  padding-right: 0.75rem; /* control text inset */
}
.was-validated .form-select:invalid:not([multiple]):not([size]),
.was-validated .form-select:invalid:not([multiple])[size="1"],
.form-select.is-invalid:not([multiple]):not([size]),
.form-select.is-invalid:not([multiple])[size="1"] {
  --bs-form-select-bg-icon: none;
}

/* Message row: icon + text (Figma Form field 1104:4415). */
.invalid-feedback .vplus-invalid-icon {
  margin-right: var(--space-1, 0.25rem);
}

/* Prefix / suffix boxes: bg/muted + border/control. Since 4.37.0 this is the
   Figma Affix=Addon look, kept only for an affix that is its own control. */
.input-group-text {
  background-color: var(--bg-3);
  border-color: var(--line-2);
  color: var(--ink-3);
}

/* =============================================================================
   Inline affixes + Input action, Figma Chrome / Input Affix=Inline and Input
   action 1321:12007 (4.37.0; rule "Input prefixes and suffixes", 2026-11-14).
   Opt-in: the form builder adds .vplus-input-group--inline when every
   adornment is fixed text/icon markup or a button flagged 'inline'. The group
   reads as ONE field: each child keeps its own outer border (so control
   heights do not change), the inner join is removed, the affix is
   transparent, and hover / focus / error / disabled are drawn on the group.
   The !important declarations beat the high-specificity field rules in
   shared.css (.vplus-form input:not(...)) and sign-in.css.
   ============================================================================= */

.input-group.vplus-input-group--inline {
  flex-wrap: nowrap;
  border-radius: var(--bs-border-radius);
}
.vplus-input-group--inline > * {
  margin-left: 0 !important;
}
.vplus-input-group--inline > .form-control,
.vplus-input-group--inline > .form-select {
  box-shadow: none !important;
}
.vplus-input-group--inline > .input-group-text,
.vplus-input-group--inline > .vplus-input-action {
  background-color: var(--surface, #fff);
  border: 1px solid var(--line-2);
  color: var(--ink-3);
}
.vplus-input-group--inline > .input-group-text {
  padding-inline: 0.75rem;
  font-size: 0.8125rem;
}

/* Inner join: no border and no radius where two children meet. */
.vplus-input-group--inline > :not(:last-child) {
  border-right-width: 0 !important;
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}
.vplus-input-group--inline > :not(:first-child) {
  border-left-width: 0 !important;
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}
.vplus-input-group--inline > .input-group-text:first-child {
  padding-right: 0;              /* 12px outer side, 8px gap from the input's own padding */
}
.vplus-input-group--inline > .input-group-text:first-child + .form-control {
  padding-left: 0.5rem !important;
}
.vplus-input-group--inline > .input-group-text:last-child {
  padding-left: 0;
}
.vplus-input-group--inline > .form-control:has(+ .input-group-text:last-child) {
  padding-right: 0.5rem !important;
}

/* States on the whole field. */
.vplus-input-group--inline:hover:not(:focus-within):not(:has(.is-invalid, :disabled)) > * {
  border-color: var(--line-hover) !important;
}
.vplus-input-group--inline:focus-within {
  box-shadow: var(--focus-ring);
}
.vplus-input-group--inline:focus-within > * {
  border-color: var(--line-2) !important;
}
.vplus-input-group--inline:has(.is-invalid) > * {
  border-color: var(--bs-form-invalid-border-color, var(--danger)) !important;
}
.vplus-input-group--inline:has(.form-control:disabled, .form-select:disabled) > * {
  background-color: var(--bg-3) !important;
  border-color: var(--line) !important;
}

/* Input action: a real button inside the field (password show/hide only).
   Visual width follows the control height; the tap target is 44 x 44. */
.input-group.vplus-input-group--inline > .vplus-input-action.vplus-input-action {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 2.25rem;
  min-width: 0;
  height: auto;
  min-height: 0;
  padding: 0;
  box-shadow: none;
  font-size: 0.875rem;
  line-height: 1;
  border-radius: 0 var(--bs-border-radius) var(--bs-border-radius) 0;
}
.input-group.vplus-input-group--inline > .vplus-input-action.vplus-input-action::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
}
.input-group.vplus-input-group--inline > .vplus-input-action.vplus-input-action:hover {
  color: var(--ink);
}
.input-group.vplus-input-group--inline > .vplus-input-action.vplus-input-action:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 2px var(--accent, #1c3f85);
}
@media (max-width: 575.98px) {
  .input-group.vplus-input-group--inline > .vplus-input-action.vplus-input-action {
    width: 2.75rem;
  }
}

/* =============================================================================
   Checkbox + radio, Figma Chrome / Checkbox 155:544 and Chrome / Radio
   208:45577 (4.31.0). Desktop 16px box, Mobile 20px (below 576px), checkbox
   radius/xs, 8px to the label. Switches (.form-switch) keep Bootstrap sizing
   but share the navy checked colour and focus ring. Sizing selectors use
   :where() so they stay at Bootstrap's specificity and sign-in.css (which
   styles its own checkbox) still wins.
   ============================================================================= */

.form-check-input:where(:not(.form-switch .form-check-input)) {
  width: 1rem;
  height: 1rem;
  margin-top: 0.125rem;
}
.form-check:where(:not(.form-switch, .form-check-reverse)) {
  padding-left: 1.5rem;          /* 16px box + 8px gap */
}
.form-check:where(:not(.form-switch, .form-check-reverse)) .form-check-input {
  margin-left: -1.5rem;
}
.form-check-input[type="checkbox"]:where(:not(.form-switch .form-check-input)) {
  border-radius: var(--radius-xs);
}

.form-check-input {
  border-color: var(--line-2);   /* border/control */
}

.form-check-input:hover:not(:checked):not(:disabled):not(:indeterminate):not(.is-invalid) {
  border-color: var(--line-hover);
}

.form-check-input:focus {
  border-color: var(--line-2);
  box-shadow: var(--focus-ring);
  outline: 0;
}

/* Checked / indeterminate: bg/brand + border/brand (Bootstrap #0d6efd). */
.form-check-input:checked,
.form-check-input[type="checkbox"]:indeterminate {
  background-color: var(--selected-control);
  border-color: var(--selected-control);
}

/* Checkbox label: Figma Chrome / Checkbox label 13 Regular text/muted (155:523),
   4.43.0, user decision D12 2026-11-16 (was inherited --ink). Toggle switches keep
   their own label colour. */
.form-check:not(.form-switch) > .form-check-input[type="checkbox"] ~ .form-check-label {
  color: var(--ink-3, #6f716b);
}

/* Filled disabled; no opacity. Checked disabled keeps the mark in icon/muted. */
.form-check-input:disabled {
  background-color: var(--bg-3);
  border-color: var(--line);
  opacity: 1;
}
.form-check-input:disabled ~ .form-check-label,
.form-check-input[disabled] ~ .form-check-label {
  opacity: 1;
}
.form-check-input[type="checkbox"]:checked:disabled {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%236f716b' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
.form-check-input[type="radio"]:checked:disabled {
  --bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%236f716b'/%3e%3c/svg%3e");
}

/* Font Awesome Light check mark (bootstrap.js appends <i class="fal fa-check
   vplus-check-mark"> as the last child of a standard .form-check), 4.43.0, user
   decision D7 2026-11-16. Where the mark exists Bootstrap's drawn tick is
   switched off; elsewhere the old tick stays. The FA kit may swap the <i> for an
   <svg> with the same classes. Centred on the 16px box (20px below 576px). */
.form-check:has(> .vplus-check-mark) {
  position: relative;
}
.form-check:has(> .vplus-check-mark) > .form-check-input[type="checkbox"]:checked {
  --bs-form-check-bg-image: none;
}
.form-check > .vplus-check-mark {
  display: none;
  position: absolute;
  left: 0.5rem;
  top: calc(0.125rem + 0.5rem);
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  line-height: 1;
  color: #fff; /* icon/inverse on bg/brand */
  pointer-events: none;
}
.form-check > .form-check-input[type="checkbox"]:checked ~ .vplus-check-mark {
  display: inline-block;
}
.form-check > .form-check-input[type="checkbox"]:checked:disabled ~ .vplus-check-mark {
  color: var(--ink-3, #6f716b); /* icon/muted */
}
@media (max-width: 575.98px) {
  .form-check > .vplus-check-mark {
    left: 0.625rem;
    top: 0.625rem;
    font-size: 0.875rem;
  }
  .form-check:where(:not(.form-switch, .form-check-reverse, .d-flex, .vplus-signin-form .form-check):has(> .form-check-input + .form-check-label)) > .vplus-check-mark {
    top: calc(0.75rem + 0.625rem);
  }
}

/* Error: border/danger (Bootstrap reads --bs-form-invalid-border-color). */
.form-check-input.is-invalid:focus,
.was-validated .form-check-input:invalid:focus {
  box-shadow: var(--focus-ring);
}

@media (max-width: 575.98px) {
  .form-check-input:where(:not(.form-switch .form-check-input)) {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0;
  }
  .form-check:where(:not(.form-switch, .form-check-reverse)) {
    padding-left: 1.75rem;       /* 20px box + 8px gap */
  }
  .form-check:where(:not(.form-switch, .form-check-reverse)) .form-check-input {
    margin-left: -1.75rem;
  }

  /* 44px hit areas (Figma Chrome / Checkbox 155:544, Chrome / Radio
     208:45577, Mobile size), 4.34.0. CSS only, no markup change:
     - input followed by a .form-check-label (a <label for> sibling or a
       <span> inside a wrapping <label class="form-check">): the label gets
       12px block padding and a 20px line, so the tappable label is 44px
       high; the 20px box moves down 12px to stay level with the text.
     - a wrapping <label class="form-check"> is at least 44px high.
     Switches, reversed checks, d-flex rows and the sign-in form (own
     checkbox styles) are left alone. :where() keeps Bootstrap-level
     specificity; :has() unsupported = rule ignored (old layout). */
  .form-check:where(:not(.form-switch, .form-check-reverse, .d-flex, .vplus-signin-form .form-check):has(> .form-check-input + .form-check-label)) > .form-check-input {
    margin-top: 0.75rem;
  }
  .form-check:where(:not(.form-switch, .form-check-reverse, .d-flex, .vplus-signin-form .form-check):has(> .form-check-input + .form-check-label)) > .form-check-label {
    display: inline-block;
    padding-block: 0.75rem;
    line-height: 1.25rem;
  }
  label.form-check:where(:not(.form-switch, .form-check-reverse, .vplus-signin-form .form-check)) {
    min-height: 2.75rem;
  }
}

/* INPUT SUFFIX — input + adjacent label/button sitting flush */
.vplus-input-suffix {
  display: flex;
  align-items: stretch;
}
.vplus-input-suffix > :first-child.form-control,
.vplus-input-suffix > :first-child .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.vplus-input-suffix > :last-child:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  margin-left: -1px;
}

/* TEXTAREA AUTO-RESIZE */
.vplus-textarea-wrap {
  position: relative;
}
textarea[data-auto-resize] {
  resize: none;
  overflow-y: hidden;
  max-height: 37.5rem;
}
/* Character counter (Figma Chrome / Form field 1104:4415, Counter 1156:7979),
   4.34.0: JetBrains Mono 12 Regular, text/muted (was a dark pill inside the
   field). Fallback position: inside the field, bottom right. */
.vplus-char-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.75rem;
  z-index: 1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: var(--ink-3, #6f716b);
  background: transparent;
  padding: 0;
  border-radius: 0;
  pointer-events: none;
  user-select: none;
}
/* Form-builder fields with a visible .form-label before the field: the
   counter sits at the right end of the label row (Figma: spacer, then the
   counter with 12px left padding). The JS still appends it to
   .vplus-textarea-wrap; only its position changes. The label keeps its own
   0.5rem bottom margin, so bottom: 100% + 0.5rem lines the two up. */
.form-label ~ .vplus-textarea-wrap > .vplus-char-count {
  bottom: calc(100% + 0.5rem);
  right: 0;
  padding-left: var(--space-3, 0.75rem);
}
