/* Form API. */
div.action,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: start;
}

div.action,
div.form-actions {
  align-items: center;
  width: 100%;
  flex-grow: 1;
  justify-content: center;
}

.form-radios,
.form-checkboxes {
  display: grid;
}

.form-type-radio,
.form-type-checkbox {
  display: inline-block;
  width: 100%;
}

.form-type-radio .description,
.form-type-checkbox .description {
  width: 100%;
}

.form-radios .form-item,
.form-checkboxes .form-item {
  margin-block-start: 0.4em !important;
  margin-block-end: 0.4em !important;
  display: flex;
  align-items: center;
  justify-content: start;
}

fieldset {
  width: 100%;
}

input[type="radio"],
input[type="checkbox"] {
  display: inline-flex;
  justify-content: start;
  align-items: self-start;
  flex-wrap: wrap;
  margin-block-start: -2px;
  margin-inline-end: 8px;
  margin-block-end: 0;
  margin-inline-start: 0;
}

.form-type-boolean input[type="checkbox"] {
  margin-block-start: 2px;
}

.form-type-boolean > *:not(.discription) {
  float: var(--solo-text-align-start);
}

.form-type-radio label,
.form-type-checkbox label {
  margin-inline-start: var(--solo-px4) !important;
  float: none !important;
}

[dir="rtl"] .form-type-radio label,
[dir="rtl"] .form-type-checkbox label {
  margin-inline-end: var(--solo-px4) !important;
  margin-inline-start: 0 !important;
}

.marker {
  color: #e00;
}

input[type="checkbox"]:focus,
input[type="radio"]:focus {
  border-color: var(--solo-tx);
  border-width: 2px;
  border-style: solid;
  outline-width: 4px;
  outline-style: double;
  outline-offset: -1px;
}

abbr.tabledrag-changed,
abbr.ajax-changed {
  border-block-end: none;
}

.form-item input.error,
.form-item textarea.error,
.form-item select.error {
  border: var(--solo-px2) solid red;
}

.form-wrapper .field-multiple-table .label {
  font-size: inherit;
}

.form-required::after {
  display: inline-block;
  width: var(--solo-px10);
  height: var(--solo-px10);
  margin-block: 0;
  margin-inline: 0.3em;
  content: "";
  vertical-align: super;
  background-image: url(../../images/icons/required.svg);
  background-repeat: no-repeat;
  background-size: var(--solo-px10) var(--solo-px10);
}

/* Inline Error Message. */
.form-item--error-message::before {
  display: inline-block;
  width: var(--solo-px16);
  height: var(--solo-px16);
  margin-block: 0;
  margin-inline: 0.3em;
  content: "";
  vertical-align: middle;
  background-image: url(../../images/icons/error.svg);
  background-repeat: no-repeat;
  background-size: var(--solo-px16) var(--solo-px16);
}

input,
textarea,
.region-title__action a,
.admin-context  form .form-actions > a,
.admin-context  .action-links li > a,
.view-filters details.form-wrapper {
  -webkit-box-shadow: inset 0 0 var(--solo-px5) rgba(51, 44, 51, 0.1);
  -moz-box-shadow: inset 0 0 var(--solo-px5) rgba(51, 44, 51, 0.1);
  box-shadow: inset 0 0 var(--solo-px5) rgba(51, 44, 51, 0.1);
}

input[type=radio],
input[type=checkbox] {
  box-shadow: none;
}

form.system-theme-settings .details-wrapper {
  display: block;
}

form.system-theme-settings .details-wrapper .form-type-textfield label {
  display: block;
}

form.system-theme-settings .details-wrapper .form-element--api-color {
  min-height: 3.25rem;
  border: 0;
}

form .form-item__description {
  padding-block: var(--solo-px8);
  padding-inline: 0;
}

.form-wrapper {
  align-items: start;
}

.dropbutton-toggle button {
  all: unset;
}

.dropbutton-wrapper.open .solo-button {
  width: 100%;
  border: 0 !important;
  margin: 0 !important;
}

/* Detect date ranges by looking for min/max fields */
#page-wrapper .views-exposed-form .exposed-form .solo-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  max-width: 412px;
}

/* for default drupal field*/
form.views-exposed-form .exposed-form fieldset.solo-date-range {
  padding-block-start: 0.35em;
  padding-inline: 0.75em;
  padding-block-end: 0.625em;
}

form.views-exposed-form .exposed-form fieldset.solo-date-range > div {
  gap: 2px;
}

form fieldset:has([name*="[min]"]):has([name*="[max]"]) .fieldset-wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  padding: 0;
}

form fieldset:has([name*="[min]"]):has([name*="[max]"]) .fieldset-wrapper > div {
  margin: 0;
  min-width: 170px;
}

.solo-date-range .form-type-date,
fieldset:has([name*="[min]"]):has([name*="[max]"]) .form-item {
  flex: 1;
  min-width: 170px;
}
