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

export const ChatCardContainer = styled(Container)`
  display: flex;
  flex-direction: row;
  height: 180px;
  width: ${(props) => (!props.halfwidth ? "100%" : "49%")};
  box-sizing: border-box;
  margin: 10px 0;
  background-color: ${(props) =>
    props.sponsored === "true" ? selectedTheme.backgroundSponsoredColor : "white"};
  border-radius: 4px;
  ${(props) =>
    props.sponsored === "true" && `border: 1px solid ${selectedTheme.borderSponsoredColor};`}
  padding: 16px;
  max-width: 2000px;
  height: 180px;
  position: relative;
  justify-content: space-between;
  @media (max-width: 550px) {
    max-height: 108px;
    margin: 0;
    ${(props) =>
      props.vertical &&
      `height: 330px;
      width: 180px;
      margin: 0 18px;`}
  }
`;
export const UserImage = styled.img`
  border-radius: 50%;
  width: 144px;
  height: 144px;
  @media (max-width: 600px) {
    width: 72px;
    height: 72px;
  }
`;
export const UserImgWrapper = styled(Box)`
  overflow: hidden;
  border-radius: 50%;
  width: 144px;
  height: 144px;
  @media (max-width: 600px) {
    width: 72px;
    height: 72px;
    min-width: 80px;
  }
`;
export const ChatInfo = styled(Box)`
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
`;
export const Col = styled(Box)`
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 18px;
  flex: 1;
  @media (max-width: 600px) {
    ${props => props.mobileDisappear && 'display: none;'}
  }
`;
export const UserName = styled(Typography)`
  margin-bottom: 12px;
  font-family: "Open Sans";
  color: ${selectedTheme.primaryPurple};
  font-weight: 700;
  font-size: 24px;
  cursor: pointer;
  @media (max-width: 600px) {
    font-size: 18px;
  }
`;
export const LastMessage = styled(Typography)`
  font-family: "Open Sans";
  color: ${selectedTheme.primaryDarkTextThird};
  line-height: 22px;
  font-size: 16px;
  max-width: 220px;
  flex: 1;
  overflow: hidden;
  max-height: 66px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  position: relative;
  @media (max-width: 600px) {
    display: none;
  }
`;
export const Line = styled(Box)`
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  height: 100px;
  width: 0;
  margin: auto 0;
  @media (max-width: 600px) {
    display: none;
  }`;
