@import url('https://fonts.googleapis.com/css?family=Poppins:wght@200;300;400;500; 600 88;700&display-swap');

*{
margin: 0;
padding: 0;
box-sizing: border-box;
text-decoration: none;
font-family: 'Poppins', sans-serif;
}
body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-image:url("img/bg.png");
    background-repeat: no repeat;
    background-position: center;
  }
  
  .wrapper {
    background: #fff;
    width: 450px;
    border-radius: 16px;
    box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1),
                0 32px 64px -48px rgba(0, 0, 0, 0.5);
    margin:10px;
  }
  
.typing-area-wrapper {
    position: relative;
}
.image-preview-container {
    position: relative;
    display: inline-block;
    max-width: 200px;
}

.image-preview-container img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
}

.image-info {
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 0 0 4px 4px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

.preview-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-preview {
    display: none;
    padding: 10px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    margin-bottom: 10px;
}

.media-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 4px;
}

.media-preview.active {
    display: block;
}

.preview-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.input-group {
    display: flex;
    align-items: center;
    gap: 5px;
}
  .form {
    padding: 25px 30px;
  }
  
  .form-header {
    font-size: 25px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 1px solid #e6e6e6;
  }
  .form form {
    margin: 20px 0;
  }
  .form form .error-txt {
    color: #721c24;
    background: #f8d7da;
    padding: 8px 10px;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 10px;
    border: 1px solid #f5c6cb;
    display: none;
  }
  .form form .name-details {
    display: flex;
  }
  form .name-details .field:first-child{
    margin-right: 10px;
  }
  form .name-details .field:last-child{
    margin-left: 10px;
  }
  .form form .field{
    display: flex;
    position: relative;
    flex-direction: column;
    margin-bottom: 10px;
  }
  .form form .field label{
    margin-bottom: 2px;
  }
  .form form .field input {
    outline: none;
  }
  
  .form form .input input {
    height: 40px;
    width: 100%;
    font-size: 16px;
    padding: 0 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
  }
  
  .form form .image input {
    font-size: 17px;
  }
  .form form .button input {
     margin-top: 13px;
    height: 45px;
    border: none;
    font-size: 17px;
    font-weight: 400;
    background: #333;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
}

.form form .field i{
     position: absolute;
      right: 15px;
      color: #ccc;
      top: 60%;
      transform: translate(-50%);
      cursor: pointer;
     }

     .form form .field i.active::before {
        color: #333;
        content: "\f070";
    }
    
.form .link {
     text-align: center;
      margin: 10px 0; 
      font-size: 17px; 
    }
.form .link a{
    color: #ff0037;
}
.form .link a:hover{
    text-decoration: underline;
}

/* user */

.users{
    padding: 25px 30px;
}

.users header,
.users-list a{
display: flex;
align-items: center;
padding-bottom: 20px;
justify-content: space-between;
border-bottom: 1px solid тебебеб
}

.wrapper img{
object-fit: cover;
border-radius: 50%;
}

:is(.users, .users-list) .content{
display: flex;
}

.users header .content img{
height: 60px;
width: 60px;
}

:is(.users, .users-list) .details{
    color: #000;
margin-left: 15px;
}
:is(.users, .users-list) .details span{
font-size: 18px;
font-weight: 500;
}

.users header .logout{
color: #fff;
font-size: 17px;
padding: 7px 15px;
background: #333;
border-radius: 5px;
}

.users .search{
margin: 20px 0;
display: flex;
position: relative;
align-items: center;
justify-content: space-between;
}

.users .search .text{
font-size: 18px;
}

.users .search input{
position: absolute;
height: 42px;
width: calc(100% - 50px);
border: 1px solid #ccc;
padding: 13px;
font-size: 16px;
border-radius: 5px;
outline: none;
opacity: 0;
pointer-events: none;
transition: all 0.3s ease;
}

.users .search input.active{
    opacity: 1;
    pointer-events: auto;
}
.users .search button{
    width: 47px;
    height: 42px;
    border: none;
    outline: none;
    color: #333;
    background: #fff;
    cursor: pointer;
    font-size: 17px;
    border-radius: 5px 5px 0;
    transition: all 0.3s ease;
    }

    .users .search button.active{
        color: #fff;
        background: #333;
    }
    .users .search button.active i::before{
        content:"\f00d";
    }
.users-list{
    max-height: 350px;
    overflow-y: auto;
}
.users-list a{
padding-right: 15px;
page-break-after:10px ;
margin-bottom: 15px;
border-bottom: 1px solid #ececec;
    }

.users-list a:last-child{
    border: none;
    margin-bottom: 0px;
}


    .users-list a .content img{
    height: 50px;
    width: 50px;
  
    }
    .content img{
        padding: 3px;
        border: 1px solid #00ff8c;
    }
  
    .users-list a .content p{
        color:#030303bd ;
    }
    .users-list a .status-dot{
        font-size: 12px;
    color: #00ff8c;
    
    
    }


    .users-list a .status-dot.offline{
        color:#cfcfcf;
    }

    .chat-area header{
display: flex;
align-items: center;
padding: 18px 30px;
}

.chat-area header .back-icon{
font-size: 18px;
color: #333;
}

.chat-area header img{
height: 45px;
width: 45px;
margin: 0 15px;
}

.chat-area header span{
font-size: 17px;
font-weight: 500;
}

.chat-box{
height: 500px;
background: white;
padding: 10px 30px 20px 30px;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.007);
overflow-y: auto;
}

/*:is(.chat-box, .users-list)::-webkit-scrollbar{*/
/*    width:;*/
/*}*/
header{
    border-bottom: 1px solid rgba(0, 0, 0, 0.082);
}

.chat-box .chat{
  margin:15px 0 ;
}


.chat-box .chat p{
  word-wrap: break-word;
padding: 8px 16px;
box-shadow:  0 0 32px rgb(0 0 0 / 8%),
             0 16px 16px -16px rgb(0 0 0 / 10%);

}
.chat-box .outgoing{
display: flex;
}

.outgoing .details{
margin-left: auto;
max-width: calc(100% - 130px);
}
.outgoing .details p{
background: #333;
color: #fff;
border-radius: 18px 18px 0 18px;
      font-size:12px; 
}

@media screen and (max-width: 1024px){
    .outgoing .details p{
      font-size:12px; 
    }
    
    .incoming .details p{
        font-size:12px;
    }
    
}
.incoming .details p{
        font-size:12px;
    }
.chat-box .incoming{
display: flex;
align-items: flex-end;

}
.chat-box .incoming img{
height: 35px;
object-fit: cover;
width: 35px;
}
.incoming .details{
    margin-left: 10px;
    margin-right: auto;
    max-width: calc(100% - 130px);
    
}
.incoming .details p{
    color: #333;
    background:#f0f0f0 ;
    border-radius: 18px 18px 18px 0;

}


.chat-area .typing-area{
padding: 18px 30px;
display: flex;
justify-content: space-between;
}
.typing-area input{
height: 45px;
width: calc(100% - 58px);
font-size: 17px;
border: 1px solid #ccc;
padding:0 13px;
border-radius: 5px 0 0 5px;
outline: none;
}
.typing-area button{
    width: 55px;
    border: none;
    outline: none;
    background: #333;
    color: #fff;
    font-size: 19px;
    cursor: pointer;
    border-radius:0 5px 5px 0;
    }
    

.replying-to {
    background-color: #f1f1f1;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    font-size: 14px;
    color: #555;
    display: none; /* Hidden initially */
}

.replying-to span {
    font-weight: bold;
    color: #333;
}


/* Reply indicator styles */
.reply-indicator {
    font-size: 12px;
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 4px;
    background: #f0f0f0;
    color: #555;
    max-width: 80%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.my-reply {
    background: #e3f2fd;
    border-left: 3px solid #2196F3;
}

.their-reply {
    background: #f5f5f5;
    border-left: 3px solid #9E9E9E;
}

.no-messages {
    text-align: center;
    color: #999;
    padding: 20px;
}

    