/* 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 */
.solo-date-range-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
}

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

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

fieldset:has([name*="[min]"]):has([name*="[max]"]) .form-item {
  flex: 1;
}

/* Primary date range styling */
.solo-date-range-container .form-type-date {
  flex: 1;
  min-width: 150px;
}
