[data-drupal-selector=edit-preset-accent-color] .form-radios {
  display: flex;
  flex-wrap: wrap;
  margin-block-start: var(--gin-spacing-xs);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color {
  position: relative;
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input {
  cursor: pointer;
  width: 32px;
  height: 32px;
  inset-block-start: var(--gin-spacing-m);
  margin-inline-end: var(--gin-spacing-xs);
  border-color: transparent;
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input, .gin--dark-mode [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input {
  background-color: var(--gin-color-primary);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:hover {
  box-shadow: none;
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:hover, [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:focus, [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:focus:hover, [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:checked {
  border-color: var(--gin-color-primary);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:focus:checked, [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:focus, [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:checked {
  background-color: var(--gin-color-primary);
  box-shadow: inset 0 0 0 2px var(--gin-bg-layer), inset 0 0 0 4px var(--gin-color-primary);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input[data-gin-accent=custom] {
  background-color: #fff;
  background-image: url(../../media/settings/custom-color.jpg);
  background-size: 100%;
  background-repeat: no-repeat;
  border-color: var(--gin-border-color);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input[data-gin-accent=custom]:checked {
  background-color: #fff;
  border-color: var(--gin-border-color);
  border-width: 1px;
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color .form-item__label {
  display: none;
  visibility: hidden;
  z-index: 1;
  position: absolute;
  inset-block-start: 100%;
  inset-inline-start: -10px;
  padding: var(--gin-spacing-xs);
  color: var(--gin-color-contextual-text);
  background: var(--gin-color-contextual);
  border-radius: var(--gin-border-xs);
}

[dir="ltr"] [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color .form-item__label {
  transform: translateX(-50%);
}

[dir="rtl"] [data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color .form-item__label {
  transform: translateX(50%);
}

[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color:hover .form-item__label,
[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:active ~ .form-item__label,
[data-drupal-selector=edit-preset-accent-color] .form-radios .form-item--preset-accent-color input:focus ~ .form-item__label {
  display: block;
  visibility: visible;
}

[data-drupal-selector=edit-accent-group] .form-type--color,
[data-drupal-selector=edit-accent-group] .form-type--textfield,
[data-drupal-selector=edit-focus-group] .form-type--color,
[data-drupal-selector=edit-focus-group] .form-type--textfield {
  float: inline-start;
  margin: 0;
  margin-block-end: var(--gin-spacing-xs);
}

[data-drupal-selector=edit-accent-group] .form-type--color,
[data-drupal-selector=edit-focus-group] .form-type--color {
  margin-inline-end: var(--gin-spacing-xs);
}

[data-drupal-selector=edit-accent-group] .fieldset__description,
[data-drupal-selector=edit-focus-group] .fieldset__description {
  clear: both;
}

[data-drupal-selector=edit-enable-darkmode] .form-radios {
  display: inline-flex;
  flex-wrap: wrap;
  padding: 0 var(--gin-spacing-xxs);
  border: 1px solid var(--gin-border-color-form-element);
  border-radius: var(--gin-spacing-xl);
}

.gin--dark-mode [data-drupal-selector=edit-enable-darkmode] .form-radios {
  background: var(--gin-bg-layer2);
}

[data-drupal-selector=edit-enable-darkmode] .form-radios .form-type--radio {
  margin-block: 0;
  margin-inline-start: 0;
}

[data-drupal-selector=edit-enable-darkmode] .form-radios .form-item__label {
  display: inline-block;
  padding: .375rem var(--gin-spacing-m);
  margin: var(--gin-spacing-xxs) 0;
  border: 2px solid transparent;
  border-radius: var(--gin-border-xl);
  box-sizing: border-box;
}

[data-drupal-selector=edit-enable-darkmode] .form-radios .form-item__label:hover {
  color: var(--gin-color-primary);
  background: var(--gin-color-primary-light-hover);
}

[data-drupal-selector=edit-enable-darkmode] .form-radios input {
  opacity: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  border: 0;
}

[data-drupal-selector=edit-enable-darkmode] .form-radios input:active + .form-item__label, [data-drupal-selector=edit-enable-darkmode] .form-radios input:focus + .form-item__label {
  box-shadow: 0 0 0 1px var(--gin-color-focus-border), 0 0 0 4px var(--gin-color-focus);
}

[data-drupal-selector=edit-enable-darkmode] .form-radios input:checked + .form-item__label {
  color: var(--gin-color-button-text);
  background: var(--gin-color-primary);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios,
[data-drupal-selector=edit-layout-density] .form-radios {
  display: flex;
  flex-wrap: wrap;
  margin-block-start: var(--gin-spacing-xs);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item,
[data-drupal-selector=edit-layout-density] .form-radios .form-item {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  width: 140px;
  margin: 0;
  margin-inline-end: var(--gin-spacing-s);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input {
  cursor: pointer;
  position: static;
  width: 140px;
  height: 100px;
  margin-inline-start: 0;
  border-radius: var(--gin-border-l);
  transform: none;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input:focus,
[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input [data-drupal-selector=edit-layout-density] .form-radios .form-item input:focus,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input:focus,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input [data-drupal-selector=edit-layout-density] .form-radios .form-item input:focus {
  border-color: var(--gin-color-text);
  box-shadow: none;
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input:checked,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input:checked {
  border-color: var(--gin-color-primary);
  box-shadow: inset 0 0 0 1px var(--gin-color-primary);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input:focus,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input:focus {
  box-shadow: 0 0 0 3px var(--gin-color-focus);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input:checked:focus,
[data-drupal-selector=edit-layout-density] .form-radios .form-item input:checked:focus {
  box-shadow: inset 0 0 0 1px var(--gin-color-primary), 0 0 0 3px var(--gin-color-focus);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item .form-item__label,
[data-drupal-selector=edit-layout-density] .form-radios .form-item .form-item__label {
  font-size: var(--gin-font-size-xxs);
  display: block;
  margin-block-start: var(--gin-spacing-xs);
  margin-block-end: var(--gin-spacing-m);
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active {
  position: relative;
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active #edit-classic-toolbar {
  position: relative;
  opacity: .5;
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active #edit-classic-toolbar::before {
  content: "";
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  cursor: not-allowed;
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active .fieldset__description {
  pointer-events: none;
  position: absolute;
  inset-block-start: 3.5rem;
  inset-inline-start: 2rem;
  display: flex;
  align-items: center;
  gap: var(--gin-spacing-xs);
  color: var(--gin-color-warning);
  background-color: var(--gin-bg-warning);
  padding: var(--gin-spacing-xs) var(--gin-spacing-s);
  border-radius: var(--gin-border-s);
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active .fieldset__description:before {
  content: "";
  display: block;
  width: 1em;
  height: 1em;
  background-color: var(--gin-color-warning-light);
  -webkit-mask-image: url("../../media/sprite.svg#warning-view");
          mask-image: url("../../media/sprite.svg#warning-view");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center left;
          mask-position: center left;
}

[data-drupal-selector=edit-classic-toolbar].gin-core-navigation--is-active .fieldset__description .form-item__warning {
  display: none;
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=vertical] {
  background-image: url(../../media/settings/toolbar_sidebar.png);
}

.gin--dark-mode [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=vertical] {
  background-image: url(../../media/settings/toolbar_sidebar_darkmode.png);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=new] {
  background-image: url(../../media/settings/toolbar_new.png);
}

.gin--dark-mode [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=new] {
  background-image: url(../../media/settings/toolbar_new_darkmode.png);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=horizontal] {
  background-image: url(../../media/settings/toolbar_minimal.png);
}

.gin--dark-mode [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=horizontal] {
  background-image: url(../../media/settings/toolbar_minimal_darkmode.png);
}

[data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=classic] {
  background-image: url(../../media/settings/toolbar_legacy.png);
}

.gin--dark-mode [data-drupal-selector=edit-classic-toolbar] .form-radios .form-item input[data-gin-toolbar=classic] {
  background-image: url(../../media/settings/toolbar_legacy_darkmode.png);
}

[data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-default] {
  background-image: url(../../media/settings/layout_density_default.png);
}

.gin--dark-mode [data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-default] {
  background-image: url(../../media/settings/layout_density_default_darkmode.png);
}

[data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-medium] {
  background-image: url(../../media/settings/layout_density_medium.png);
}

.gin--dark-mode [data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-medium] {
  background-image: url(../../media/settings/layout_density_default_darkmode.png);
}

[data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-small] {
  background-image: url(../../media/settings/layout_density_small.png);
}

.gin--dark-mode [data-drupal-selector=edit-layout-density] .form-radios .form-item input[data-drupal-selector=edit-layout-density-small] {
  background-image: url(../../media/settings/layout_density_small_darkmode.png);
}

input[data-gin-toolbar=new] + label .gin-new-flag {
  position: absolute;
  inset-block-start: -100px;
  inset-inline-end: var(--gin-spacing-xs);
}

