body{
    font-family:tahoma;
}

.chat-shell{
    width:100%;
    max-width:85%;
    height:90vh;
    margin:auto;
    border-radius:14px;
    display:flex;
    flex-direction:column;
    background:#f7f7f8;
}

.chat-body{
    background-color:lightgray;
    flex:1;
    overflow-y:auto;
    padding:20px;
}

/* ✅ فاصله بیشتر بین پیام‌ها */
.row{
    display:flex;
    margin-bottom:28px;
}

.row.user{
    justify-content:flex-end;
    margin:10px 0 !important;
}
.ai{
    margin:10px 0 !important;
}

.avatar{
    margin-left:10px;
    width:35px;
    /*height:35px;*/
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#fff;
    font-size:50px;
}

.bubble{
    max-width:75%;
    padding:14px;
    border-radius:14px;
    position:relative;
    font-size:14px;
    line-height:1.8;
}

.ai-bubble{
    background:#fff;
    border:1px solid #e5e5e5;
}

.user-bubble{
    background: rgba(220, 248, 198, 0.52);
}

/* ✅ دکمه کپی */
.copy-msg-btn{
    top:auto;
    background:none;
    font-size:14px;
    position:absolute;
    margin-top:10px;
    bottom:6px;
    left:8px;
    background:transparent;
    border:none;
    cursor:pointer;
    opacity:0.5;
    transition:0.2s;
}

.user-bubble .copy-msg-btn{
    left:8px;
    right:auto;
}

.copy-msg-btn:hover{
    opacity:1;
}

/* ✅ سه نقطه لودینگ */
.loading-dots{
    display:flex;
    gap:5px;
    align-items:center;
}

.loading-dots span{
    width:7px;
    height:7px;
    background:#999;
    border-radius:50%;
    animation:bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1){animation-delay:-0.32s;}
.loading-dots span:nth-child(2){animation-delay:-0.16s;}

@keyframes bounce{
    0%,80%,100%{transform:scale(0);}
    40%{transform:scale(1);}
}

.chat-input{
    border-top:1px solid #ddd;
    display:flex;
    align-items:center;
    gap:8px;
    padding:10px;
    background:#fff !important;
    height: 100%;
}

.text-input{
    flex:1;
    border-radius:18px;
    border:1px solid #ddd;
    padding:10px 12px;
    font-size:14px;
    line-height:1.6;

    /* مهم */
    resize:none;
    overflow-y: scroll;
    min-height:42px;
    max-height:160px;
    transition: height 0.1s ease;
}
.voice-toast{
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%);
    background: #111;
    color: #fff;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
}

/* show state */
.voice-toast.show{
    opacity: 1;
    visibility: visible;
    bottom: 110px;
}
.send-btn{
    padding-top:2px;
    cursor:pointer;
    width:40px;
    height:38px;
    border-radius:50%;
    border:none;
    background: rgb(242, 244, 245);
    display:flex;
    align-items:center;
    justify-content:center;
}
/* ICON BUTTONS */
.icon-btn{
    width:40px;
    height:40px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:#f3f4f6;
    cursor:pointer;
    border:none;
}
.file-btn{
    background: #5a6868;
    color:#fff;
    border:none;
    border-radius:50%;
    width:40px;
    height:40px;
    cursor:pointer;
}
.ai-avatar{
    background-color:unset !important;
}

.d-none{
    display:none;
}

@media (max-width:768px){
    .pages{
        width:100% !important;
    }
    .ai{
        display:flex;
        flex-direction: column;
    }
    .chat-shell{
        width:95% !important;
        max-width:unset;
    }
    .avatar{
        font-size:25px;
        width: 40px !important;
        min-width:unset !important;
        height:40px !important;
    }
    .chat-input{
        padding:8px;
        gap:6px;
    }

    .icon-btn{
        width:36px;
        height:36px;
    }

    .send-btn{
        width:38px;
        height:38px;
    }
}