.elementor-kit-88{--e-global-color-primary:#6EC1E4;--e-global-color-secondary:#54595F;--e-global-color-text:#7A7A7A;--e-global-color-accent:#61CE70;--e-global-typography-primary-font-family:"Roboto";--e-global-typography-primary-font-weight:600;--e-global-typography-secondary-font-family:"Roboto Slab";--e-global-typography-secondary-font-weight:400;--e-global-typography-text-font-family:"Roboto";--e-global-typography-text-font-weight:400;--e-global-typography-accent-font-family:"Roboto";--e-global-typography-accent-font-weight:500;background-position:center center;background-repeat:no-repeat;background-size:cover;}.elementor-kit-88 e-page-transition{background-color:var( --e-global-color-astglobalcolor0 );}.elementor-kit-88 h1{font-size:3.5vw;}.elementor-kit-88 h2{font-size:1.5vw;}.elementor-kit-88 h3{font-size:1.3vw;}.elementor-kit-88 h4{font-size:1.1vw;}.elementor-kit-88 h5{font-size:1vw;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1200px;}.e-con{--container-max-width:1200px;}.elementor-widget:not(:last-child){margin-block-end:20px;}.elementor-element{--widgets-spacing:20px 20px;--widgets-spacing-row:20px;--widgets-spacing-column:20px;}{}h1.entry-title{display:var(--page-title-display);}.elementor-lightbox{--lightbox-header-icons-size:10px;--lightbox-navigation-icons-size:10px;}@media(min-width:1025px){.elementor-kit-88{background-attachment:fixed;}}@media(max-width:1024px){.elementor-kit-88 h3{font-size:3.5vw;}.elementor-kit-88 h4{font-size:2.9vw;}.elementor-kit-88 h5{font-size:2.4vw;}.elementor-kit-88{background-position:top center;background-repeat:repeat-y;background-size:contain;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:1024px;}.e-con{--container-max-width:1024px;}}@media(max-width:767px){.elementor-kit-88 h2{font-size:6.8vw;}.elementor-kit-88 h3{font-size:5.5vw;}.elementor-kit-88 h4{font-size:5vw;}.elementor-kit-88 h5{font-size:4.5vw;}.elementor-kit-88{background-size:auto;}.elementor-section.elementor-section-boxed > .elementor-container{max-width:767px;}.e-con{--container-max-width:767px;}}/* Start custom CSS *//* برای رفع تداخل، از یک کانتینر مجزا برای چت استفاده می‌کنیم */
.ai-chat-container-wrapper {
    /* تنظیمات برای محصور کردن چت در یک اندازه مشخص */
    width: 100%;
    height: 600px; /* یا یک ارتفاع ثابت دیگر مانند 80vh */
    max-width: 900px; /* حداکثر عرض دلخواه */
    margin: 0 auto; /* برای مرکزیت */
}

/* ------------------ استایل‌های اصلی چت‌بات ------------------ */

#chat-container {
    width: 100%;
    height: 100%; /* ارتفاع از wrapper گرفته می‌شود */
    background: white;
    border: 1px solid #ddd;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 16px;
    border-radius: 18px;
    max-width: 75%;
    word-wrap: break-word;
    font-size: 1em;
    line-height: 1.4;
}

.user-message {
    align-self: flex-end;
    background-color: #d1f2eb;
    color: #000;
    border-top-right-radius: 0;
    text-align: right; /* راست به چپ */
}

.ai-message {
    align-self: flex-start;
    background-color: #2c7aef;
    color: white;
    border-top-left-radius: 0;
    text-align: right; /* راست به چپ */
}

#chat-input {
    display: flex;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    background: #fafafa;
    gap: 10px;
}

#chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    direction: rtl; /* راست به چپ برای ورودی */
    text-align: right; /* راست چین برای ورودی */
}

#chat-input button {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.2s;
}

#chat-input button:hover {
    background: #0056b3;
}

#chat-input button:disabled {
    background: #cccccc;
    cursor: not-allowed;
}

/* انیمیشن Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

p.chat-footer {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin-top: 10px;
}/* End custom CSS */