/* دکمه شناور */
#fcb-chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #0073aa, #32ade6);
    color: #fff;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    transition: all 0.3s ease;
}

#fcb-chat-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 115, 170, 0.4);
}

/* باکس چت - حالت دسکتاپ/تبلت */
#fcb-chat-box {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 400px;
    height: 500px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

#fcb-chat-box.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* هدر */
.fcb-header {
    background: linear-gradient(135deg, #0073aa, #32ade6);
    color: #fff;
    padding: 16px 20px;
    font-size: 16px;
    font-weight: 600;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fcb-header .title {
    display: flex;
}

.fcb-header .title-name {
    font-size: 16px;
    font-weight: 700;
}

.fcb-header .title-text {
    font-size: 12px;
    opacity: 0.9;
    margin-top: 2px;
}

.fcb-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none !important;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
	padding: 0px !important;
}

.fcb-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* پیام‌ها */
.fcb-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    background-color: #f7f9fb;
    display: flex;
    flex-direction: column;
}

/* زمان آخرین پیام */
.fcb-time {
    text-align: center;
    color: #666;
    font-size: 11px;
    margin: 8px 0;
    opacity: 0.7;
}

/* پیام */
.fcb-message {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    max-width: 80%;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* پیام کاربر */
.fcb-user {
    align-self: flex-end;
    text-align: right;
    color: #0073aa;
    background: #e6f3fb;
    padding: 10px 14px;
    border-radius: 14px 14px 0 14px;
    border: 1px solid rgba(0, 115, 170, 0.1);
}

/* پیام بات */
.fcb-bot {
    align-self: flex-start;
    text-align: left;
    color: #333;
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 14px 14px 14px 0;
    border: 1px solid #e1e5ea;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* input همیشه پایین */
.fcb-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px;
    background: #ffffff;
    border-top: 1px solid #e1e5ea;
    flex-shrink: 0;
}

/* input سوال */
.fcb-input input {
    flex: 1;
    padding: 12px 16px !important;
    border: 1px solid #ccd6dd !important;
    border-radius: 24px !important;
    font-size: 14px;
    outline: none;
    background: #f5f9fc !important;
    transition: all 0.2s ease;
}

.fcb-input input:focus {
    border-color: #32ade6 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(50, 173, 230, 0.1);
}

/* دکمه ارسال */
.fcb-input button {
    background: linear-gradient(135deg, #32ade6, #0073aa);
    color: #fff;
    border: none;
    padding: 12px 20px !important;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.fcb-input button:hover {
    background: linear-gradient(135deg, #2596c8, #006699);
    transform: translateY(-1px);
}

/* حالت موبایل - تمام صفحه */
@media (max-width: 768px) {
    #fcb-chat-box {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
        margin: 0;
        z-index: 10000;
        transform: translateY(100%);
        transition: transform 0.4s ease;
    }

    #fcb-chat-box.active {
        transform: translateY(0);
    }

    .fcb-header {
        padding: 18px 20px;
        border-radius: 0;
    }

    .fcb-messages {
        padding: 20px;
        flex: 1;
    }

    .fcb-message {
        max-width: 85%;
    }

    #fcb-chat-button.mobile-hidden {
        display: none;
    }

    body.chat-open {
        overflow: hidden;
    }
}

/* حالت تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    #fcb-chat-box {
        width: 350px;
        height: 450px;
        bottom: 80px;
        right: 20px;
    }
}

/* حالت دسکتاپ کوچک */
@media (min-width: 1025px) and (max-width: 1366px) {
    #fcb-chat-box {
        width: 380px;
        height: 500px;
    }
}

/* حالت دسکتاپ بزرگ */
@media (min-width: 1367px) {
    #fcb-chat-box {
        width: 420px;
        height: 550px;
    }
}

/* اسکرول بار سفارشی */
.fcb-messages::-webkit-scrollbar {
    width: 6px;
}

.fcb-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.fcb-messages::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.fcb-messages::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}






/* استایل برای لوگو */
.fcb-logo-wrapper {
    display: flex;
    align-items: center;
}

.fcb-logo {
    width: 60px;
    object-fit: contain; 
}

/* تنظیمات جدید برای title */
.title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.title-name {
    font-size: 16px;
    font-weight: 700;
    flex: 1;
}

/* حالت موبایل */
@media (max-width: 768px) {
    
    .title {
        gap: 14px;
    }
    
    .title-name {
        font-size: 15px;
    }
}

/* حالت تبلت */
@media (min-width: 769px) and (max-width: 1024px) {
    .title {
        gap: 10px;
    }
}