@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  font-optical-sizing: auto;
  background-color: #f7f3f3;
}

main {
  display: flex;
  gap: 24px;
  padding: 20px;
  max-width: 1512px;
  height: 100vh;
  margin: 0 auto;

  .sidebar {
    width: 300px;
    background-color: #ffffff;
    border-radius: 20px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    position: relative;

    .sidebar-top {
      display: flex;
      justify-content: space-between;

      .new-chat-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        background-color: #a300e4;
        color: #ffffff;
        border: none;
        border-radius: 3px;
        padding: 4px 8px;
        font-size: 12px;
        cursor: pointer;
        width: fit-content;
        margin-bottom: 4px;
        img {
          width: 16px;
          height: 16px;
        }
      }

      .search-icon {
        width: 24px;
        height: 24px;
        cursor: pointer;
      }
    }

    h1 {
      font-size: 24px;
      font-weight: 400;
      margin-bottom: 4px;
    }

    hr {
      border: none;
      border-top: 1px solid rgba(0, 0, 0, 0.3);
      margin-bottom: 16px;
    }
    .chat-history {
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      margin-top: 8px;
      .chat-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        transition: background-color 0.2s;

        &:hover {
          background-color: rgba(0, 0, 0, 0.05);
        }

        img {
          width: 24px;
          height: 24px;
        }

        span {
          font-size: 12px;
          font-weight: 400;
          color: #000000;
        }
      }
    }
  }

  .chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;

    .messages {
      flex: 1;
      overflow-y: auto;
      padding: 20px 120px;

      p {
        font-size: 20px;
        font-weight: 500;
        color: #000000;
      }

      .user-message {
        display: flex;
        align-items: center;
        gap: 16px;

        img {
          width: 40px;
          height: 40px;
          border-radius: 50%;
          object-fit: cover;
        }
      }

      .ai-message {
        margin-left: 56px;
        p {
          font-size: 16px;
          font-weight: 700;
          color: #000000;
          margin-bottom: 10px;
        }

        ol {
          margin-left: 20px;
          font-size: 16px;
          font-weight: 400;
          line-height: 1.5;
          color: #000000;
        }
      }
    }
  }

  .input-container {
    position: relative;
    display: flex;
    align-items: start;
    background-color: #ffffff;
    border-radius: 32px;
    padding: 0;
    min-height: 190px;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);

    input {
      flex: 1;
      border: none;
      outline: none;
      padding: 32px 40px;
      font-size: 20px;
      background: transparent;

      &::placeholder {
        color: #000000;
      }
    }

    button {
      position: absolute;
      bottom: 20px;
      right: 20px;
      height: 50px;
      width: 50px;
      background-color: #ff0000;
      border: none;
      border-radius: 32px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        width: 24px;
        height: 24px;
      }

      &:hover {
        opacity: 0.9;
      }
    }
  }
}
