import styled from "styled-components";

export const Container = styled.div`
  color: #313333;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
`;

export const Header = styled.div`
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  gap: 16px;
  height: 30px;
  width: fit-content;
  h1 {
    font-size: 22px;
    font-weight: 700;
    span {
      font-weight: 400;
      color: #7c8080;
    }
  }
`;

export const Content = styled.div`
  background-color: #ffffff;
  padding: 20px 20px 40px;
  border-radius: 30.913px;
  width: 100%;
`;

export const ScoreHeaderContainer = styled.div`
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
  button {
    border: none;
    outline: none;
    background-color: transparent;
    &:disabled {
      cursor: not-allowed;
    }
  }
`;
export const ScoreHeader = styled.div`
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: fit-content;
  padding-bottom: 15px;
  border-bottom: 1px solid #f5f7f7;
  gap: 10px;
  button {
    height: 40px;
    width: 40px;
    background-color: #00c2c2;
    border-radius: 10px;
    padding: 0;
    cursor: pointer;
    &:disabled {
      background: #c6cccc;
      cursor: not-allowed;
    }
  }
`;

export const QuestionNav = styled.div`
  display: flex;
  align-items: center;
  gap: 28px;
  button {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 400;
    color: #00c2c2;
    gap: 8px;
    cursor: pointer;
    &:disabled {
      color: #c6cccc;
    }
  }
`;

export const ScoreRight = styled.div`
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-end;

  button {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #febf101a;
    border-radius: 10px;
    height: 40px;
    padding: 0 10px;
    border-radius: 0px 10px 10px 0px;
    color: #febf10;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    cursor: pointer;
  }
`;

export const ScoreBadge = styled.p`
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 10px;
  color: #4a4d4d;
  background-color: #00c2c21a;
  height: 40px;
  padding: 0 10px;
  gap: 5px;
  border-radius: ${({ ai, instructor }) =>
    ai || !instructor ? "10px" : "10px 0 0 10px"};
  color: #4a4d4d;
  font-size: 12px;
  background-color: ${({ ai }) => (ai ? "#FFFDF6" : "#00c2c21a")};
  span {
    font-weight: 700;
    color: ${({ ai }) => (ai ? "#FEBF10" : "#00c2c2")};
    font-size: 20px;
  }
  &.hidden {
    display: none;
  }
`;

export const QuestionContent = styled.div`
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
`;

export const QuestionWrapper = styled.div`
  display: flex;
  width: 100%;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  min-height: 330px;
`;

export const Loader = styled.div`
  display: grid;
  place-items: center;
  min-height: 330px;
  position: relative;
  padding-bottom: 70px;
`;
export const QuestionTitle = styled.h2`
  border-radius: 5px;
  background: rgba(254, 241, 203, 0.5);
  padding: 4px 20px;
  color: #7c8080;
  font-size: 14px;
  font-weight: 400;
`;

export const QuestionFooter = styled.div`
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  padding-top: 30px;
`;

export const ViewAnalysisButton = styled.button`
  border: none;
  outline: none;
  background-color: transparent;
  cursor: pointer;
  display: inline;
  width: fit-content;
  color: #3ac2c2;
  font-size: 14px;
  line-height: 24px;
  font-weight: 600;

  &:disabled {
    color: #c6cccc;
    cursor: not-allowed;
  }
`;

export const TitleAndSubtitle = styled.div`
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  &.with-border {
    border-bottom: 1px solid #f5f7f7;
    padding-bottom: 15px;
  }
  > h3,
  > p {
    font-size: 16px;
  }
  > h3 {
    color: #949999;
    font-weight: 600;
  }
  > p {
    color: #4a4d4d;
    font-weight: 400;
  }
`;

export const QuestionSection = styled.div`
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  button {
    border: none;
    outline: none;
    background-color: transparent;
    cursor: pointer;
  }
`;

export const QuestionSectionWithAnalysis = styled.div`
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
`;

export const QuestionSectionAction = styled.div`
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
`;

export const MatchPairGrid = styled.div`
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  gap: 30px;
  h3 {
    color: #949999;
    font-size: 16px;
    font-weight: 600;
  }
`;

export const MatchPairItem = styled.div`
  display: grid;
  place-items: center;
  width: 100%;
  height: 78px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #adb2b2;
  background: #fbfbfb;
  position: relative;
  .truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3; /* Number of lines to show */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  &.is-correct {
    border: 1px solid #30d468;
    background: rgba(48, 212, 104, 0.1);
    p {
      color: #30d468;
    }
  }
  &.is-incorrect {
    border: 1px solid #f95454;
    background: rgba(249, 84, 84, 0.1);
    p {
      color: #f95454;
    }
  }
  p {
    color: #323232;
    font-size: 16px;
  }

  button {
    position: absolute;
    bottom: -10px;
    right: -10px;
  }
`;

export const ModalContainer = styled.div`
  display: grid;
  place-items: center;
  position: fixed;
  z-index: 9991;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.15);
`;

export const PairPreviewContainer = styled.div`
  width: 600px;
  background-color: #fff;
  border-radius: 32px;
  padding: 48px;
  button {
    width: 100%;
  }
  > div {
    background: #fff;
    height: 300px;
    overflow-y: auto;
    margin-bottom: 20px;
    p {
      color: #adb2b2;
      font-size: 14px;
      font-weight: 600;
    }
  }
`;
