@import "../../variables";

/* Reset button styles */
.addsearch-filters-tabs,
.addsearch-filters-tags {
  button {
    -webkit-appearance: none;
    -moz-appearance: none;
    margin: 0;
    padding: 0.5em 1.5em;
    display: inline-block;
    cursor: pointer;
    background: #fff;
  }
}


/* Tabs */
.addsearch-filters-tabs {

  .tabs {
    display: block;
    text-align: left;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;

    button {
      border: 1px solid $border-color;
      border-right: 0;
      font-size: 16px;
      float: left;

      &.active {
        background-color: $active-background;
      }
      &:first-child {
        border-radius: 5px 0 0 5px;
      }
      &:last-child {
        border-radius: 0 5px 5px 0;
        border-right: 1px solid $border-color;
      }
    }
    @media all and (max-width: 960px) {
      overflow-x: scroll;
      white-space: nowrap;
      padding: 0 0 10px;
      button {
        padding: 7px 15px;
        font-size: 14px;
      }
    }
  }
  .tabs:after {
    content: " ";
    visibility: hidden;
    display: block;
    height: 0;
    clear: both;
  }
}


/* Tags */
.addsearch-filters-tags {
  button {
    margin: 2px 0;
    border-radius: 5px;
    border: 1px solid $border-color;
    font-size: 12px;
    padding: 0.25em 0.75em;
    text-transform: uppercase;
    color: #444444;

    @media screen and (max-width: 960px){
      font-size: 14px;
      padding: 6px 8px;
    }

    &.active {
      background-color: $active-background;
    }
  }
}

/* Checkbox and radio button groups */
.addsearch-filters-checkboxgroup,
.addsearch-filters-radiogroup {
  label {
    display: block;
    display: flex;
    align-items: center;
    padding: 2px 0;
    @media all and (max-width: 960px) {
      padding: 4px 0;
    }
  }
  input {
    margin-right: 8px;
  }
}

.addsearch-filters-radiogroup {
  input {
    margin:0 8px 0 0;
  }
}

.addsearch-filters-checkboxgroup {
  input[type="checkbox"] {
    margin-right: 7px;
  }
}

.addsearch-filters-range {
  label {
    display: block;
    padding: 4px 0;
  }
  input {
    width: 30%;

    &[data-valid='false'] {
      border-color: red;
    }
  }
}