@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Medium.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazir-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

* {
    box-sizing: border-box;
}

.chattor-container {
    font-family: 'Vazirmatn', sans-serif !important;
    max-width: 600px;
    width: 100%;
    background-color: #f8f8f8;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: fixed; 
    right: 20px; 
    bottom: 20px; 
    top: auto;
    z-index: 10000;
    direction: rtl;
}
.chattor-history-container{
    position: relative;
}
.chattor-history {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    border-bottom: 1px solid #e1e8ed;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px; /* Set max-height to enable vertical scroll */
    min-height: 250px;
    direction: rtl; /* Ensure the text direction is RTL */
}
.chattor-message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 20px;
    max-width: 75%;
    word-wrap: break-word;
    direction: rtl; /* Ensure the text direction is RTL */
    position: relative;
}
.chattor-message.human {
    align-self: flex-start;
    background-color: #40617A;
    color: white;
    border-bottom-right-radius: 0;
    font-weight: 300;
}
.chattor-message.ai {
    align-self: flex-end;
    background-color: #fff;
    border: 1px solid #f1f1f1;
    color: #333;
    border-bottom-left-radius: 0;
    font-weight: 300;
}
.chattor-message.ads {
    align-self: center;
    background-color: #9e2558de;
    color: #fff;
    border: 1px solid #f1f1f1;
    /*border-bottom-left-radius: 0;*/
    font-weight: 300;
}
.chattor-message.ads a:link,
.chattor-message.ads a:visited,
.chattor-message.ads a:active {
    color: #fff;
    text-decoration: none; /* Optional: Removes the underline */
}
.chattor-message.ads a:hover {
    color: #ffdd57; /* Bright Yellow */
    text-decoration: underline; /* Optional: Adds underline on hover */
}
.chattor-message h3 {
    font-family: 'Vazirmatn', sans-serif !important;
    font-size: 18px;
}
.chattor-message p {
    margin: 0;
}
.chattor-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #F1F1F1;
    border-bottom: 1px solid #F1F1F1;
    background-color: #fff;
}
.chattor-input input {
    flex: 1;
    padding: 10px;
    border: 0 !important;
    box-shadow: none !important;
    margin-right: 10px;
    outline: none;
    direction: rtl; /* Ensure the text direction is RTL */
    font-size: 18px;
    font-family: 'Vazirmatn', sans-serif !important;
}
.chattor-input img {
    padding: 10px 5px;
    cursor: pointer;
    margin-right: 10px;
    width: 30px;
}
#chattor-loading{
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
    background: #00000005;
}
#chattor-loading img{
    width: 60px;
}

.chattor-header{
    display: flex;
    justify-content: space-between;
    padding: 20px 15px;
    border-bottom: 3px solid #EFDCE4;
    background-color: #fff;
}

.chattor-icon-container{
    font-family: 'Vazirmatn', sans-serif !important;
    direction: rtl; /* Ensure the text direction is RTL */
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 10000;
}

.chattor-icon-container img{
    width: 150px;
    height: 150px;
}

.chattor-icon-message {
    width: 200px;
    height: 125px;
    display: flex;
    justify-content: space-between;
    padding: 14px 14px 20px 14px;
    position: absolute;
    right: 40px;
    bottom: 95px;
    background-image: url(../img/icon_message_bg.svg);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.chattor-icon-message img{
    width: 18px;
    height: 18px;
}

.chattor-icon-message p{
    text-align: center;
    margin: 0;
    font-size: 14px;
}

#chattor-get-phone{
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    display: flex;
    align-content: center;
    flex-wrap: wrap;
    justify-content: center;
    background: #000000b3;
    z-index: 10;
}

#chattor-phone-input {
    height: 40px;
    width: 50%;
    direction: rtl;
    padding: 0 10px;
    outline: none;
    border: 0;
    border-radius: 5px;
    font-family: 'Vazirmatn';
    font-size: 14px;
}

.chattor-phone-text{
    width: 80%;
    text-align: center;
    color: #fff;
}

.chattor-button{
    background: #9e2558;
    width: 15%;
    color: #fff;
    font-family: 'Vazirmatn';
    border: 0;
    border-radius: 5px;
    height: 40px;
    margin-right: 10px;
}

.chattor-like-element{
    position: absolute;
    right: -100px;
    bottom: 0;
    display: flex;
    gap: 10px;
}

.chattor-like-image {
    width: 40px;
    cursor: pointer;
}

@media only screen and (max-width: 600px)
{
    .chattor-container {
        border-radius: 8px 0 0 8px;
        right: 0;
        bottom: 0;
        left: 0;
    }

    .chattor-icon-container {
        right: 0;
        bottom: 0;
    }

    #chattor-phone-input {
        width: 70%;
    }
}