@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;
    font-family: "Poppins", Arial, Helvetica, sans-serif;
    font-weight: 500;
    box-sizing: border-box;
}

.hero {
    width: 100dvw;
    height: 100dvh;
    background: #f7f7f7f7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0px 0px 25px 2px rgba(0, 0, 0, 0.04);
    padding: 30px;
    width: 100%;
    max-width: 450px;
}

.chat-wrapper {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0px 0px 25px 2px rgba(0, 0, 0, 0.04);
    width: 100%;
    max-width: 450px;
}

.wrapper .title {
    padding-bottom: 10px;
    border-bottom: 1px solid #ccc;
}

.wrapper .title h1 {
    color: #333;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.input-group * {
    font-weight: 400 !important;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 10px;
}

.input-group input {
    border-radius: 5px;
    border: 1px solid #ccc;
    outline: 0;
    padding: 10px;
    font-size: 16px;
}

.input-group input[type="submit"] {
    color: #fff;
    background: #333;
    cursor: pointer;
    border: 0;
    font-weight: 500;
    font-size: 18px;
}

form p {
    font-weight: 400;
    text-align: center;
    margin: 10px 0;
}

.error {
    padding: 10px;
    background: pink;
    color: red;
    border: 1px solid red;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 0px;
    overflow: hidden;
    padding: 0px 10px;
    border: 0px;
    transition: 300ms;
    font-size: 8px;
}

.error.active {
    padding: 10px;
    background: pink;
    color: red;
    border: 1px solid red;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 45.6px;
    font-size: 16px;
}

.users {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: scroll;
    max-height: 400px;
    margin-top: 20px;
}

.user {
    display: flex;
    gap: 10px;
    align-content: center;
    cursor: pointer;
    border-bottom: 1px solid #ccc;
    padding: 20px 0;
}

.user img {
    border-radius: 50%;
    height: 50px;
    width: 50px;
    border: 1px solid #eee;
}

.user p {
    font-weight: 400;
}

.user:last-of-type {
    border: 0px;
}

*::-webkit-scrollbar {
    width: 0;
}

header {
    padding: 20px 10px;
    background: #fff;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: row;
    gap: 15px;
}

header img {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    border: 1px solid #ccc;
}

.chat-box {
    background: #f7f7f7f7;
    padding: 10px 30px 20px 30px;
    overflow: scroll;
    max-height: calc(100svh - 90px - 81px - 20px);
}

.typing-area {
    padding: 18px 30px;
    display: flex;
    justify-content: space-between;
    flex-direction: row;
    margin-top: 0;
    gap: 0;
}

.typing-area input {
    height: 45px;
    width: calc(100% - 103px);
    font-size: 16px;
    padding: 0 13px;
    border: 1px solid #e6e6e6;
    outline: none;
    border-radius: 0px;
}

.typing-area button {
    color: #fff;
    width: 55px;
    border: none;
    outline: none;
    background: #333;
    font-size: 19px;
    cursor: pointer;
    opacity: 0.7;
    pointer-events: none;
    border-radius: 0 5px 5px 0;
    transition: all 0.3sease;
    height: 45px;
}

.typing-area label button{
    border-radius: 5px 0 0 5px;
    background: #f7f7f7;
    color: #000;
    cursor: pointer;
}

.typing-area button.active {
    opacity: 1 !important;
    pointer-events: auto !important;
    background: #333;
    color: #fff;
}

.chat-box .chat {
    margin: 15px 0;
}

.chat-box .incoming {
    display: flex;
    align-items: flex-end;
}

.chat-box .outgoing {
    display: flex;
}

.chat-box .outgoing .details {
    margin-left: auto;
    max-width: calc(100% - 130px);
}

.chat-box .incoming .details {
    margin-right: auto;
    margin-left: 10px;
    max-width: calc(100% - 130px);
}

.incoming .details p {
    background: #fff;
    color: #333;
    border-radius: 18px 18px 18px 0;
}

.outgoing .details p {
    background: #333;
    color: #fff;
    border-radius: 18px 18px 0 18px;
}

.chat-box .chat p {
    word-wrap: break-word;
    padding: 8px 16px;
    box-shadow: 0 0 32px rgb(0 0 0 / 8%), 0rem 16px 16px -16px rgb(0 0 0 / 10%);
}

.chat img, .chat video{
    max-width: 250px;
    max-height: 400px;
}

header a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #000;
}


.chat p:has(img), 
.chat p:has(video){
    overflow: hidden;
    padding: 0px !important;
    height: calc(100% - 8px);
}
