import styled from 'styled-components';
import { theme } from 'data/dataMx';

interface IStylesProps {
  check?: boolean;
  active?: boolean;
  link?: boolean;
}

export const FilterAccordionContent = styled.section`
  width: 100%;
`;

export const TitleContainer = styled.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border-bottom: 1px solid ${theme.neutral300};
`;

export const ButtonContainer = styled.div`
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 8px 24px;
`;

export const FilterRow = styled.div`
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  background-color: ${({check, active, link}: IStylesProps) =>
    check
      ? theme.neutral200
      : (active && link
      ? theme.neutral200
      : theme.neutral100)};
  align-content: center;
  align-items: baseline;
  padding: 10px 25px;
  input[type="checkbox"]:checked {
    background-color: ${theme.primary};
    border: 2px solid ${theme.primary};
  }
`;

export const SortingRow = styled.div`
  display: block;
  background-color: ${theme.neutral200};
  padding: 8px 24px;
`;

export const FilterAccordionSortButton = styled.div`
  > div {
    display: flex;
    margin-top: 12px;
    flex-wrap: wrap;
    > div {
      width: auto;
    }
  }
`;

export const CollapsiblePanel = styled.div``;

export const DismissContainer = styled.div`
  display: inline-block;
  cursor: pointer;
  margin: 24px;
`;

export const Bar = styled.div`
  width: 24.75px;
  height: 3px;
  background-color: ${theme.neutral700};
  margin: 0 0 3px 0;
  transition: 0.4s;

  &.bar1 {
    -webkit-transform: rotate(-45deg) translate(-3px, 3px);
    transform: rotate(-45deg) translate(-3px, 3px);
  }

  &.bar2 {
    opacity: 0;
  }

  &.bar3 {
    -webkit-transform: rotate(45deg) translate(-5px, -6px);
    transform: rotate(45deg) translate(-5px, -6px);
  }
`;
