.fhdx-ai-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99990;
    font-family: inherit;
}

[dir="rtl"] .fhdx-ai-chat {
    right: auto;
    left: 22px;
}

.fhdx-ai-chat__bubble {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    font-weight: 800;
    font-size: 17px;
    cursor: pointer;
    box-shadow: 0 12px 35px rgba(0,0,0,.25);
}

.fhdx-ai-chat__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: min(380px, calc(100vw - 30px));
    height: min(570px, calc(100vh - 120px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(0,0,0,.22);
}

[dir="rtl"] .fhdx-ai-chat__panel {
    right: auto;
    left: 0;
}

.fhdx-ai-chat__header {
    height: 68px;
    padding: 13px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #111827;
    color: #fff;
}

.fhdx-ai-chat__header strong,
.fhdx-ai-chat__header small {
    display: block;
}

.fhdx-ai-chat__header small {
    margin-top: 3px;
    opacity: .7;
}

.fhdx-ai-chat__header button {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.fhdx-ai-chat__messages {
    height: calc(100% - 138px);
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
}

.fhdx-ai-chat__message {
    max-width: 85%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 13px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.fhdx-ai-chat__message--user {
    margin-left: auto;
    background: #111827;
    color: #fff;
}

[dir="rtl"] .fhdx-ai-chat__message--user {
    margin-left: 0;
    margin-right: auto;
}

.fhdx-ai-chat__message--assistant {
    background: #fff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.fhdx-ai-chat__form {
    height: 70px;
    display: flex;
    gap: 8px;
    padding: 10px;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.fhdx-ai-chat__form textarea {
    flex: 1;
    resize: none;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 11px;
    font: inherit;
    outline: none;
}

.fhdx-ai-chat__form button {
    border: 0;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    padding: 0 16px;
    font-weight: 700;
    cursor: pointer;
}

@media (max-width: 600px) {
    .fhdx-ai-chat {
        right: 14px;
        bottom: 14px;
    }

    [dir="rtl"] .fhdx-ai-chat {
        right: auto;
        left: 14px;
    }

    .fhdx-ai-chat__panel {
        position: fixed;
        inset: 12px;
        width: auto;
        height: auto;
        bottom: 82px;
    }
}


/* ===================================
   FINAL WIDGET CHAT STYLE
=================================== */


.fhdx-ai-chat__message {

    display:flex;
    gap:10px;
    align-items:flex-start;

}


.fhdx-ai-chat__message::before {

    display:none !important;
    content:none !important;

}


.fhdx-ai-chat__bubble-avatar {

    width:32px;
    height:32px;
    border-radius:50%;

    display:flex;
    align-items:center;
    justify-content:center;

    font-size:10px;
    font-weight:700;

}


.fhdx-ai-chat__bubble-avatar.ai {

    background:#111827;
    color:#fff;

}


.fhdx-ai-chat__bubble-avatar.user {

    background:#e5e7eb;
    color:#111827;

}


.fhdx-ai-chat__message-content {

    padding:8px 12px !important;

    border-radius:14px;

    line-height:1.5;

}


.fhdx-ai-chat__message--assistant {

    background:#fff;

    border:1px solid #e5e7eb;

}


.fhdx-ai-chat__message--user {

    background:#111827;

    color:#fff;

}


.fhdx-ai-chat textarea {

    resize:none !important;

}


