@import "../styles/variables";

$primary-height: 30px;

.main {
  flex: none;

  &.disabled {
    opacity: 0.5;
    cursor: default;
  }

  &.mobile {
    height: 33px;
    box-sizing: border-box;
    font-size: 15px;
  }
}

.btn {
  border-radius: 30px;
  height: 23px;
  min-width: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-family: $duda-title-font;
  outline: none;
  cursor: pointer;
  user-select: none;
}

.primary {
  composes: btn;
  height: $primary-height;
  background-color: $button-color;
  color: $text-on-button;
  padding-block-start: 0;
  padding-inline-end: 15px;
  padding-block-end: 0;
  padding-inline-start: 15px;

  &:not(.noHover):hover {
    background-color: $button-hover-color;
  }

  &.small {
    padding-block-start: 2px;
    padding-inline-end: 10px;
    padding-block-end: 2px;
    padding-inline-start: 10px;
    height: 21px;
    min-width: 60px;
    width: auto;
  }
}

.destructive {
  composes: primary;
  background-color: $duda-destructive;

  &:not(.noHover):hover {
    background-color: $duda-destructive-light;
  }
}

.secondary {
  composes: btn;
  border: 1px solid $clickable-item;
  color: $clickable-item;
  min-width: 60px;
  width: auto;
  padding-block-start: 2px;
  padding-inline-end: 10px;
  padding-block-end: 2px;
  padding-inline-start: 10px;
  font-size: 13px;
  height: 21px;

  &:not(.noHover):hover {
    color: $text-on-light;
    border-color: $text-on-light;

    svg {
      fill: $text-on-light;
    }
  }

  &.filled {
    background-color: $clickable-item;
    color: $text-on-button;

    &:hover {
      color: $text-on-button;
      background-color: $clickable-item-hover;
      border-color: $clickable-item;

      svg {
        fill: $text-on-button;
      }
    }
  }

  &.big {
    height: $primary-height - 2;
    padding-block-start: 0;
    padding-inline-end: 14px;
    padding-block-end: 0;
    padding-inline-start: 14px;
  }
}

.noHover {}

.left-icon {
  padding-inline-end: 7px;
}

.right-icon {
  padding-inline-start: 7px;
}

.icon-no-padding {
  padding-block-start: 0;
  padding-inline-end: 0;
  padding-block-end: 0;
  padding-inline-start: 0;
  flex: 1 1 auto;
}

.main.mobile {
  height: 33px;
  box-sizing: border-box;
  font-size: 15px;
}