/* Shared form design. Keep application-specific editors and controls intact. */
.wx-app .lw-form .form-group { margin-bottom: 18px !important; }
.wx-app .lw-form label {
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 0.8125rem !important;
  line-height: 1.5;
  color: #294743 !important;
}
.wx-app .lw-form .form-control {
  min-height: 44px;
  padding: 10px 13px !important;
  border: 1px solid #d5e2df !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgb(17 54 47 / 3%) !important;
  line-height: 1.5;
}
.wx-app .lw-form .form-control:focus {
  border-color: #087f6d !important;
  box-shadow: 0 0 0 3px rgb(8 127 109 / 13%) !important;
  outline: none;
}
.wx-app .lw-form .form-control:disabled,
.wx-app .lw-form .form-control[readonly] {
  background: #f3f6f5 !important;
  color: #687b77 !important;
}
.wx-app .lw-form .form-control.is-invalid,
.wx-app .lw-form .form-control[aria-invalid="true"] {
  border-color: #c94040 !important;
}
.wx-app .lw-form textarea.form-control { min-height: 112px; resize: vertical; }
.wx-app .lw-form .form-control::placeholder { color: #7a8d88 !important; opacity: 1; }
.wx-app .lw-form input[type="radio"],
.wx-app .lw-form input[type="checkbox"] { accent-color: #087f6d; }
/* Native choices must not inherit the block layout of text-field labels. */
.wx-app form input[type="radio"] + label,
.wx-app form input[type="checkbox"] + label {
  display: inline-flex !important;
  align-items: center;
  vertical-align: middle;
  margin: 0 16px 8px 6px !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.wx-app form label:has(> input[type="checkbox"]),
.wx-app form label:has(> input[type="radio"]) {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
}
.wx-app .lw-form .help-text,
.wx-app .lw-form .form-text { font-size: 0.75rem !important; line-height: 1.6; }
.wx-app .lw-form .alert { border-radius: 10px !important; padding: 12px 14px !important; font-size: 0.8125rem; }
.wx-app .lw-form .alert code { white-space: normal; overflow-wrap: anywhere; }
.wx-app .lw-form-modal-body { padding: 24px !important; }
.wx-app .lw-form-modal-body fieldset {
  padding: 20px !important;
  margin-top: 16px !important;
  border-color: #e0e9e6 !important;
  border-radius: 14px !important;
  background: #f8faf9 !important;
  box-shadow: none !important;
}
.wx-app .lw-form-modal-body legend { font-size: 0.8125rem !important; letter-spacing: normal !important; }
/* Only form dialogs: previews, galleries and canvas overlays retain their layout. */
.wx-app .lw-has-form .modal-dialog { margin-top: 24px !important; margin-bottom: 24px !important; }
.wx-app .lw-has-form .modal-content {
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 18px !important;
}
.wx-app .lw-has-form .modal-header { flex-shrink: 0; padding: 20px 24px !important; }
.wx-app .lw-has-form .modal-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.wx-app .lw-has-form .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 0 !important;
  padding: 16px 24px !important;
  background: #fff !important;
  box-shadow: 0 -4px 16px rgb(17 54 47 / 4%);
  gap: 10px;
}
.wx-app .lw-has-form .modal-header .close { opacity: 1 !important; }
.wx-app .wx-form-dialog-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.wx-app .wx-form-dialog-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; color: #087f6d; background: #e8f5f0; border: 1px solid #d4eae1; }
.wx-app .wx-form-dialog-description { margin: 5px 0 0; color: #72857f; font-size: 0.8125rem; line-height: 1.5; }
.wx-app .lw-has-form .modal-title { line-height: 1.3; letter-spacing: -0.025em !important; }
.wx-app .lw-has-form .modal-header .close { display: grid; place-items: center; flex: 0 0 34px; width: 34px; height: 34px; padding: 0 !important; margin: 0 0 0 16px !important; border: 1px solid #e0e9e6; border-radius: 10px; background: #f8faf9; }
.wx-app .lw-has-form .modal-header .close:focus-visible { outline: 3px solid #9bd5c6; outline-offset: 2px; }
.wx-app .lw-has-form .modal-body,
.wx-app .lw-has-form .lw-form-modal-body { background: #f3f6f5 !important; }
.wx-app .lw-has-form .lw-form-modal-body > .form-group,
.wx-app .lw-has-form .lw-form-modal-body > fieldset { background: #fff !important; border: 1px solid #e0e9e6 !important; border-radius: 14px !important; padding: 20px !important; }
.wx-app .lw-form-modal-body fieldset fieldset { background: #fff !important; border-style: dashed !important; }
.wx-app .lw-form-modal-body legend { color: #23594f !important; font-weight: 700 !important; padding: 3px 8px !important; border-radius: 6px; }
.wx-app .wx-required-mark { color: #b33d36; margin-left: 3px; }
.wx-app .lw-form .help-text { margin: 10px 0 16px !important; padding: 12px 14px !important; background: #eef6f3 !important; border: 1px solid #dcebe4 !important; border-radius: 10px !important; color: #527168 !important; line-height: 1.6 !important; font-size: 0.75rem !important; box-shadow: none !important; }
.wx-app .lw-form .help-text code { display: inline; color: #286a59 !important; background: transparent !important; font-size: 0.75rem !important; line-height: 1.8; white-space: normal; overflow-wrap: anywhere; padding: 0 !important; }
.wx-app .lw-form .selectize-input { min-height: 44px; padding: 10px 13px !important; border: 1px solid #d5e2df !important; border-radius: 10px !important; background: #fff !important; box-shadow: 0 1px 2px rgb(17 54 47 / 3%) !important; }
.wx-app .lw-form .selectize-input.focus { border-color: #087f6d !important; box-shadow: 0 0 0 3px rgb(8 127 109 / 13%) !important; }
.wx-app .lw-form .input-group > .form-control:not(:last-child) { border-top-right-radius: 0 !important; border-bottom-right-radius: 0 !important; }
.wx-app .lw-form .input-group > .form-control:not(:first-child) { border-top-left-radius: 0 !important; border-bottom-left-radius: 0 !important; }
.wx-app .lw-form .input-group-text { background: #eef3f1 !important; border-color: #d5e2df !important; color: #527168 !important; }
.wx-app .lw-form .has-danger .form-control { border-color: #c94040 !important; }
.wx-app .lw-has-form .modal-footer .btn { min-height: 42px; border-radius: 10px !important; padding: 10px 18px !important; font-size: 0.8125rem !important; font-weight: 600 !important; }
.wx-app .lw-has-form .modal-footer .btn-secondary { background: #fff !important; border: 1px solid #d5e2df !important; color: #375b51 !important; box-shadow: none !important; }
/* Keep native radios keyboard-accessible while presenting their labels as cards. */
.wx-app .wx-choice-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; position: relative; margin: 8px 0 18px; }
.wx-app .wx-choice-cards > input[type="radio"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.wx-app form .wx-choice-cards > input[type="radio"] + label { display: flex !important; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 12px !important; margin: 0 !important; border: 1px solid #d9e4df; border-radius: 11px; background: #fff; text-align: center; cursor: pointer; font-size: 0.8125rem !important; }
.wx-app .wx-choice-cards > input + label::before { content: ''; width: 15px; height: 15px; border: 1px solid #acbeb6; border-radius: 50%; flex-shrink: 0; background: #fff; }
.wx-app form .wx-choice-cards > input:checked + label { border-color: #087f6d; background: #edf8f3; color: #08634f !important; box-shadow: inset 0 0 0 1px #087f6d; }
.wx-app .wx-choice-cards > input:checked + label::before { border: 4px solid #087f6d; }
.wx-app .wx-choice-cards > input:focus-visible + label { outline: 3px solid #9bd5c6; outline-offset: 2px; }
.wx-app .wx-choice-cards > input:disabled + label { opacity: 0.5; cursor: not-allowed; }
.wx-app .wx-add-field { min-height: 38px; padding: 8px 13px !important; border: 1px dashed #77b9a8 !important; border-radius: 9px !important; background: #f2fbf7 !important; color: #087f6d !important; font-size: .78rem !important; font-weight: 700 !important; }
.wx-app .wx-add-field:hover:not(:disabled) { background: #e4f6ef !important; border-style: solid !important; }
.wx-app .wx-add-field:disabled { opacity: .55; cursor: not-allowed; }
.wx-app .wx-field-limit { color: #6d8880; font-weight: 500; }
.wx-app [x-cloak] { display: none !important; }
@media (max-width: 575.98px) {
  .wx-app .wx-choice-cards { grid-template-columns: 1fr; }
  .wx-app .wx-form-dialog-icon { display: none; }
  .wx-app .wx-form-dialog-description { font-size: 0.75rem; }
  .wx-app .lw-has-form .modal-dialog { margin: 12px !important; width: auto !important; }
  .wx-app .lw-has-form .modal-content { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
  .wx-app .lw-has-form .modal-header,
  .wx-app .lw-form-modal-body { padding: 16px !important; }
  .wx-app .lw-form-modal-body fieldset { padding: 14px !important; }
  .wx-app .lw-has-form .modal-footer { padding: 12px 16px !important; flex-wrap: wrap; }
}
