import styled from "styled-components";
import {
  whiteBackground,
  purpleBase,
  purpleBackground,
  grayBase,
  h4Headlines,
} from "../constants";
import { CustomInfoPanelProps } from ".";

export const InfoPanelContainer = styled.div<CustomInfoPanelProps>`
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  overflow: hidden;
  outline: 0;
  overflow-x: hidden;
  overflow-y: auto;
  display: ${(props) => `${props.isShowPanel ? "" : "none"}`};
`;
export const CustomInfoPanel = styled.div<CustomInfoPanelProps>`
  width: 460px;
  height: 100%;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  background-color: ${whiteBackground};
  display: flex;
  flex-direction: column;
  animation-name: fadeInRight;
  animation-duration: 500ms;
  @media screen and (max-width: 768px) {
    width: 385px;
  }
  @media screen and (max-width: 428px) {
    width: 100%;
  }
  @keyframes fadeInRight {
    from {
      opacity: 0;
      transform: translate3d(100%, 0, 0);
    }

    to {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }
  }
`;

export const InfoPanelTitle = styled.div`
  display: flex;
  justify-content: space-between;
  ${h4Headlines}
  padding: 16px 20px;
  margin: 8px 0px;
  color: ${purpleBase};
  img {
    cursor: pointer;
  }
`;

export const PurpleLineBreak = styled.div`
  border-top: 1px solid ${purpleBackground};
  width: 100%;
`;

export const Overlay = styled.div`
  background-color: ${grayBase};
  opacity: 0.25;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  left: 0;
`;
