@import './../../styles/variables';

$width: 400px;
$max-width: 650px;

.ark-ui-filterbar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  visibility: hidden;
  width: 100%;
  height: 100%;
  user-select: none;
  background: rgba(88, 91, 105, 0.4);
  z-index: $negative;

  &.is-active {
    visibility: visible;
    z-index: $popup;

    .ark-ui-filterbar-slide {
      right: 0;
    }
  }

  &-slide {
    position: fixed;
    right: -($max-width + 50px);
    width: $max-width;
    height: 100%;
    overflow-y: auto;
    z-index: $element;
    transition: 0.4s;
  }

  &-body-wrap {
    display: flex;
    flex-direction: column;
    width: $width;
    min-height: 100%;
    box-sizing: border-box;
    margin-left: auto;
    background-color: #ffffff;
    border-radius: 12px 0 0 8px;
    box-shadow: 0 8px 16px rgba(75, 77, 89, 0.08);
    padding: 24px;
  }

  &-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  &-title {
    font-weight: 500;
    font-size: 18px;
    line-height: 24px;
  }

  &-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
    margin-bottom: 16px;
  }

  &-close {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
    background-size: contain;
    background-position: center center;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.14645 4.14645C4.34171 3.95118 4.65829 3.95118 4.85355 4.14645L8 7.29289L11.1464 4.14645C11.3417 3.95118 11.6583 3.95118 11.8536 4.14645C12.0488 4.34171 12.0488 4.65829 11.8536 4.85355L8.70711 8L11.8536 11.1464C12.0488 11.3417 12.0488 11.6583 11.8536 11.8536C11.6583 12.0488 11.3417 12.0488 11.1464 11.8536L8 8.70711L4.85355 11.8536C4.65829 12.0488 4.34171 12.0488 4.14645 11.8536C3.95118 11.6583 3.95118 11.3417 4.14645 11.1464L7.29289 8L4.14645 4.85355C3.95118 4.65829 3.95118 4.34171 4.14645 4.14645Z' fill='%2327282E'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
  }

  &-footer {
    margin-top: auto;

    column-gap: 8px;
    display: inline-flex;
    justify-content: space-between;

    &:deep {
      .ark-ui-button {
        width: 100%;
      }
    }
  }

  &-button {
    display: inline-block;
    position: relative;

    &-counter {
      position: absolute;
      z-index: $element;
      top: -4px;
      right: -4px;
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background-color: $purple;
      color: white;
      font-size: 12px;
      line-height: 16px;

      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
}
