import styled from "styled-components";

/* styles for header component authenticated users */
export const Navbar = styled.nav`
  background-color: rgba(255, 255, 255, 1);
  padding: 10px 30px 10px 20px;
  display: flex;
  font-family: "Nunito";
  width: 100%;
  align-items: center;
  position: fixed;
  z-index: 555;
`;

export const NavGroup = styled.div`
  width: 44%;
  display: flex;
  justify-content: end;
  align-items: center;
  @media screen and (max-width: 1530px) {
    width: fit-content;
    margin-left: auto;
  }
  @media screen and (max-width: 1023px) {
    display: none;
  }
  .language_dropdown {
    display: flex;
    align-items: center;
    position: relative;
    .drop_holder {
      display: flex;
      align-items: center;
      border: 1px solid rgba(173, 178, 178, 1);
      padding: 9px 12px;
      border-radius: 37px;
      cursor: pointer;
      img {
        width: 24px;
        height: 16px;
        margin-right: 10px;
      }
    }
    .dropdown_list {
      position: absolute;
      top: 50px;
      width: fit-content;
      background: white;
      padding: 15px 0;
      border-radius: 15px;
      box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
      left: 50%;
      transform: translateX(-50%);

      li {
        list-style-type: none;
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 5px 30px 5px 15px;
        font-size: 14px;
        &:hover {
          background: rgba(0, 194, 194, 0.1);
        }
        img {
          width: 20px;
          height: 11px;
          margin-right: 10px;
        }
      }
    }
  }
`;

export const Nav = styled.ul`
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0 10px;
  padding: 0 5px;
  width: 57%;

  @media screen and (max-width: 1530px) {
    width: 40%;
  }

  & li {
    display: flex;
    align-items: center;
    margin: 0 10px;
  }

  & li:nth-of-type(1) {
    margin-right: 75px;
    margin-left: 35px;
  }

  & a {
    text-decoration: none;
    display: flex;
    align-items: center;
    color: #4a4d4d;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    white-space: nowrap;

    &:hover,
    &.active {
      color: rgba(0, 194, 194, 1);
      font-weight: 600;

      &::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: -9px;
        width: 40px;
        height: 4px;
        background-color: rgba(0, 194, 194, 1);
        transition: width 0.3s ease-in-out;
      }
    }

    & svg {
      margin-right: 12px;
    }
    .setting_icon path {
      fill: ${({ isActive }) =>
        isActive ? "rgba(0, 194, 194, 1)" : "currentcolor"};
      stroke: none !important;
    }

    & svg path {
      stroke: ${({ isActive }) =>
        isActive ? "rgba(0, 194, 194, 1)" : "currentcolor"};
    }

    &.disabled {
      color: #d3d3d3 !important;
      cursor: not-allowed;

      &::before {
        display: none;
      }

      &:hover {
        color: #d3d3d3 !important;
        cursor: not-allowed;

        &::after {
          content: "";
          position: absolute;
          left: 0;
          bottom: -9px;
          width: 40px;
          height: 4px;
          background-color: #fff;
          transition: width 0.3s ease-in-out;
        }
      }
    }
  }
`;

export const SearchInputGroup = styled.div`
  background-color: transparent;
  border-radius: 60px;
  border: 1px solid rgba(173, 178, 178, 1);
  transition: 0.5s;
  display: flex;
  align-items: center;
  padding: 9px;
  margin: 0 15px;
  position: relative;
  @media screen and (max-width: 1530px) {
    width: 200px;
    padding: 9px;
    height: fit-content;
    input {
      width: 100%;
    }
  }
  &:focus {
    width: 130px;
  }
  &:active {
    border: 1px solid rgba(0, 2, 2, 1);
  }
  &::placeholder {
    color: rgba(173, 178, 178, 1);
  }

  & .search-result-wrapper {
    position: absolute;
    width: 300px;
    height: 221px;
    background-color: #ffffff;
    box-shadow: 0px 2px 40px rgba(0, 0, 0, 0.08);
    border-radius: 29px;
    top: 56px;
    right: -23px;
    padding: 25px;

    & p {
      font-size: 16px;
      line-height: 22px;
      font-family: "Nunito";
      color: #000000;
      margin-bottom: 16px;

      &:last-child {
        margin-bottom: 0;
      }

      & span {
        font-weight: 700;
      }
    }
  }
`;

export const SearchInput = styled.input`
  background-color: transparent;
  padding: 0 8px;
  font-size: 16px;
  font-weight: 400;
  border: none;
  color: rgba(173, 179, 179, 1);
  transition: 0.5s;
  outline: none;
  &:active {
    border: none;
  }
  &::placeholder {
    color: rgba(173, 178, 178, 1);
  }
`;

export const UserProfile = styled.div`
  display: flex;
  align-items: center;
  cursor: pointer;
  .user-img-container {
    width: 37px;
    height: 37px;
    border-radius: 50%;
    overflow: hidden;

    img {
      width: 100%;
      height: 100%;
      object-fit: contain;
    }
  }
  & h5 {
    margin: 0;
    color: rgba(49, 51, 51, 1);
    font-size: 16px;
    font-weight: 700;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 150px;
    @media screen and (max-width: 1530px) {
      font-size: 12px;
    }
  }

  & h6 {
    color: rgba(148, 153, 153, 1);
    margin: 0;
    font-size: 12px;
    font-weight: 600;
  }

  & > div {
    margin-left: 10px;
  }

  & svg {
    margin-left: 20px;
  }
`;

export const CountryFlagGroup = styled.div`
  background-color: transparent;
  border-radius: 60px;
  transition: 0.5s;
  display: flex;
  align-items: center;
  position: relative;
  width: 70px;
  margin: 0 10px;

  & > svg {
    position: absolute;
    right: 7px;
    width: 16px;
    height: 10px;
    top: 18px;
  }
  & .ReactFlagsSelect-module_selectOptions__3LNBJ {
    width: 155px !important;
    font-size: 12px !important;
  }
  & .ReactFlagsSelect-module_flagsSelect__2pfa2 {
    width: 100%;
    padding-bottom: 0;
  }

  & .ReactFlagsSelect-module_selectBtn__19wW7 {
    border: 1px solid rgba(173, 178, 178, 1);
    border-radius: 20px;
    padding: 5px 10px 5px 0;
  }

  & .ReactFlagsSelect-module_selectBtn__19wW7:after {
    display: none;
  }

  &
    .ReactFlagsSelect-module_selectValue__152eS
    .ReactFlagsSelect-module_label__27pw9 {
    display: none;
  }

  /* & .ReactFlagsSelect-module_label__27pw9,
  .ReactFlagsSelect-module_secondaryLabel__37t1D {
    display: none !important;
  } */

  & .ReactFlagsSelect-module_selectFlag__2q5gC {
    svg {
      border-radius: 50%;
      width: 26px;
    }
  }
`;

/* styles for header account dropdown */

export const AccountDropdownLayout = styled.div`
  background-color: #ffffff;
  font-family: "Nunito";
  width: 286px;
  max-height: 530px;
  box-shadow: 0px 2px 40px rgba(0, 0, 0, 0.08);
  border-radius: 30px;
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 65px;
  right: 20px;
  z-index: 5;
`;

export const AccountDropdownHeader = styled.div`
  padding: 24px;
  display: flex;
  font-family: "Nunito";
  align-items: center;
  border-radius: 30px 30px 0 0;
  width: 100%;
  border-bottom: 1px solid rgba(51, 51, 51, 0.15);
  & .img_div {
    max-width: 50px;
    max-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 50%;
    img {
      width: 100%;
      height: 100%;
    }
  }
  & h1 {
    font-family: "Poppins";
    font-weight: 600;
    font-size: 16px;
    color: rgba(51, 51, 51, 1);
    margin-left: 16px;
  }

  & h2 {
    font-family: "Poppins";
    font-weight: 400;
    font-size: 14px;
    color: rgba(51, 51, 51, 0.7);
    margin-left: 16px;
  }

  & svg {
    margin-left: auto;
  }
`;

export const AccountDropdownBody = styled.div`
  background-color: #ffffff;
  width: 100%;
  overflow-y: scroll;
  height: 100%;
  & h3 {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    color: rgba(74, 77, 77, 1);
    padding: 4px 10px 0;
  }

  & h1 {
    font-family: "Nunito";
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 19px;
    color: #000000;

    &:hover {
      color: rgba(0, 194, 194, 1);
    }
  }

  & img {
    width: 100%;
    height: 100%;
  }

  & .avatar-container {
    width: 30px;
    height: 30px;
    overflow: hidden;
    border-radius: 50%;
    img {
      width: 100%;
      height: 100%;
    }
  }

  & .account-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 10px 20px;
    &:hover {
      background-color: rgba(239, 248, 248, 1);

      h1 {
        color: rgba(0, 194, 194, 1);
      }
    }
  }
  & .activated {
    background-color: rgba(0, 194, 194, 0.15);
  }

  & .account-details {
    margin-left: 10px;
    display: flex;
    justify-content: space-between;
    width: 80%;

    & span {
      width: 20px;
      height: 20px;
      background-color: rgba(176, 220, 220, 0.2);
      display: flex;
      justify-content: center;
      align-items: center;
      border-radius: 50%;
      color: rgba(0, 194, 194, 1);
      font-size: 12px;
      font-weight: 700;
    }
  }
`;

export const AccountDropdownFooter = styled.div`
  background-color: #ffffff;
  padding: 17px 26px;
  display: flex;
  font-family: "Nunito";
  width: 100%;
  align-items: center;
  border-radius: 0 0 30px 30px;
  display: flex;
  justify-content: center;
  border-top: 1px solid rgba(51, 51, 51, 0.15);
  margin-top: auto;
  &:hover {
    background: rgba(0, 194, 194, 0.1);
  }
  & button {
    display: flex;
    border: none;
    font-family: "Nunito";
    font-weight: 700;
    font-size: 16px;
    line-height: 22px;
    align-items: center;
    text-align: center;
    color: rgba(254, 191, 16, 1);
    background-color: transparent;
    cursor: pointer;

    & svg {
      margin-right: 17px;
    }
  }
`;

/* styles for header component unauthenticated users*/
export const Navbar2 = styled.nav`
  background-color: #ffffff;
  padding: 24px 100px;
  display: flex;
  font-family: "Nunito";
  width: 100%;
  align-items: center;
  position: fixed;
  z-index: 99;
  justify-content: space-between;

  img {
    cursor: pointer;
  }
`;

export const Nav2 = styled.ul`
  display: flex;
  list-style: none;
  align-items: center;
  margin: 0 50px;
  padding: 0 5px;
  width: 57%;
  z-index: 555;
  & li {
    display: flex;
    align-items: center;
    margin: 0 20px;

    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;

    /* &:hover {
      border-bottom: 2px solid red;
    } */
  }

  & a.active {
    color: rgba(74, 77, 77, 1);
    font-weight: 700;
  }

  & a {
    text-decoration: none;
    display: flex;
    align-items: center;
    font-size: 16px;
    color: rgba(148, 153, 153, 1);
    font-weight: 700;

    &:hover {
      color: rgba(74, 77, 77, 1);
    }
  }

  & a:after {
    display: block;
    content: "";
    border-bottom: solid 5px #000;
    transform: scaleX(1);
    transition: transform 300ms ease-in-out;
  }

  & a:hover:after {
    transform: scaleX(1);
  }
`;

export const NavGroup2 = styled.div`
  width: 50%;
  display: flex;
  justify-content: flex-end;
  gap: 70px;
  .language_dropdown {
    display: flex;
    align-items: center;
    position: relative;
    .drop_holder {
      display: flex;
      align-items: center;
      border: 1px solid rgba(173, 178, 178, 1);
      padding: 9px 12px;
      border-radius: 37px;
      cursor: pointer;
      img {
        width: 24px;
        height: 16px;
        margin-right: 10px;
      }
    }
    .dropdown_list {
      position: absolute;
      top: 50px;
      width: fit-content;
      background: white;
      padding: 15px 0;
      border-radius: 15px;
      box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
      li {
        list-style-type: none;
        display: flex;
        align-items: center;
        cursor: pointer;
        padding: 5px 30px 5px 15px;
        font-size: 14px;
        &:hover {
          background: rgba(0, 194, 194, 0.1);
        }
        img {
          width: 20px;
          height: 11px;
          margin-right: 10px;
        }
      }
    }
  }
`;

export const CountryFlagGroup2 = styled.div`
  /* background-color: rgba(249, 84, 84, 1); */
  border-radius: 8px;
  transition: 0.5s;
  display: flex;
  align-items: center;
  position: relative;
  width: 70px;
  margin: 0 0 0 0;

  & > svg {
    position: absolute;
    right: 10px;
    width: 12px;
    height: 7px;
    top: 17px;
  }
  & .ReactFlagsSelect-module_selectOptions__3LNBJ {
    width: 155px !important;
    font-size: 12px !important;
  }
  & .ReactFlagsSelect-module_flagsSelect__2pfa2 {
    width: 100%;
    padding-bottom: 0;
  }

  & .ReactFlagsSelect-module_selectBtn__19wW7 {
    border: none;
    border-radius: 10px;
    padding: 3px 8px 3px 0;
    background-color: rgba(249, 84, 84, 0.1);
  }

  & .ReactFlagsSelect-module_selectBtn__19wW7:after {
    display: none;
  }

  &
    .ReactFlagsSelect-module_selectValue__152eS
    .ReactFlagsSelect-module_label__27pw9 {
    display: none;
  }

  /* & .ReactFlagsSelect-module_label__27pw9,
  .ReactFlagsSelect-module_secondaryLabel__37t1D {
    display: none !important;
  } */

  & .ReactFlagsSelect-module_selectFlag__2q5gC {
    svg {
      border-radius: 50%;
      width: 26px;
    }
  }
`;

export const LanguageDropdownContainer = styled.div`
  width: 500px;
  background-color: rgba(255, 255, 255, 1);
  padding: 19px 20px 20px;
  font-family: "Nunito";
  position: absolute;
  z-index: 555;
  right: 0;
  border-radius: 12px;
  border: 1px solid #00c2c2;
  background: #fff;
  top: 65px;

  .ldc_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #d9d9d9;
    padding: 0 0 8px;

    .ldc_title {
      color: #adb2b2;
      font-size: 16px;
      font-weight: 400;
      line-height: normal;
      letter-spacing: 0.32px;
    }

    span {
      display: flex;
      align-items: center;
      cursor: pointer;
    }
  }

  .ldc_search {
    display: flex;
    align-items: center;
    padding: 7px 9px;
    border-radius: 12px;
    background: #f6f6f6;
    margin: 8px 0;

    span {
      display: flex;
    }

    .search_input {
      border: none;
      background-color: transparent;
      outline: none;
      margin-left: 8px;
      width: 100%;
      color: #adb2b2;
      font-size: 14px;
      font-weight: 400;
      letter-spacing: 0.28px;
    }
  }

  .language_dropdown_list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-bottom: 4px;

    .language_dropdown_item {
      display: flex;
      align-items: center;
      gap: 10px;
      cursor: pointer;
      color: #313333;
      font-size: 16px;
      font-weight: 400;
      line-height: normal;
      letter-spacing: 0.32px;

      img {
        width: 25px;
        height: 18px;
        border-radius: 3px;
        object-fit: cover;
        flex-shrink: 0;
      }

      span {
        white-space: nowrap;
      }
    }
  }
`;

export const Help = styled.div`
  display: flex;
  align-items: center;
  /* color: #00c2c2; */
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: #4a4d4d;

  svg {
    margin-right: 5px;
  }
`;
