import { Box, Typography } from "@mui/material";
import styled from "styled-components";
import selectedTheme from "../../../themes";
import { PrimaryButton } from "../../Buttons/PrimaryButton/PrimaryButton";

export const PlanContainer = styled(Box)`
  width: 408px;
  height: 512px;
  border: 1px solid ${selectedTheme.colors.primaryPurple};
  border-radius: 4px;
  position: relative;
  padding: 36px;
  min-width: 408px;
  background-color: ${(props) =>
    props.highlighted ? selectedTheme.colors.primaryPurple : "white"};

  ${(props) => !props.highlighted && `margin-top: 36px;`}
  ${(props) =>
    props.highlighted && `box-shadow: 4px 4px 9px rgba(0, 0, 0, 0.12);`}

  @media (min-width: 1194px) and (max-width: 1430px) {
    width: 346px;
    height: 100%;
    min-width: 346px;
  }

  @media (max-width: 600px) {
    width: 267px;
    height: fit-content;
    padding: 36px 18px;
    margin-top: 0;
  }

  @media (max-width: 428px) {
    min-width: 100%;
    height: fit-content;
    padding: 36px 18px;
    margin-top: 0;
  }
`;
export const PlanTitle = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-weight: 600;
  font-size: 24px;
  line-height: 33px;
  align-items: center;
  text-align: center;
  text-transform: uppercase;
  width: 100%;
  color: ${(props) =>
    props.highlighted
      ? selectedTheme.colors.primaryYellow
      : selectedTheme.colors.primaryPurple};

  @media (min-width: 1194px) and (max-width: 1430px) {
    margin-top: 42px;
  }
`;
export const PlanTitleDescription = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  width: 100%;
  text-align: center;
  margin-top: 7px;
  color: ${(props) =>
    props.highlighted ? "white" : selectedTheme.colors.primaryGrayText};

  @media (max-width: 600px) {
    font-size: 14px;
  }
`;
export const PlanPriceContainer = styled(Box)`
  width: 100%;
  text-align: center;
  margin: 36px 0;
  display: flex;
  gap: 9px;
`;
export const PlanPrice = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 600;
  font-size: 24px;
  line-height: 33px;
  text-align: right;
  flex: 1;
  color: ${(props) =>
    props.highlighted ? "white" : selectedTheme.colors.primaryPurple};

  @media (max-width: 1430px) {
    font-size: 22px;
  }

  @media (max-width: 600px) {
    font-size: 18px;
  }
`;
export const PlanPriceMonthly = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 600;
  font-size: 24px;
  line-height: 33px;
  text-align: left;
  flex: 1;
  color: ${(props) =>
    props.highlighted
      ? selectedTheme.colors.iconProfileColor
      : selectedTheme.colors.primaryGrayText};

  @media (max-width: 600px) {
    font-size: 14px;
  }
`;
export const PlanDetail = styled(Box)`
  display: flex;
  flex-direction: row;
  gap: 6px;
`;
export const PlanDetailTitle = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 600;
  font-size: 16px;
  line-height: 22px;
  color: ${(props) =>
    props.highlighted
      ? selectedTheme.colors.primaryYellow
      : selectedTheme.colors.primaryPurple};

  @media (max-width: 1430px) {
    max-width: 34px;
    max-height: 20px;
    white-space: nowrap;
    overflow: hidden;
  }

  @media (max-width: 600px) {
    font-size: 14px;
    max-width: 30px;
    max-height: 20px;
    white-space: nowrap;
    overflow: hidden;
  }
`;
export const PlanDetailDescription = styled(Typography)`
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 100;
  font-size: 16px;
  line-height: 22px;
  color: ${(props) =>
    props.highlighted ? "white" : selectedTheme.colors.primaryGrayText};

  @media (max-width: 600px) {
    font-size: 14px;
    font-weight: 400;
  }
`;
export const Line = styled(Box)`
  width: 100%;
  height: 1px;
  border-top: 1px solid ${selectedTheme.colors.primaryIconBackgroundColor};
  margin: 9px 0;
`;
export const BuyButton = styled(PrimaryButton)`
  text-align: center;
  margin-top: 18px;
  font-family: ${selectedTheme.fonts.textFont};
  font-style: normal;
  font-weight: 600;
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
`;
export const PlanIcon = styled(Box)`
  position: absolute;
  top: 40px;
  right: 36px;
  & svg {
    width: 24px;
    height: 24px;
    & path {
      stroke: ${(props) =>
        props.highlighted
          ? selectedTheme.colors.primaryYellow
          : selectedTheme.colors.primaryPurple};
    }
  }

  @media (min-width: 1194px) and (max-width: 1430px) {
    left: calc(50% - 12px);
  }

  @media (max-width: 600px) {
    svg {
      width: 18px;
      height: 18px;
    }
  }
`;
