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

export const Details = styled(Box)`
  display: flex;
  flex-direction: column;
  gap: 12px;
  ${(props) => props.hasScrollBar && !props.exchange && `height: 300px;`}
  overflow-y: auto;
  overflow-x: hidden;
  ::-webkit-scrollbar {
    width: 5px;
  }
  ::-webkit-scrollbar-thumb {
    background: #c4c4c4;
    border-radius: 3px;
  }

  @media screen and (max-width: 600px) {
    margin-top: 15px;
    ${(props) =>
      !props.hasScrollBar && props.exchange &&
      `
    overflow: hidden;
    max-height: none;`}
  }
`;

export const OfferTitle = styled(Typography)`
  font-family: "Open Sans";
  flex: 1;
  color: ${selectedTheme.primaryPurple};
  font-weight: 700;
  font-size: 24px;
  padding: 0 60px;
  @media screen and (max-width: 600px) {
    padding: 0;
    font-size: 18px;
  }
`;
export const OfferLittleDetails = styled(Box)`
  display: flex;
  flex-direction: column;
  flex-wrap: ${(props) => (!props.halfwidth ? "no-wrap" : "wrap")};
  justify-content: space-between;
  padding: 0 60px;
  @media (max-width: 600px) {
    padding: 0;
  }
`;
export const Scroller = styled(HorizontalScroller)`
  min-height: 144px;
  min-width: 144px;
  max-width: 100%;
  /* & div {
    margin: 0 9px;
  } */
`;
export const OfferDescriptionTitle = styled(Box)`
  font-family: "Open Sans";
  font-size: 12px;
  color: ${selectedTheme.primaryDarkText};
  line-height: 16px;
  @media (max-width: 600px) {
    font-size: 9px;
    line-height: 13px;
  }
`;
export const OfferDescriptionText = styled(Box)`
  font-family: "Open Sans";
  font-size: 16px;
  color: ${selectedTheme.primaryDarkText};
  line-height: 22px;
  padding-bottom: 20px;
  max-width: ${(props) => props.showBarterButton ? "calc(100% - 230px)" : "100%"};
  @media (max-width: 600px) {
    font-size: 14px;
    max-width: 100%;
    max-height: 100px;
  }
  /* max-width: calc(100% - 230px); */
  /* overflow: hidden; */
  /* display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical; */
`;
export const OfferImage = styled.img`
  min-width: 144px;
  min-height: 144px;
  width: 144px;
  height: 144px;
  margin-right: 20px;
  object-fit: cover;

  @media screen and (max-width: 600px) {
    min-width: 144px;
    margin-right: 13px;
  }
`;