﻿/*#chatIcon {
    position: fixed;
    bottom: 20px;
    right: 10px;
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    z-index: 9999;
}*/

#chatIcon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #ff6f91;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 9999;
    transition: transform .2s ease, box-shadow .2s ease;
}

    #chatIcon:hover {
        transform: scale(1.08);
        box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }

    #chatIcon img {
        width: 32px;
        height: 32px;
        filter: brightness(0) invert(1); /* سفید کردن آیکون */
    }




/*.chat-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}*/

/*.chat-container {
    width: 95%;
    max-width: 380px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    animation: fadeIn .25s ease;
}*/

.chat-modal {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: auto;
    height: auto;
    background: none;
    display: none;
    z-index: 99999;
}

.chat-container {
    width: 320px;
    max-width: 90vw;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.25);
    animation: slideUp .25s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}




.chat-header {
    background: #ff6f91;
    color: #fff;
    padding: 12px;
    font-size: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.chat-notice {
    padding: 15px;
    background: #fff3f6;
    border-bottom: 1px solid #ffd3e0;
    font-size: 14px;
    text-align: center;
    line-height: 1.7;
}

.chat-notice-small {
    font-size: 12px;
    color: #666;
}

.chat-login-btn {
    margin-top: 10px;
    width: 100%;
    padding: 8px;
    background: #ff6f91;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.chat-form {
    padding: 15px;
}

    .chat-form input {
        width: 100%;
        padding: 8px;
        margin-top: 4px;
        margin-bottom: 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
    }

.chat-start-btn {
    width: 100%;
    padding: 10px;
    background: #ff6f91;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.chat-error {
    color: red;
    margin-bottom: 10px;
    display: none;
}

.chat-box {
    display: none;
    height: 350px;
    padding: 10px;
}

.chat-messages {
    height: 260px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 6px;
    background: #fafafa;
}

.chat-input {
    display: flex;
    margin-top: 10px;
}

    .chat-input input {
        flex: 1;
        padding: 8px;
        border-radius: 6px;
        border: 1px solid #ccc;
    }

    .chat-input button {
        margin-left: 6px;
        padding: 8px 15px;
        background: #ff6f91;
        color: white;
        border: none;
        border-radius: 6px;
    }


.message {
    max-width: 75%;
    padding: 10px 14px;
    margin: 10px 0;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    display: inline-block;
    clear: both;
    position: relative;
}

    /* پیام مشتری (راست) */
    .message.user {
        background: #d9ecff; /* آبی خیلی کمرنگ */
        float: right;
        border-bottom-right-radius: 0;
    }

    /* پیام پشتیبانی (چپ) */
    .message.support {
        background: #ffe0ec; /* صورتی پاستلی کودک‌ناز */
        float: left;
        border-bottom-left-radius: 0;
    }

        /* برچسب کودک ناز بالای پیام پشتیبانی */
        .message.support::before {
            content: "کودک ناز";
            font-size: 11px;
            color: #c2185b;
            position: absolute;
            top: -16px;
            left: 0;
        }

    /* پیام سیستم (وسط) */
    .message.system {
        background: #f0f0f0;
        margin: 10px auto;
        text-align: center;
        border-radius: 8px;
        float: none;
    }


.send-btn {
    background: #4caf50;
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
}




.msg-time {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    text-align: left;
}

.msg-text {
    white-space: pre-wrap;
}

.chat-date-row {
    text-align: center;
    margin: 20px 0 10px 0;
    padding: 6px 14px;
  /*  background: #e5e5e5;*/
    color: #333;
    border-radius: 12px;
    font-size: 13px;
    display: block; /* 🔥 مهم */
    clear: both; /* 🔥 خیلی مهم */
}
