import styled from 'styled-components';
import { NavLink } from 'react-router-dom';

export const SideMenuContainer = styled.div`
  position: fixed;
  width: 280px;
  // max-height: 609px;
  display: flex;
  flex-direction: column;
  background: #e6f9f9;
  padding: 30px 25px;
  transition: width 0.2s ease-in-out;
  height: 100vh;
  padding-right: 5px;
  z-index: 55;

  .logo_section {
    width: 72px;

    img {
      width: 100%;
    }
  }

  .toggle {
    width: 20px;
    height: 20px;
    display: flex;
    border-radius: 4px;
    background: #fff;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 115px;
    right: -13px;
    color: #fdcf04;
  }

  .active-dropdown {
    background-color: #3ac2c2;
    color: #fff;
  }

  .rc-collapse {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
    & .show {
      height: auto;
    }
  }

  .logout__link {
    color: #f95454;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    padding: 8px 15px 40px;
    display: flex;
    column-gap: 10px;
    /* border-top: 1px solid #949999; */
  }
`;

export const NavWrapper = styled.div`
  overflow-y: scroll;
  padding-right: 20px;

  &::-webkit-scrollbar {
    display: none;
  }
  .option-type {
    &.has-border {
      border-bottom: 1px solid #949999;
      margin-bottom: 10px;
    }
  }
`;
export const NavigationContainer = styled.div`
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 0 5px;
  /* border-bottom: 1px solid #949999; */
  /* margin-bottom: 8px; */
  .dropdown_notification {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background-color: #f95454;
    color: #fff;
    font-family: 'Satoshi', 'Nunito';
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }
  .menu_title {
    color: #099;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    margin: 16px 0 16px;
  }

  #navlink__title {
    color: #636666;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    margin-bottom: 10px;
    padding: 8px 15px;
    display: flex;
    column-gap: 10px;
    align-items: center;
  }

  .active-link {
    background-color: #3ac2c2;
    color: #fff !important;
    border-radius: 4px;
  }
`;
export const NavigationItemContainer = styled.p`
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;

  cursor: pointer;
  position: relative;
  padding: ${({ minimal }) => (minimal ? '12px 16px' : '12px 12px')};
  color: ${({ active }) =>
    active
      ? 'rgb(255, 255, 255) !important'
      : 'rgba(255, 255, 255, 0.625) !important'};
  &:hover {
    color: #ffffff !important;
    background-color: #31cdcd;

    > div {
      opacity: 1;
    }
  }
  &.active {
    background-color: rgba(0, 153, 153, 0.5);
    // border-left: 5px solid #febf10;
    border-radius: 10px 0 0px 10px;
    color: #ffffff;
    &::before {
      content: '';
      height: 110%;
      width: 5px;
      border-radius: 0 10px 10px 0;
      position: absolute;
      top: -5%;
      left: 0;
      display: block;
      background: #febf10;
    }
  }
`;

export const IconContainer = styled.div`
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 25px;
  opacity: ${({ active }) => (active ? '1' : '0.625')};
`;

export const TextContainer = styled.div`
  display: ${({ minimal }) => (minimal ? 'flex' : 'none')};
  align-items: center;
  font-size: 16px;
  letter-spacing: 0.32px;
  font-weight: 600;
  color: inherit;
`;

export const NotificationCount = styled.div`
  background-color: #009999;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  margin-left: 2px;

  ${({ minimal }) =>
    minimal
      ? null
      : `
    position: absolute;
    bottom: 11px;
    right: 14px;
    width: 12px;
    height: 12px;
    font-size: 12px;
    .text {
        display: none;
    }
  `};
`;

export const LogoutButtonContainer = styled.div`
  margin-top: auto;
  display: flex;
  gap: 10px;
  cursor: pointer;
  color: rgba(253, 253, 253, 0.595);
  &:hover {
    color: #ffffff;
  }
`;

export const LogoutIcon = styled.img`
  width: 20px;
  height: 20px;
  margin-right: 5px;
`;

export const LogoutText = styled.div`
  font-weight: bold;
`;

export const SideMenuDropdownHeader = styled.div`
  background-color: transparent;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  column-gap: 10px;
  color: #4a4d4d;
  font-size: 16px;
  font-weight: 600;
  line-height: normal;
  justify-content: space-between;
  border-radius: 3px;
  margin-bottom: 8px;
  cursor: pointer;

  .dropdown_header_txt {
    display: flex;
    align-items: center;
    column-gap: 10px;
  }

  .dropdown_header_chevron {
    display: flex;
    align-items: center;
  }
`;

export const SideMenuDropdownBody = styled.div`
  padding: 0 12px 0 48px;

  .dropdown_row {
    display: flex;
    justify-content: space-between;

    #dropdown__links {
      &:last-child {
        margin-bottom: 12px;
      }
    }

    .dropdown_notification {
      width: 22px;
      height: 22px;
      border-radius: 4px;
      background-color: #f95454;
      color: #fff;
      font-family: 'Satoshi', 'Nunito';
      font-size: 12px;
      font-weight: 500;
      display: flex;
      align-items: center;
      justify-content: center;
    }
  }
  #dropdown__links {
    color: #4a4d4d;
    font-size: 16px;
    font-weight: 600;
    line-height: normal;
    margin: 2px 0 8px;

    &.active {
      color: #00c2c2;
    }

    &:hover {
      color: #00c2c2;
    }
  }
`;
