@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
    position: relative;
}

body {
    width: 100%;
    min-height: 100vh;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #DDD9D0;
    padding: 0 5%;
}

a {
    text-decoration: none;
    cursor: pointer;
}

button,input {
    background: none;
    border: none;
    outline: none;
}

.main-container {
    max-width: 1000px;
    width: 100%;
    min-height: 90vh;
    height: 100%;
    background: #49426E;
    border-radius: 25px;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border: 5px solid #E2D3F4;
    box-shadow: 0px 0px 25px #9e8faf92;
}

.navbar {
    width: 100%;
    height: fit-content;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
    padding: 20px 4%;
}

.nav-left,.nav-right {
    width: fit-content;
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-logo {
    width: 120px;
}

.search-bar {
    width: 300px;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: flex-start;
    background: #E2D3F4;
    padding: 8px 8px 8px 13px;
    border-radius: 8px;
}

.search-bar img {
    width: 22px;
    height: 22px;
}

.search-bar input {
    width: 100%;
    font-size: 17px;
    font-weight: 400;
    padding-left: 12px;
    color: #332F54;
}

.setting {
    width: 30px;
}

.user {
    position: relative;
}

.user img {
    width: 40px;
    border-radius: 50%;
    border: 3px solid #EEC291;
}

.user::after {
    content: '';
    width: 13px;
    height: 13px;
    background: greenyellow;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
}

.bottom-sec {
    width: 100%;
    height: 76.5vh;
    display: flex;
    justify-content: center;
    flex-direction: row;
    align-items: flex-start;
    padding: 0 4% 20px 4%;
    gap: 20px;
    overflow: hidden;
}

.side-menu {
    width: 250px;
    height: 100%;
    overflow-x: hidden;
    overflow-y: scroll;
}

.side-menu::-webkit-scrollbar {
    display: none;
}

.side-menu ul {
    list-style-type: none;
    background: #332F54;
    padding: 40px 20px 20px 20px;
    border-radius: 20px;
}

.side-menu ul li {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.side-menu ul li:first-child {
    margin-top: 0;
}

.side-menu ul li img {
    width: 25px;
}

.side-menu ul li a {
    text-decoration: none;
    color: #E2D3F4;
    font-weight: 500;
    font-size: 18px;
    transition: 0.4s;
}

.side-menu ul li a:hover, .side-menu ul li .active {
    color: #fff;
}

.chat-sec {
    width: 100%;
    height: fit-content;
    margin-top: 20px;
}

.chat {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 10px 0;
  background: #332F54;
  padding: 10px 20px;
  border-radius: 15px;
  transition: 0.4s;    
}
.chat img {
    width: 35px;
    border-radius: 50%;
    border: 3px solid #EEC291;
}

.chat p {
    font-size: 17px;
    color: #E2D3F4;
    font-weight: 500;
    transition: 0.4s;
}

.chat:hover {
    background: #E2D3F4;
}

.chat:hover p {
    color: #332F54;
}

.chat-section {
    flex-grow: 1;
    height: 100%;
    background: #332F54;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
}

.chat-header {
    width: 100%;
    height: fit-content;
    padding: 10px 4% 5px 4%;
    border-bottom: 2px solid #544F7E;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    align-items: center;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-header .user-main img {
    width: 50px;
    border-radius: 50%;
    border: 3px solid #EEC291;
}

.user-main {
    position: relative;
}

.user-main::after {
    content: '';
    width: 13px;
    height: 13px;
    background: greenyellow;
    position: absolute;
    top: 0;
    right: 0;
    border-radius: 50%;
    z-index: 20;
}

.user-header h2 {
    margin-top: -8px;
    color: #E2D3F4;
}

.threedot {
    width: 40px;
}

.chat-type {
    width: 100%;
    height: 65px;
    border-top: 2px solid #544F7E;
    position: absolute;
    bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    gap: 20px;
    padding: 12px 4%;
    background: #332F54;
}

.chat-type img {
    width: 25px;
}

.message-type {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-direction: row;
    gap: 20px;
    border: 2px solid #544F7E;
    padding: 10px 15px;
    border-radius: 15px;
}

.message-type input {
    flex-grow: 1;
    font-size: 16px;
    color: #E2D3F4;
}

.message-type input::placeholder {
    color: #9386a2;
}

.all-chat {
    width: 100%;
    height: 72%;
    overflow-x: hidden;
    overflow-y: scroll;
    padding: 20px 4% 65px 4%;
}

.all-chat::-webkit-scrollbar {
    display: none;
}

.chat-box {
    width: 60%;
    height: fit-content;
    background: #49426E;
    display: flex;
    justify-content: flex-start;
    flex-direction: row;
    align-items: flex-start;
    padding: 15px;
    border-radius: 15px;
    gap: 15px;
    margin-bottom: 15px;
}

.chat-box img {
    width: 40px;
    border-radius: 50%;
    border: 3px solid #EEC291;
}

.chat-txt h4 {
   color: #EEC291;
   font-size: 14px;
   margin-bottom: 5px;
}

.chat-txt p {
    color: #DDD9D0;
}

.my-message {
    margin-left: 40%;
    background: #3F3b62;
}

.chat-txt h4 span {
   color: #E2D3F4;
}

.toggle-btn {
    display: none;
}

.toggle-btn img {
   width: 27px;
}

.side-menu .search-bar {
    display: none;
}

@media(max-width:800px) {
    .toggle-btn {
        display: block;
    }
    body {
        padding: 0 3%;
    }

    .main-container {
        min-height: 95vh;
    }
    .side-menu {
        display: none;
        width: 280px;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 1000;
        background: #49426E;
        padding: 20px;
    }
    .side-menu.active {
        display: flex;
        justify-content: flex-start;
        flex-direction: column;
        align-items: center;
    }
    .side-menu ul {
        width: 100%;
        padding: 20px 20px 10px 20px;
    }
    .side-menu ul li {
        margin: 12px 0;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    .side-menu ul li img {
        width: 22px;
    }

    .side-menu ul li a {
        font-size: 16px;
    }
    .chat-sec {
        margin-top: 10px;
    }
    .chat {
        gap: 12px;
        margin: 8px 0;
        padding: 8px 17px;
    }
    .chat img {
        width: 30px;
        border: 2px solid #EEC291;
    }
    .chat p {
        font-size: 14px;
    }
    .nav-right .search-bar {
        display: none;
    }
    .side-menu .search-bar {
        display: flex;
        width: 100%;
        padding: 8px 8ppx 8px 10px;
        margin-bottom: 20px;
    }
    .search-bar img {
        width: 20px;
        height: 20px;
    }
    .search-bar input {
        font-size: 16px;
        padding-left: 10px;
    }
    .navbar {
        padding: 15px 4%;
    }
    .nav-left,.nav-right {
        gap: 20px;
    }
    .main-logo {
        width: 100px;
    }
    .setting {
        width: 25px;
    }
    .user img {
        width: 30px;
        border: 2px solid #EEC291;
    }
    .bottom-sec {
        height: 84vh;
        padding: 0 4% 15px 4%;
    }
    .chat-header {
        padding: 10px 4% 0 4%;
    }
    .user-header {
        gap: 12px;
    }
    .user-header .user-main img {
        width: 35px;
        border: 2px solid #EEC291;
    }
    .user-main::after {
        width: 10px;
        height: 10px;
    }
    .user-header h2 {
        font-size: 18px;
    }
    .threedot {
        width: 28px;
    }
    .chat-type {
        height: 65px;
        gap: 10px;
        padding: 12px 4%;
        background: #332F54;
    }
    .chat-type img {
        width: 25px;
    }
    .chat-type .send-icon {
 width: 20px;
    }
    .message-type {
        width: 80%;
        gap: 5px;
        padding: 8px 10px;
    }

    .message-type input {
        width: 80%;
        font-size: 15px;
    }

    .message-type img {
        width: 20px;
    }
    .all-chat {
        height: 76%;
        padding: 15px 4% 0 4%;
    }
    .chat-box {
        width: 70%;
        padding: 12px 15px;
        gap: 12px;
        margin-bottom: 10px;
    }
    .chat-box img {
        width: 30px;
        border: 2px solid #EEC291;
    }
    .chat-txt h4 {
        font-size: 14px;
    }
    .chat-txt p {
        font-size: 14px;
    }
    .my-message {
        margin-left: 30%;
    }
}

@media(max-width:500px) {
    .chat-box {
        max-width: 400px;
        width: 95%;
    }
    .my-message {
        margin-left: 5%;
    }
}