import { Box, Container, Typography } from "@mui/material";
import styled from "styled-components";
import selectedTheme from "../../../themes";
import { Label } from "../../CheckBox/Label";
import Select from "../../Select/Select";

export const ModalCreateOfferContainer = styled(Box)`
  background-color: #fff;
  position: fixed;
  ${(props) => props.currentStep === 3 && `overflow-y: auto;`}
  max-height: 90vh;
  top: ${(props) =>
    props.currentStep === 1 ? "calc(50% - 400px);" : "calc(50% - 350px);"};
  left: ${(props) =>
    props.currentStep !== 3 ? "calc(50% - 310px);" : "calc(50% - 420px);"};
  z-index: 150;
  padding: ${(props) => (props.currentStep !== 3 ? "0 120px" : "0 130px")};
  overflow-y: auto;
  &::-webkit-scrollbar {
    width: 5px;
  }
  &::-webkit-scrollbar-track {
    background: #ddd;
  }
  &::-webkit-scrollbar-thumb {
    background: #777;
  }
  scrollbar-width: thin;
  scrollbar-color: #ddd;

  @media (max-height: 820px) {
    top: ${(props) =>
      props.currentStep === 1 ? "calc(50% - 340px)" : "calc(50% - 340px)"};
  }

  @media screen and (max-width: 628px) {
    height: 100vh;
    max-height: 100vh;
    min-height: 90vh;
    width: 100vw;
    top: 0;
    left: 0;
    padding: 0 30px;
  }
`;

export const ModalHeader = styled(Box)`
  display: flex;
  justify-content: space-between;
  align-items: center;
`;

export const BackIcon = styled(Box)`
  cursor: pointer;
  position: absolute;
  left: 40px;

  @media screen and (max-width: 600px) {
    left: 20px;

    & svg {
      width: 20px;
    }
  }
`;

// export const CloseIcon = styled(Box)`
//   cursor: pointer;
//   position: absolute;
//   right: 40px;

//   @media screen and (max-width: 600px) {
//     right: 20px;

//     & svg {
//       width: 20px;
//     }
//   }
// `;

export const CreateOfferContainer = styled(Container)`
  margin-top: 0px;
  display: flex;
  width: ${(props) => (props.currentStep === 3 ? "580px" : "380px")};
  flex-direction: column;
  align-items: center;

  @media screen and (max-width: 600px) {
    width: 95%;
  }
`;
export const CreateOfferTitle = styled(Typography)`
  font-family: "Open Sans";
  /* width: 328px;
  height: 33px; */
  text-align: center;
  flex: 1;
  font-style: normal;
  font-weight: 700;
  font-size: 24px;
  line-height: 33px;
  color: ${selectedTheme.primaryPurple};
  margin-top: 36px;
  margin-bottom: 40px;

  @media screen and (max-width: 600px) {
    font-size: 18px;
    margin-bottom: 30px;
  }
`;
export const CreateOfferDescription = styled(Typography)`
  font-family: "Open Sans";
  margin-top: 9px;
  width: 221px;
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  display: flex;
  align-items: center;
  text-align: center;
  color: ${selectedTheme.primaryGrayText};
  margin-bottom: 20px;
`;
export const CreateOfferFormContainer = styled(Box)`
  width: 335px;
  height: 700px;
  ${(props) => props.currentStep === 3 && `width: 120%; height: 420px;`}
`;
export const RegisterAltText = styled(Typography)`
  font-family: "Poppins";
  color: ${selectedTheme.primaryText};
  font-size: 14px;
  padding-right: 6px;
  line-height: 14px;
`;
export const RegisterTextContainer = styled(Box)`
  display: flex;
  flex-direction: row;
  margin-top: 36px;
  justify-content: center;
`;
export const FieldLabel = styled(Label)`
  position: relative;
  bottom: -14px;
  & label {
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    color: ${selectedTheme.primaryGrayText};
    cursor: auto;
    letter-spacing: 0.2px;
  }
  @media (max-width: 600px) {
    & label {
      font-size: 9px;
    }
  }
`;
export const SelectText = styled(Typography)`
  font-size: 16px;
  font-family: "Open Sans";
  font-weight: 400;
`;
export const SelectField = styled(Select)`
  position: relative;
  top: 15px;
  margin-bottom: 18px;
  @media (max-width: 600px) {
    height: 40px;
    font-size: 12px;
  }
  & div {
    ${SelectText} {
      font-weight: 600;
    }
  }
`;

export const SelectAltText = styled(Typography)`
  font-family: "Open Sans";

  font-style: italic;
  white-space: pre;
  font-size: 12px;
  position: relative;
  bottom: -1px;
`;
