/*
 * DO NOT EDIT THIS FILE.
 * See the following change record for more information,
 * https://www.drupal.org/node/3084859
 * @preserve
 */

/**
 * @file
 * Help icon description toggle styles.
 */

.help-icon {
  display: flex;
}

.help-icon__description-toggle {
  all: unset;
  flex-shrink: 0;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  border-radius: 50%;
  margin-block: 0.1rem 0;
  margin-inline: 0.3rem var(--admin-space-m);

  &::before {
    display: block;
    width: 100%;
    height: 100%;
    content: "";
    background-color: var(--admin-color-icon);
    mask-image: url("data:image/svg+xml,%3csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3e  %3cg fill='none' stroke='currentColor' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3e    %3cpath d='M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12Z' /%3e    %3cpath d='M9.09003 8.00002C9.32513 7.33169 9.78918 6.76813 10.4 6.40915C11.0108 6.05018 11.7289 5.91896 12.4272 6.03873C13.1255 6.15851 13.7588 6.52154 14.2151 7.06355C14.6714 7.60555 14.9211 8.29154 14.92 9.00002C14.92 11 11.92 12 11.92 12' /%3e    %3cpath d='M12 17H12.01' /%3e  %3c/g%3e%3c/svg%3e");
    mask-repeat: no-repeat;
    mask-position: center center;
    mask-size: 100% 100%;
  }

  &:hover::before {
    background-color: var(--admin-color-primary);
  }

  .field-group-details.help-icon__description-container & {
    margin-block-start: 0;
  }

  .field-group-fieldset > .help-icon > &,
  fieldset.media-library-widget .help-icon > &,
  .field--type-datetime fieldset .help-icon > & {
    margin-block-start: 1rem;
  }

  :is(.system-modules, .system-modules-uninstall) .table-filter .form-type--search & {
    position: absolute;
    inset-inline-end: calc(var(--admin-space-xs) * -1);
    inset-block-start: var(--admin-space-m);
  }
}

.help-icon__element-has-description {
  :is(.form-type--checkbox, .form-type--radio) > & {
    display: flex;
    align-items: normal;

    > label {
      margin-inline-start: 0.375rem;
    }
  }
}

.fieldset__label {
  fieldset:not(.fieldgroup) .help-icon > .fieldset__legend & {
    padding-inline-end: 0;
  }
}

.fieldset__description {
  .field-group-fieldset > &,
  fieldset.media-library-widget &,
  .field--type-datetime fieldset & {
    padding-inline-start: var(--admin-space-m);

    @media (min-width: 48em) {
      padding-inline-start: var(--admin-space-l);
    }
  }
}

.form-type--search {
  :is(.system-modules, .system-modules-uninstall) .table-filter & {
    position: relative;
  }
}
