.leaflet-control-container {
  container-name: leafletControlContainer;
  container-type: size;
}

.leaflet-control-filter {
  border: 1px solid grey;
  background-color: white;
  opacity: 0.8;
  overflow: hidden;

  .form-item.form-item--checkbox__item .form-checkbox {
    margin-top: 1px;
  }

  &:not(.open) {
    height: 2rem;
    width: 2rem;
    background-image: url('../img/filter_alt_24dp_5F6368_FILL0_wght400_GRAD0_opsz24.png');
    background-size: cover;
    transition: height 1s ease, width 1s ease;

    .leaflet-control-filter-form {
      overflow: hidden;
      opacity: 0;
      transition: opacity 1s ease;
    }
  }

  &.closing {
    background-image: none;
  }

  &.open {
    @container leafletControlContainer (min-width: 500px) {
      height: 370px;
      width: 450px;
      transition: height 1s ease, width 1s ease;
    }

    .leaflet-control-filter-form {
      opacity: 1;
      transition: opacity 1s ease;
    }
  }

  .leaflet-control-filter-form {
    @container leafletControlContainer (min-width: 500px) {
      width: 450px;
    }
    height: 100%;
    overflow-x: hidden;
    padding: 1rem;
  }

  .filter-status {
    input {
      margin-right: 2px;
    }

    label:not(:last-child) {
      margin-right: 1rem;
    }
  }

  [data-drupal-selector="edit-status-assignee"] {
    display: flex;

    > * {
      width: 100%;
    }
  }

  form {
    position: relative;
  }

  [data-drupal-selector="edit-pinned"] {
    position: absolute;
    top: 0;
    right: 0;
    appearance: none;
    float: none;

    &:before {
      content: "📌";
      width: 1.4rem;
      height: 1.4rem;
    }

    & + label {
      display: none;
    }
  }

  &.pinned .form-item.form-item--checkbox__item [data-drupal-selector="edit-pinned"] {
    top: 3px;
    right: 3px;
    clip-path: inset(0 0 3px 3px)
  }
}
