:root {
    --parschat-theme-color: #0672e6;
    --parschat-theme-color-dark: #044A86;
    --parschat-chat-width: clamp(380px, 25vw, 390px);
    --parschat-chat-height: clamp(590px, 70vh, 700px);
    --parschat-font-family: 'Vazir', sans-serif; /* فونت وزیر */
    --parschat-border-radius: 12px;
    --parschat-box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    --parschat-transition: all 0.3s ease;
    --parschat-animation-duration: 0.3s;
    --parschat-gradient: linear-gradient(90deg, var(--parschat-theme-color), var(--parschat-theme-color-dark)) !important;
}

.parschat-icon, .parschat-container {
    display: none;
}

/* Chat Icon */
.parschat-icon {
    position: fixed;
    z-index: 999999;
    cursor: pointer;
    transition: var(--parschat-transition);
    transform: scale(1);
}

/* موقعیت‌های مختلف آیکون */
.parschat-icon[style*="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.parschat-icon[style*="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.parschat-icon[style*="top-right"] {
    top: 20px;
    right: 20px;
}

.parschat-icon[style*="top-left"] {
    top: 20px;
    left: 20px;
}

.parschat-icon:hover {
    transform: scale(1.1) rotate(10deg);
}

.parschat-icon img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: var(--parschat-box-shadow);
    transition: var(--parschat-transition);
}

.parschat-welcome-popup {
    position: absolute;
    bottom: 120%;
    background: white;
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    color: #333;
    font-family: 'Vazir', sans-serif;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    text-align: right;
    max-width: 150px;
    white-space: normal;
    word-wrap: break-word;
    z-index: 9999999;
    display: inline-block;
    padding-right: 17px;
}

/* برای آیکون در سمت راست صفحه */
.parschat-icon[style*="right"] .parschat-welcome-popup {
    left: -140px;
    margin-left: 20px;
}

/* برای آیکون در سمت چپ صفحه */
.parschat-icon[style*="left"] .parschat-welcome-popup {
    right: -140px;
    margin-right: 20px;
}


.parschat-welcome-popup span {
    display: inline-block;
    margin-left: 5px; /* فاصله بین کلمات */
}

/* استایل آیکون و پاپ‌آپ خوش‌آمدگویی هنگام کلیک */
.parschat-icon.hide-welcome .parschat-welcome-popup {
    opacity: 0;
    visibility: hidden;
}

/* Chat Container */
.parschat-container {
    position: fixed;
    width: var(--parschat-chat-width);
    height: var(--parschat-chat-height);
    background: #ffffff;
    border-radius: var(--parschat-border-radius);
    box-shadow: var(--parschat-box-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--parschat-transition), opacity var(--parschat-transition);
    font-family: var(--parschat-font-family);
}

/* موقعیت‌های مختلف کانتینر چت بات */
.parschat-container[style*="bottom-right"] {
    bottom: 20px;
    right: 20px;
}

.parschat-container[style*="bottom-left"] {
    bottom: 20px;
    left: 20px;
}

.parschat-container[style*="top-right"] {
    top: 20px;
    right: 20px;
}

.parschat-container[style*="top-left"] {
    top: 20px;
    left: 20px;
}


.parschat-header .header-actions {
    display: flex;
    gap: 10px;
    align-items: center; 
    transform: scale(0.90);
}

.parschat-header .parschat-new-chat,
.parschat-header .parschat-close {
    all: unset;
    background: none;
    border: none;
    width: 35px; /* اندازه بزرگ‌تر */
    height: 35px; /* اندازه بزرگ‌تر */
    border-radius: 50%; /* دایره‌ای بودن همیشگی */
    cursor: pointer;
    color: white !important;
    transition: background 0.3s ease !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px; 
    box-sizing: border-box;
    box-shadow: none;
}


/* حالت هاور */
.parschat-header .parschat-new-chat:hover,
.parschat-header .parschat-close:hover {
    background: rgba(3 3 3 / 20%)
}

.parschat-header .parschat-new-chat svg {
    width: 24px; /* اندازه هماهنگ با دکمه بزرگ‌تر */
    height: 24px; /* اندازه هماهنگ با دکمه بزرگ‌تر */
    stroke: white; /* رنگ خطوط سفید */
    fill: none;
    margin-left: 3px;
    margin-top: 3px;
    padding-left: 1px;
    margin-right: -1px;
}


.parschat-header .parschat-close svg {
    width: 24px; /* اندازه هماهنگ با دکمه بزرگ‌تر */
    height: 24px; /* اندازه هماهنگ با دکمه بزرگ‌تر */
    stroke: white; /* رنگ خطوط سفید */
    fill: none;
}

.parschat-new-chat {
    transform: rotate(0deg) !important; 
}

.parschat-container.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Chat Header */
.parschat-header {
    background: var(--parschat-gradient);
    padding: 12px 20px; /* کاهش فاصله بالا و پایین */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    border-top-left-radius: var(--parschat-border-radius);
    border-top-right-radius: var(--parschat-border-radius);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.parschat-header .header-content {
    display: flex;
    align-items: center; 
    gap: 10px;
}

.parschat-header .header-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    margin-right: 10px;
}

/* استایل عنوان چت */
.parschat-header h3 {
    margin: 0;
    font-size: 15px;
        color: white !important;
    font-weight: 600;
    font-family: var(--parschat-font-family);
    line-height: 1.2;
    margin: 4px 0 2px 0;
}

/* استایل توضیحات چت */
.parschat-header small {
    display: block;
    font-size: 11px;
    color: #e0e0e0;
    line-height: 1.4;
    margin-top: 2px;
    font-family: var(--parschat-font-family);
}

/* حالت‌هایی که توضیحات خالی است */
.parschat-header small:empty {
    display: none; /* مخفی کردن توضیحات اگر خالی باشد */
}

/* تنظیم موقعیت آواتار ربات و عنوان در حالت‌هایی که توضیحات خالی است */
.parschat-header .header-text:has(small:empty) {
    justify-content: center; /* وسط‌چین عمودی */
    align-items: center; /* وسط‌چین افقی */
}

/* استایل آواتار ربات و نشانگر وضعیت */
.bot-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 0; /* فاصله از بالا حذف شده */
}

/* استایل آیکون هدر */
.bot-avatar img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.bot-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: var(--parschat-theme-color);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 0px solid white; /* دایره سفید دور آواتار */
}

.status-indicator {
    position: absolute;
    top: 18px;
    left: -3px; /* تنظیم موقعیت نشانگر سبز */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #4caf50; /* سبز برای آنلاین */
    border: 2px solid white; /* دایره سفید دور نشانگر */
    z-index: 1;
	box-sizing: border-box;
}


/* Chat Messages Area */
.parschat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    scrollbar-width: thin;
    scrollbar-color: #ddd transparent;
    background-image: url(../images/bg-chat.png);
    background-repeat: repeat;
    background-size: auto;
    background-position: center;
}

.parschat-messages::-webkit-scrollbar {
    width: 6px;
}

.parschat-messages::-webkit-scrollbar-track {
    background: transparent;
}

.parschat-messages::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 3px;
}

/* Messages */
.message {
    max-width: 76%;
    padding: 12px 16px;
    border-radius: var(--parschat-border-radius);
    font-size: 13px;
    line-height: 1.5;
    word-wrap: break-word;
    position: relative;
    animation: fadeIn var(--parschat-animation-duration) ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
    transition: transform var(--parschat-transition), opacity var(--parschat-transition);
    white-space: pre-wrap; /* اضافه شده برای نمایش صحیح HTML */
}

.user-message, .bot-message {
    white-space: pre-wrap; /* اضافه شده برای نمایش صحیح HTML */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* پیام کاربر (سمت راست) */
.user-message {
    background: var(--parschat-gradient);
    color: white;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-right: auto;
    width: fit-content;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-right: 19px;
}

/* پیام هوش مصنوعی (سمت راست) */
.bot-message {
    background: #f0f2f5;
    color: #1a1a1a;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    border-bottom-left-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: auto;
    width: fit-content;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-right: 40px;
    white-space: normal;
    display: inline-block;
    position: relative; /* برای قرار دادن آیکون ربات */
}



.bot-emoji {
    position: absolute;
    bottom: 0px; /* خارج از کادر پیام */
    right: -40px; /* فاصله از سمت راست پیام */
    font-size: 16px; /* اندازه ایموجی */
    z-index: 1; /* بالاتر از پیام */
    background: var(--parschat-theme-color); /* پس‌زمینه متناسب با رنگ تم */
    color: white; /* رنگ متن سفید برای تضاد */
    border-radius: 50%; /* دایره‌ای شکل */
    padding: 5px; /* فاصله داخلی */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* سایه */
    width: 30px; /* عرض ثابت */
    height: 30px; /* ارتفاع ثابت */
	box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* استایل جدید برای آیکون SVG */
.bot-emoji svg {
    width: 35px; /* اندازه آیکون */
    height: 35px; /* اندازه آیکون */
    fill: white; /* رنگ آیکون */
}


/* استایل زمان ارسال پیام و آیکون کپی */
.message-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
    margin-right: 40px;
    position: relative;
}

/* زمان ارسال پیام */
.message-timestamp {
    font-size: 10px;
    color: #999;
    order: 2;
}

.user-message-timestamp {
    display: block;
    font-size: 10px;
    color: #999;
    position: absolute; /* موقعیت مطلق برای کنترل دقیق */
    left: 0; /* از لبه چپ شروع می‌شه */
    margin-left: 12px;
    margin-top: 10px;
    text-align: left; /* تراز از چپ */
}

.user-message .message-footer {
    justify-content: flex-start; /* از چپ شروع می‌شه */
    margin-left: 0; /* فاصله اضافی حذف می‌شه، چون در user-message-timestamp تنظیم می‌کنیم */
    margin-right: 0;
}

.bot-message .message-timestamp {
    display: block;
    font-size: 10px;
    color: #999;
    order: 2; /* زمان بعد از دکمه‌ها، سمت راست */
}

/* آیکون کپی */
.like-button,
.dislike-button,
.copy-icon {
    width: 13px;
    height: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 3px;
    margin-right: 3px;
}

.like-button:hover,
.dislike-button:hover,
.copy-icon:hover {
    transform: scale(1.1); /* بزرگ‌تر شدن هنگام هاور */
}

.like-button svg,
.dislike-button svg,
.copy-icon svg {
    width: 90%;
    height: 100%;
    fill: rgb(117, 117, 117); /* رنگ خاکستری */
    margin-bottom: 5px;
    opacity: 1;
    transition: fill 0.2s ease; /* افزودن transition برای fill */
}

/* حالت فعال (کلیک شده) */
.like-button.active svg {
    fill: #4CAF50; /* سبز */
}

.dislike-button.active svg {
    fill: #F44336; /* قرمز */
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    padding: 10px;
    background: #f0f2f5;
    border-radius: 12px;
    width: fit-content;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    margin-left: auto;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background-color: var(--parschat-theme-color);
    border-radius: 50%;
    animation: typing 1.2s infinite;
    transform: scale(0.8);
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.parschat-input {
    border-top: 1px solid #eee;
    padding: 15px;
    background: #fff;
    border-bottom-left-radius: var(--parschat-border-radius);
    border-bottom-right-radius: var(--parschat-border-radius);
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
    position: relative;
    pointer-events: auto;
	z-index: 999999;
}

/* استایل سوالات متداول */
.parschat-faq {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #ffffff;
    border-bottom: 1px solid #eee;
    overflow-x: auto; /* اسکرول افقی */
    white-space: nowrap; /* جلوگیری از شکستن خط */
    scrollbar-width: thin; /* اسکرول بار نازک */
    scrollbar-color: #ddd transparent;
    background-image: url(../images/bg-chat.png);
    background-repeat: repeat;
    background-color: rgba(255, 255, 255, 0.8);
}

.parschat-faq::-webkit-scrollbar {
    height: 6px; /* ارتفاع اسکرول بار */
}

.parschat-faq::-webkit-scrollbar-track {
    background: transparent; /* پس‌زمینه اسکرول بار */
}

.parschat-faq::-webkit-scrollbar-thumb {
    background-color: #ddd; /* رنگ اسکرول بار */
    border-radius: 3px; /* گردی اسکرول بار */
}

.faq-item {
    background: #fff; /* بک‌گراند سفید */
    color: #333; /* رنگ متن */
    padding: 8px 12px;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 10px; /* فونت کوچک‌تر */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd; /* حاشیه خاکستری */
    flex: 0 0 auto; /* جلوگیری از تغییر اندازه */
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}


.input-container {
    display: flex;
    align-items: center;
    width: 85%;
    position: relative;
}

.input-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.emoji-icon {
    position: absolute;
    left: 12px; /* فاصله از سمت چپ */
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 1;
    display: flex;
    align-items: center;
}

.emoji-icon svg {
    width: 18px;
    height: 18px;
    stroke: #817d7d;
    transition: stroke 0.4s ease;
}

.emoji-icon:hover svg {
    stroke: #000; /* سیاه */
}

#parschat-message-input {
    padding-left: 40px; /* فضای کافی برای آیکون در سمت چپ */
    width: 100%;
    box-sizing: border-box;
}

.emoji-picker {
    position: absolute;
    bottom: 50px; /* نمایش بالای کادر ورودی */
    left: 10px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.emoji-picker .emoji {
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji-picker .emoji:hover {
    transform: scale(1.2);
}

#parschat-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

#parschat-message-input {
    flex: 1;
    min-height: 44px;
    max-height: 120px;
    padding: 12px 12px 12px 40px; /* padding-left برای فاصله از آیکون ایموجی */
    border: 1px solid #ddd;
    border-radius: 12px;
    resize: none;
    font-family: var(--parschat-font-family);
    font-size: 12px;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f9f9f9;
    overflow-y: hidden;
    width: 100%;
    pointer-events: auto;
    user-select: text;
}

#parschat-message-input:focus {
    border-color: var(--parschat-theme-color);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#parschat-form button[type="submit"] {
    width: 44px;
    height: 44px;
    background: var(--parschat-gradient);
    color: white;
    border: none;
    border-radius: 50%;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#parschat-form button[type="submit"]:hover {
    background: var(--parschat-theme-color-dark);
    transform: scale(1.05) rotate(1deg);
}

#parschat-form button[type="submit"] svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.2s;
    margin: 0 auto;
}

#parschat-form button[type="submit"]:hover svg {
    transform: rotate(90deg);
}


/* استایل فرم لید جنریشن - نسخه ظریف‌تر و جمع‌وجور */
.parschat-lead-form-container {
    padding: 25px; /* کاهش پدینگ کانتینر */
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Vazir', sans-serif;
    direction: rtl;
}

.parschat-lead-form-container .lead-form-wrapper {
    width: 100%;
    max-width: 300px;
    padding: 20px 20px 10px 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.07); 
}

.parschat-lead-form-container .lead-form-title {
    font-size: 15px; /* کاهش اندازه فونت عنوان */
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    margin: 0 0 20px 0; /* کاهش فاصله پایین */
    letter-spacing: 0.2px;
    line-height: 1.3;
}

/* ریست استایل‌های عمومی برای ورودی‌ها */
.parschat-lead-form-container .lead-field input[type="text"],
.parschat-lead-form-container .lead-field input[type="email"],
.parschat-lead-form-container .lead-field input[type="tel"] {
    all: unset;
    box-sizing: border-box;
}

/* استایل فیلدهای ورودی */
.parschat-lead-form-container .lead-field {
    margin-bottom: 15px; /* فاصله کمتر بین فیلدها */
}

.parschat-lead-form-container .lead-field label {
    font-size: 12px; /* فونت کوچکتر برای ظرافت */
    color: #34495e;
    margin-bottom: 5px;
    display: block;
    font-weight: 500;
}

.parschat-lead-form-container .lead-field label .required {
    color: #e74c3c;
}

.parschat-lead-form-container .lead-field input[type="text"],
.parschat-lead-form-container .lead-field input[type="email"],
.parschat-lead-form-container .lead-field input[type="tel"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 12px; 
    font-family: 'Vazir', sans-serif;
    background: #fff;
    color: #2c3e50;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04); 
    text-align: right;
}

.parschat-lead-form-container .lead-field input[type="text"]:focus,
.parschat-lead-form-container .lead-field input[type="email"]:focus,
.parschat-lead-form-container .lead-field input[type="tel"]:focus {
    border-color: var(--parschat-theme-color);
    box-shadow: 0 0 5px rgba(var(--parschat-theme-color-rgb, 0, 123, 255), 0.2);
    background: #fff;
    outline: none;
}

.parschat-lead-form-container .lead-field input[type="text"]::placeholder,
.parschat-lead-form-container .lead-field input[type="email"]::placeholder,
.parschat-lead-form-container .lead-field input[type="tel"]::placeholder {
    color: #95a5a6;
    opacity: 0.9;
}

/* استایل دکمه ثبت */
.parschat-lead-form-container #parschat-lead-form button.lead-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px; /* کاهش پدینگ دکمه */
    background: var(--parschat-gradient);
    color: #fff;
    border: none;
    border-radius: 6px; /* گوشه‌های کوچکتر */
    font-size: 13px; /* فونت کوچکتر */
    font-family: 'Vazir', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); 
}

.parschat-lead-form-container #parschat-lead-form button.lead-submit-btn:hover {
    box-shadow: 0 2px 8px rgb(0 0 0 / 30%)
}

.parschat-lead-form-container #parschat-lead-form button.lead-submit-btn:active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* پیام بعد از ارسال */
.parschat-lead-form-container .lead-form-message {
    font-size: 11px;
    text-align: center;
    margin-top: 12px;
    color: #27ae60; /* رنگ پیش‌فرض سبز برای موفقیت */
    min-height: 20px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.parschat-lead-form-container .lead-form-message.show {
    opacity: 1;
    transform: translateY(0);
}

/* تنظیمات ریسپانسیو برای موبایل */
@media (max-width: 768px) {
    .parschat-lead-form-container .lead-form-wrapper {
        max-width: 280px; /* عرض کمتر در موبایل */
        padding: 18px;
    }
    .parschat-lead-form-container .lead-form-title {
        font-size: 15px;
    }
    .parschat-lead-form-container .lead-field input[type="text"],
    .parschat-lead-form-container .lead-field input[type="email"],
    .parschat-lead-form-container .lead-field input[type="tel"] {
        font-size: 11px;
        padding: 7px 10px;
    }
    .parschat-lead-form-container #parschat-lead-form button.lead-submit-btn {
        font-size: 12px;
        padding: 9px;
    }
}
/* Responsive Design */
@media (max-width: 768px) {
    .parschat-container {
        width: clamp(300px, 90vw, 400px) !important;
        height: clamp(80vh, 90vh, 600px) !important;
        bottom: 10px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) translateY(100%) !important;
    }

    .parschat-container.open {
        transform: translateX(-50%) translateY(0) !important;
    }

    .parschat-header h3 {
        font-size: 14px; /* کاهش اندازه فونت برای موبایل */
    }

    .bot-avatar {
        width: 28px; /* افزایش عرض */
        height: 28px; /* افزایش ارتفاع */
        font-size: 16px; /* افزایش اندازه فونت */
    }

    .status-indicator {
        width: 10px; /* افزایش عرض */
        height: 10px; /* افزایش ارتفاع */
        top: 18px; /* تنظیم موقعیت عمودی */
        left: -1px; /* تنظیم موقعیت افقی */
		box-sizing: border-box;
    }



    .parschat-icon img {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 320px) {
    .parschat-container {
        width: 95% !important;
        height: 85vh !important;
    }
}

@media (max-width: 768px) {
    .bot-emoji {
        width: 25px; /* عرض کوچک‌تر برای موبایل */
        height: 25px; /* ارتفاع کوچک‌تر برای موبایل */
        font-size: 14px; /* اندازه ایموجی کوچک‌تر */
        padding: 4px; /* فاصله داخلی کمتر */
        right: -38px; /* فاصله کمتر از سمت راست */
		box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    /* تنظیم اندازه دکمه‌ها */
    .bot-message {
        margin-right: 30px;
    }
}

@media (max-width: 768px) {
    .parschat-header .parschat-close {
        font-size: 18px;
        margin-bottom: 0px;
    }
}

/* استایل‌های مربوط به نمایش در موبایل */
@media (max-width: 768px) {
    /* مخفی کردن آیکون و کانتینر اگر نمایش در موبایل غیرفعال باشد */
    .parschat-icon.mobile-disabled,
    .parschat-container.mobile-disabled {
        display: none !important;
    }

    /* فقط تغییر اندازه آیکون در موبایل */
    .parschat-icon {
        width: 40px;
        height: 40px;
    }

    /* موقعیت‌های مختلف آیکون در موبایل - با اولویت بیشتر */
    .parschat-icon[style*="bottom-right"] {
        bottom: 10px !important;
        right: 10px !important;
    }

    .parschat-icon[style*="bottom-left"] {
        bottom: 10px !important;
        left: 10px !important;
    }

    .parschat-icon[style*="top-right"] {
        top: 10px !important;
        right: 10px !important;
    }

    .parschat-icon[style*="top-left"] {
        top: 10px !important;
        left: 10px !important;
    }
}
