@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
html,body{
    display: grid;
    height: 100%;
    place-items: center;
    background: #efefef;
}

::selection{
    color: #fff;
    background: #007bff;
}

::-webkit-scrollbar{
    width: 3px;
    border-radius: 25px;
}
::-webkit-scrollbar-track{
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb{
    background: #ddd;
}
::-webkit-scrollbar-thumb:hover{
    background: #ccc;
}

.wrapper{
    width: 460px;
    background: #fff;
    border-radius: 5px;
    border: 1px solid lightgrey;
    box-shadow: rgb(0 0 0 / 94%) 0px 18px 36px -18px;
}
.wrapper .title{
    background: #3F51B5;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 60px;
    text-align: center;
    border-bottom: 1px solid #3F51B5;
    border-radius: 5px 5px 0 0;
}
.wrapper .form{
    padding: 20px 15px;
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
}
.wrapper .form .inbox{
    width: 100%;
    display: flex;
    align-items: baseline;
}
.wrapper .form .user-inbox{
    justify-content: flex-end;
    margin: 13px 0;
}
.wrapper .form .inbox .icon{
    height: 40px;
    width: 40px;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    font-size: 15px;

	background-image: url("avatar.png");
	background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}
.wrapper .form .inbox .msg-header{
    max-width: 85%;
    margin-left: 10px;
}
.form .inbox .msg-header p{
    color: #fff;
    background: #007bff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    word-break: break-all;
}
.form .user-inbox .msg-header p{
    color: #333;
    background: #efefef;
}
.wrapper .typing-field{
    display: flex;
    height: 70px;
    width: 100%;
    align-items: center;
    justify-content: space-evenly;
    background: #efefef;
    border-top: 1px solid #d9d9d9;
    border-radius: 0 0 5px 5px;
}
.wrapper .typing-field .input-data{
    height: 60px;
    width: 450px;
    position: relative;
}
.wrapper .typing-field .input-data textarea{
    min-height: 100%;
    max-height: 100%;
    min-width: 100%;
    max-width: 100%;
    outline: none;
    border: 1px solid transparent;
    padding: 0 80px 0 15px;
    border-radius: 3px;
    font-size: 14px;
    background: #fff;
    transition: all 0.3s ease;
}
.typing-field .input-data textarea:focus{
    border-color: rgba(0,123,255,0.8);
}
.input-data textarea::placeholder{
    color: #999999;
    transition: all 0.3s ease;
}
.input-data textarea:focus::placeholder{
    color: #bfbfbf;
}
.wrapper .typing-field .input-data button{
    position: absolute;
    right: 5px;
    top: 50%;
    height: 40px;
    width: 65px;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    outline: none;
    opacity: 0;
    pointer-events: none;
    border-radius: 3px;
    background: #009688;
    border: 1px solid #009688;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}
.wrapper .typing-field .input-data textarea:valid ~ button{
    opacity: 1;
    pointer-events: auto;
}
.typing-field .input-data button:hover{
    background: #607D8B;
}

/* Chat Widget Styles */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

.chat-toggle {
    background: #2196F3;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.chat-toggle:hover {
    transform: scale(1.1);
    background: #1976D2;
}

.chat-toggle i {
    color: white;
    font-size: 24px;
}

.chat-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    transition: opacity 0.3s ease;
}

.chat-tooltip.hidden {
    opacity: 0;
}

.chat-tooltip:after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    transform: translateY(-50%);
    border-left: 6px solid #333;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.2);
    overflow: hidden;
}

.chat-header {
    background: #2196F3;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.chat-header .title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
}

.chat-header .title i {
    font-size: 20px;
}

.chat-controls button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
}

.chat-controls button:hover {
    opacity: 0.8;
}

.chat-body {
    height: 400px;
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.inbox {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.user-inbox {
    justify-content: flex-end;
}

.bot-inbox .icon {
    width: 35px;
    height: 35px;
    background: #2196F3;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.bot-inbox .icon i {
    color: white;
    font-size: 16px;
}

.msg-header {
    max-width: 70%;
    background: #f0f0f0;
    padding: 10px 15px;
    border-radius: 15px;
}

.user-inbox .msg-header {
    background: #2196F3;
    color: white;
}

.msg-header p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-line;
    word-break: break-word;
}

.msg-header p a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.msg-header p a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.bot-inbox .msg-header {
    background: #007bff;
}

.bot-inbox .msg-header p a {
    color: #ffffff;
}

.typing-field {
    padding: 15px;
    border-top: 1px solid #ddd;
}

.input-data {
    display: flex;
    gap: 10px;
}

.input-data textarea {
    flex: 1;
    height: 40px;
    resize: none;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    line-height: 20px;
}

.input-data button {
    background: #2196F3;
    border: none;
    padding: 0 15px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.input-data button:hover {
    background: #1976D2;
}

/* Scrollbar Styles */
.messages::-webkit-scrollbar {
    width: 6px;
}

.messages::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.messages::-webkit-scrollbar-thumb:hover {
    background: #999;
}