@import url('../../core/CloudTheme.css');

$active-box-shadow: 0px 0px 0px 4px $blue-blue4,
  0px 1px 2px 4px rgba(33, 37, 44, 0.08);

.trigger {
  position: relative;
  display: flex;
  align-items: center;
  height: 36px;
  padding: 0 42px 0 12px;
  border-radius: 8px;
  border: 1px solid $stroke-stroke1;
  box-sizing: border-box;
  color: $black-black1;
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.2s;
  box-shadow: 0px 1px 2px 0px rgba(33, 37, 44, 0.08);

  &:hover {
    border-color: $blue-blue1;
    box-shadow: $active-box-shadow;
    background-color: transparent;

    .hoverAndHide {
      opacity: 0;
    }
    .reset {
      opacity: 1;
    }
  }

  &.small {
    height: 28px;
  }

  &.opened {
    border-color: $blue-blue1;
    box-shadow: $active-box-shadow;
  }

  .icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    transition: opacity 0.2s;
  }

  .reset {
    position: absolute;
    right: 9px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    opacity: 0;
    z-index: 1;
    transition: opacity 0.2s, background 0.2s;

    &:hover {
      background-color: $black-black5;
    }
  }
}

.footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  padding: 8px;
}
