﻿/* =========================================================
   CHAT BOX - COMPLETE CSS
========================================================= */

.chat-box,
.chat-box * {
    box-sizing: border-box;
}


/* =========================================================
   MAIN CHAT BOX
========================================================= */

.chat-box {
    position: fixed;
    right: 25px;
    bottom: 25px;
    width: 370px;
    height: 560px;
    max-width: calc(100vw - 30px);
    max-height: calc(100vh - 30px);
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.16), 0 4px 15px rgba(0, 0, 0, 0.08);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    direction: rtl;
    font-family: inherit;
    transition: width 0.09s ease, height 0.09s ease, border-radius 0.09s ease, box-shadow 0.09s ease;
}


/* =========================================================
   HEADER
========================================================= */

.chat-header {
    width: 100%;
    min-height: 72px;
    padding: 12px 15px;
    background: #1eada8;
    color: #ffffff;
    display: flex;
    align-items: center;
    direction: rtl;
    flex-shrink: 0;
}


/* =========================================================
   PROFILE IMAGE
========================================================= */

.chat-profile {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.8);
    display: block;
}


/* =========================================================
   CHAT INFO
========================================================= */

.chat-info {
    flex: 1;
    min-width: 0;
    margin-right: 11px;
    text-align: right;
}

.chat-title {
    margin: 0 0 3px 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
}

.chat-status {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.85);
}


    /* =========================================================
   ONLINE DOT
========================================================= */

    .chat-status::before {
        content: "";
        display: inline-block;
        width: 7px;
        height: 7px;
        margin-left: 5px;
        border-radius: 50%;
        background: #5cff8d;
    }


/* =========================================================
   MINIMIZE BUTTON
========================================================= */

.chat-minimize {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    outline: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .chat-minimize:hover {
        background: rgba(255, 255, 255, 0.22);
        transform: scale(1.06);
    }

    .chat-minimize:active {
        transform: scale(0.94);
    }


/* =========================================================
   MESSAGES
========================================================= */

.chat-messages {
    flex: 1;
    min-height: 0;
    width: 100%;
    padding: 18px 15px;
    background: #f7f8fa;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    direction: rtl;
}


    /* Scrollbar */

    .chat-messages::-webkit-scrollbar {
        width: 5px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: transparent;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #d3d7df;
        border-radius: 10px;
    }

.chat-messages {
    scrollbar-width: thin;
    scrollbar-color: #d3d7df transparent;
}


/* =========================================================
   MESSAGE
========================================================= */

.chat-message {
    width: fit-content;
    max-width: 82%;
    padding: 11px 14px;
    border-radius: 10px 10px 10px 4px;
    background: #ffffff;
    color: #30343b;
    font-size: 14px;
    line-height: 1.8;
    text-align: right;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    word-break: break-word;
    direction: rtl;
    align-self: flex-start;
    margin-right: auto;
    margin-left: 0;
}


    /* =========================================================
   USER MESSAGE
========================================================= */

    .chat-message.user {
        align-self: flex-start;
        margin-left: auto;
        margin-right: 0;
        background: #1eada8;
        color: #ffffff;
        border-radius: 10px 10px 4px 10px;
        text-align: right;
    }


/* =========================================================
   FOOTER
========================================================= */

.chat-footer {
    width: 100%;
    min-height: 68px;
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #eeeeee;
    display: flex;
    align-items: center;
    gap: 8px;
    direction: rtl;
    flex-shrink: 0;
}


/* =========================================================
   INPUT
========================================================= */

.chat-input {
    flex: 1;
    width: 100%;
    height: 44px;
    min-width: 0;
    padding: 0 13px;
    border: 1px solid #e1e4e9;
    border-radius: 11px;
    background: #f8f9fb;
    color: #333333;
    outline: none;
    font-size: 13px;
    direction: rtl;
    text-align: right;
 
}

    .chat-input::placeholder {
        color: #9ca3af;
        opacity: 1;
    }

    .chat-input:focus {
        background: #ffffff;
        border-color: #1eada8;
        box-shadow: 0 0 0 3px rgba(49, 87, 255, 0.08);
    }


/* =========================================================
   SEND BUTTON
========================================================= */

.chat-send {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border: none;
    outline: none;
    border-radius: 11px;
    background: #1eada8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

    .chat-send:hover {
        background: #2447e8;
        transform: translateY(-1px);
        box-shadow: 0 5px 14px rgba(49, 87, 255, 0.25);
    }

    .chat-send:active {
        transform: scale(0.94);
    }


/* =========================================================
   MINI CHAT ICON
========================================================= */

.chat-mini-icon {
    display: none;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #1eada8;
    color: #ffffff;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(49, 87, 255, 0.28);
    transition: transform 0.2s ease;
}


    /* =========================================================
   PULSE RINGS
========================================================= */

    .chat-mini-icon::before,
    .chat-mini-icon::after {
        content: "";
        position: absolute;
        width: 100%;
        height: 100%;
        border-radius: 50%;
        border: 2px solid #dd8b45;
        left: 0;
        top: 0;
        pointer-events: none;
        animation: chatPulse 2s infinite;
    }

    .chat-mini-icon::after {
        animation-delay: 1s;
    }


/* =========================================================
   PULSE ANIMATION
========================================================= */

@keyframes chatPulse {

    0% {
        transform: scale(1);
        opacity: 0.65;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}


/* =========================================================
   MINI ICON HOVER
========================================================= */

.chat-mini-icon:hover {
    transform: scale(1.08);
}


/* =========================================================
   MINIMIZED STATE
========================================================= */

.chat-box.minimized {
    width: 58px;
    height: 58px;
    min-width: 58px;
    min-height: 58px;
    max-width: 58px;
    max-height: 58px;
    padding: 0;
    border-radius: 50%;
    overflow: visible;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
}


    /* =========================================================
   MINIMIZED HEADER
========================================================= */

    .chat-box.minimized .chat-header {
        width: 58px;
        height: 58px;
        min-height: 58px;
        padding: 0;
        border-radius: 50%;
        background: transparent;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }


    /* =========================================================
   HIDE EVERYTHING IN MINIMIZED
========================================================= */

    .chat-box.minimized .chat-profile,
    .chat-box.minimized .chat-info,
    .chat-box.minimized .chat-minimize,
    .chat-box.minimized .chat-messages,
    .chat-box.minimized .chat-footer {
        display: none;
    }


    /* =========================================================
   SHOW MINI ICON
========================================================= */

    .chat-box.minimized .chat-mini-icon {
        display: flex;
    }


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .chat-box {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        height: min(560px, calc(100vh - 24px));
        max-width: none;
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

        .chat-box.minimized {
            width: 58px;
            height: 58px;
            min-width: 58px;
            min-height: 58px;
            right: 15px;
            bottom: 15px;
        }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 380px) {

    .chat-box {
        right: 8px;
        bottom: 8px;
        width: calc(100vw - 16px);
        height: calc(100vh - 16px);
        border-radius: 16px;
    }

    .chat-header {
        min-height: 65px;
    }

    .chat-profile {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }

    .chat-title {
        font-size: 14px;
    }

    .chat-message {
        font-size: 13px;
    }
}


/* =========================================================
   RTL / INPUT HELPERS
========================================================= */

.chat-box .drtl {
    direction: rtl;
}

.chat-box .textright {
    text-align: right;
}


/* =========================================================
   SAFETY / VISIBILITY
========================================================= */

.chat-box img {
    max-width: none;
}

.chat-box button,
.chat-box input {
    font-family: inherit;
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .chat-box,
    .chat-mini-icon,
    .chat-minimize,
    .chat-send {
        transition: none;
    }

        .chat-mini-icon::before,
        .chat-mini-icon::after {
            animation: none;
        }
}




.itc { display : none}


 