
/* TECSOIN - DolibarrAssistant isolated styles */
/* Do not use global selectors here. Everything must stay inside bot-wrapper or botBox. */

.bot-wrapper {
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 10000;
    font-family: Arial, sans-serif;
}

.bot-wrapper *,
#botBox * {
    box-sizing: border-box;
}

.bot-content {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    gap: 12px;
}

.bot-start-btn {
    background: #39c0ed;
    color: #ffffff;
    outline: 0;
    border: none;
    padding: 12px;
    width: 54px;
    height: 54px;
    border-radius: 100%;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.bot-start-btn svg {
    width: 24px;
    height: 24px;
}

#botBox {
    width: 520px;
    max-width: calc(100vw - 40px);
    height: 720px;
    max-height: calc(100vh - 70px);
    display: none;
    background: #ffffff;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
    margin-bottom: 12px;
}

#botBox.show__chat {
    display: block;
}

#botBox .card-header {
    background: #39c0ed;
    color: #ffffff;
    padding: 14px 16px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#botBox .card-header p {
    margin: 0;
    color: #ffffff;
}

#botBox .card-header i {
    cursor: pointer;
    color: #ffffff;
    font-style: normal;
}

#botBox .card-body {
    padding: 14px !important;
    height: calc(100% - 52px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

/* Conversation area */
#botBox .bot-box-conversation {
    flex: 1;
    max-height: none;
    overflow-y: auto;
    padding: 0 6px 0 0;
}

/* Replacement for MDB/Bootstrap utility classes, scoped only to the assistant */
#botBox .d-flex {
    display: flex;
}

#botBox .flex-row {
    flex-direction: row;
}

#botBox .justify-content-start {
    justify-content: flex-start;
}

#botBox .justify-content-end {
    justify-content: flex-end;
}

#botBox .justify-content-between {
    justify-content: space-between;
}

#botBox .align-items-center {
    align-items: center;
}

#botBox .mb-4 {
    margin-bottom: 16px;
}

#botBox .mb-0 {
    margin-bottom: 0;
}

#botBox .p-3 {
    padding: 12px;
}

#botBox .ms-3 {
    margin-left: 12px;
}

#botBox .me-3 {
    margin-right: 12px;
}

#botBox .border {
    border: 1px solid #dddddd;
}

#botBox .small {
    font-size: 13px;
    line-height: 1.45;
}

/* Message images */
#botBox img {
    max-width: 100%;
}

/* Writing area */
#botBox .writing-area {
    padding: 0;
    margin-top: 12px;
}

#botBox .form-outline {
    width: 100%;
}

#botBox textarea,
#botBox .form-control {
    width: 100%;
    min-height: 75px;
    border: 1px solid #dddddd;
    border-radius: 8px;
    padding: 10px;
    resize: vertical;
    font-size: 14px;
    line-height: 1.4;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #333333;
    outline: none;
    box-shadow: none;
}

#botBox textarea:focus,
#botBox .form-control:focus {
    border-color: #39c0ed;
    box-shadow: 0 0 0 2px rgba(57, 192, 237, 0.15);
}

#botBox .form-label {
    display: block;
    font-size: 12px;
    color: #777777;
    margin-bottom: 5px;
}

/* Hide MDB notch elements if the HTML still has them */
#botBox .form-notch,
#botBox .form-notch-leading,
#botBox .form-notch-middle,
#botBox .form-notch-trailing {
    display: none !important;
}

/* Send button */
#botBox .btn,
#botBox #sendBtn {
    background: #2f67d8;
    color: #ffffff;
    border: 0;
    border-radius: 4px;
    padding: 9px 22px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 8px;
    display: inline-block;
    text-align: center;
}

#botBox .btn:hover,
#botBox #sendBtn:hover {
    background: #2554b5;
}

/* Clickable close icon */
#botBox .fa,
#botBox .fas {
    cursor: pointer;
}

/* Small screens */
@media (max-width: 480px) {
    .bot-wrapper {
        right: 12px;
        bottom: 12px;
    }

    #botBox {
        width: calc(100vw - 24px);
        height: calc(100vh - 90px);
    }
}