* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    'Open Sans',
    'Helvetica Neue',
    sans-serif;
}

body {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.button {
  background-color: white;
  color: #4caf50;
  border: none;
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;

  &:hover {
    background-color: #45a049;
  }
}

.mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.magic-sidebar {
  width: 250px;
  background-color: #2c3e50;
  color: white;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 10px;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1000;
  display: none;

  .magic-sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
  }

  .profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
  }

  .user-info {
    display: flex;
    flex-direction: column;
  }

  .user-info p {
    margin: 0;
    font-weight: bold;
  }

  .user-info a {
    color: #1abc9c;
    text-decoration: none;
    font-size: 0.9rem;
  }

  .magic-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .magic-sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
  }

  .magic-sidebar-item:hover {
    background-color: #34495e;
  }

  .icon {
    font-size: 1.2rem;
  }

  .switch {
    margin-left: auto;
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    align-self: flex-end;
  }

  .switch input {
    opacity: 0;
    width: 0;
    height: 0;
  }

  .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cccccc0e;
    transition: 0.4s;
    border-radius: 20px;
  }

  .slider:before {
    position: absolute;
    content: '';
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
  }

  input:checked + .slider {
    background-color: #1abc9c;
  }

  input:checked + .slider:before {
    transform: translateX(14px);
  }

  .magic-sidebar-footer {
    font-size: 0.8rem;
    text-align: center;
    color: #bdc3c7;
    margin-top: auto;
  }
}

.app {
  display: flex;
  flex: 1;
  background-color: rgb(237, 236, 236);
  min-height: 0;
}

.sidebar {
  width: 30%;
  background-color: #f4f4f4;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #ddd;
  overflow-x: hidden;

  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #4caf50;
    color: white;

    h3 {
      margin: 0;
    }
  }

  .search-bar {
    padding: 10px;

    input {
      width: 100%;
      padding: 5px;
      border: 1px solid #ccc;
      border-radius: 5px;
    }
  }

  .chat-list {
    flex: 1;
    overflow-y: auto;

    ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .chat-item {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 10px;
      border-bottom: 1px solid #ddd;
      cursor: pointer;

      &:hover {
        background-color: #e9e9e9;
      }

      .chat-item-content {
        display: flex;
        align-items: center;

        .chat-item-profile {
          width: 40px;
          height: 40px;
          background-color: #ccc;
          border-radius: 50%;
          margin-right: 10px;
        }

        .chat-item-details {
          h4 {
            margin: 0;
            font-size: 1rem;
          }

          p {
            margin: 0;
            font-size: 0.875rem;
            color: #555;
          }
        }
      }

      .chat-item-time {
        font-size: 0.75rem;
        color: #999;
      }
    }
  }
}

.sidebar-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
}

.sidebar-float {
  position: fixed;
  top: 50px;
  left: 0;
  z-index: 1000;
}

.sidebar-collapse {
  display: none;
}

.mainbox {
  flex: 1;
  background-color: rgb(206, 204, 204);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;

  .welcome-page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    text-align: center;
    background-color: #dddddd;
    .img-holder {
      height: 200px;
      width: 200px;
      border-radius: 50%;
      display: flex;
      justify-content: center;
      margin: 20px auto;
      align-items: center;
      overflow: hidden;
      img {
        width: 80%;
        height: 80%;
      }
    }
  }

  .chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background-color: #4caf50;
    color: white;

    .back-to-contact-list {
      margin-right: 2px;
      display: none;
    }

    .chat-header-profile {
      width: 40px;
      height: 40px;
      background-color: #ccc;
      border-radius: 50%;
      margin-right: 10px;
    }

    .chat-header-details {
      flex: 1;

      h4 {
        margin: 0;
        font-size: 1rem;
      }

      p {
        margin: 0;
        font-size: 0.875rem;
        color: #eee;
      }
    }

    .chat-header-options {
      button {
        background-color: white;
        color: #4caf50;
        border: none;
        border-radius: 5px;
        padding: 5px 10px;
        cursor: pointer;
      }

      button:hover {
        background-color: #45a049;
      }
    }
  }

  .chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;

    .chat-message {
      display: flex;
      align-items: center;
      margin-bottom: 10px;

      &.chat-message-sent {
        justify-content: flex-end;

        .chat-message-content {
          background-color: #d1ffd1;
        }
      }

      &.chat-message-received {
        justify-content: flex-start;

        .chat-message-content {
          background-color: #f1f1f1;
        }
      }

      .chat-message-profile {
        width: 40px;
        height: 40px;
        background-color: #ccc;
        border-radius: 50%;
        margin-right: 10px;
      }

      .chat-message-content {
        max-width: 70%;
        padding: 10px;
        border-radius: 10px;
      }
    }
  }

  .chat-footer {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #f4f4f4;
    border-top: 1px solid #ddd;

    textarea {
      flex: 1;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      resize: none;
    }

    button {
      background-color: #4caf50;
      color: white;
      border: none;
      border-radius: 5px;
      padding: 10px 20px;
      cursor: pointer;
      margin-left: 10px;
    }

    button:hover {
      background-color: #45a049;
    }
  }
}

.mainbox-fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;

  .chat-header {
    .back-to-contact-list {
      display: block;
    }
  }
}

.success-drop-down {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: 300px;
  background-color: rgb(0, 128, 0);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
  box-shadow: 0px 0px 10px 0px rgb(0, 0, 0, 0.5);
  margin: 10px;
  padding: 10px;
  animation: slideIn 0.5s ease-in-out forwards;
  display: none;
}

@keyframes slideIn {
  0% {
    transform: translate(-50%, -100%);
  }
  100% {
    transform: translate(-50%, 0);
  }
}

.signbox {
  max-width: 1024px;
  height: 700px;
  margin: 50px auto;
  background-color: rgb(175, 144, 213);
  border-radius: 50px;
  box-shadow: 0px 0px 20px 0px rgb(14, 14, 14, 0.1);

  .signbox-inner {
    height: 100%;
    width: 100%;
    display: flex;
  }

  .signbox-left {
    width: 40%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 50px;

    .signbox-left-inner {
      display: flex;
      justify-content: center;
      align-items: center;
      /* border: thin solid black; */
      height: 100%;
      width: 100%;
      overflow: hidden;
    }

    img {
      width: 80%;
      object-fit: cover;
    }
  }
  .signbox-right {
    width: 60%;
    height: 100%;
    padding: 80px 100px;
    background-color: white;
    border-radius: 50px;

    .otp-email-detail {
      display: flex;
      flex-direction: column;
      margin: 20px 0;

      .otp-email {
        font-size: 1.2rem;
        font-weight: 500;
      }

      .resend-otp-btn {
        background-color: transparent;
        border: none;
        background-color: rgb(60, 131, 237);
        font-size: 1.2rem;
        cursor: pointer;
        transition: all 0.3s ease-in-out;
        padding: 10px;
        margin: 10px 0;
        color: white;
        border-radius: 20px;
      }

      .resend-otp-btn:hover {
        background-color: rgb(60, 131, 237, 0.8);
      }
    }

    form {
      display: flex;
      flex-direction: column;
      padding-top: 20px;

      input {
        margin: 10px 0;
        padding: 5px;
        margin: 10px 0px;
        border: none;
        border-bottom: 1px solid rgb(66, 66, 66);
        font-size: 1.2rem;
      }
      input:focus {
        outline: none;
      }

      .submit-btn {
        margin: 10px 0;
        padding: 10px;
        border-radius: 20px;
        border: none;
        font-size: 1.2rem;
        background-color: rgb(146, 97, 206);
        color: white;
        cursor: pointer;
        transition: all 0.3s ease-in-out;
      }

      .error-message {
        color: red;
        font-size: 1rem;
        margin: 5px 0;
      }

      .submit-btn:hover {
        background-color: rgb(146, 97, 206, 0.8);
      }
    }

    .divider {
      display: flex;
      align-items: center;
      margin: 20px 0;
    }

    .divider::before,
    .divider::after {
      content: '';
      flex: 1;
      border-bottom: 1px solid #ccc;
    }

    .divider::before {
      margin-right: 0.25em;
    }

    .divider::after {
      margin-left: 0.25em;
    }

    .google-signup {
      display: flex;
      align-items: center;
      gap: 10px;
      background-color: white;
      border: 1px solid #ccc;
      padding: 12px 20px;
      border-radius: 8px;
      box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
      cursor: pointer;
      font-family: Arial, sans-serif;
      font-size: 16px;
      font-weight: 500;
      transition: all 0.3s ease-in-out;
      margin: 10px 0px;
    }

    .google-signup img {
      width: 24px;
      height: 24px;
    }

    .google-signup:hover {
      background-color: #f0f0f0;
    }

    .signin-text {
      margin-top: 30px;
      font-size: 14px;
      color: #555;
      text-align: center;
      text-decoration: underline;
    }

    .signin-text a {
      color: #1a73e8;
      text-decoration: none;
      font-weight: bold;
    }

    .signin-text a:hover {
      text-decoration: underline;
    }
  }
}

/* #add media queries here for laptop and mobile responsiveness */

@media (max-width: 1024px) {
  .signbox {
    width: 500px;
    background-color: white;
    .signbox-left {
      display: none;
    }
    .signbox-right {
      width: 100%;
      padding: 50px;
    }
  }
}

@media (max-width: 510px) {
  .signbox {
    width: 100%;
    margin: auto;
    border: none;
    box-shadow: none;
    height: 100vh;
    .signbox-right {
      padding: 50px 20px;
      border: none;

      h2 {
        text-align: center;
      }

      input {
        font-size: 5rem;
      }
    }
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 500px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.close:hover,
.close:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}
