#icom-chatbot {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.icom-chatbot__toggle {
    border: 0;
    background: #0a3558;
    color: #ffffff;
    border-radius: 999px;
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(10, 53, 88, 0.35);
}

.icom-chatbot__panel {
    width: min(360px, calc(100vw - 24px));
    height: 520px;
    max-height: calc(100vh - 92px);
    background: linear-gradient(180deg, #f5f9fc 0%, #ffffff 30%);
    border: 1px solid #d2dbe3;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 10px;
    display: none;
    flex-direction: column;
}

#icom-chatbot.is-open .icom-chatbot__panel {
    display: flex;
}

.icom-chatbot__header {
    background: #0a3558;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}

.icom-chatbot__title {
    font-size: 16px;
    font-weight: 700;
}

.icom-chatbot__close {
    border: 0;
    background: transparent;
    color: #ffffff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.icom-chatbot__messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: transparent;
}

.icom-chatbot__message {
    margin-bottom: 10px;
    display: flex;
}

.icom-chatbot__message--assistant {
    justify-content: flex-start;
}

.icom-chatbot__message--user {
    justify-content: flex-end;
}

.icom-chatbot__bubble {
    max-width: 88%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    white-space: pre-wrap;
}

.icom-chatbot__message--assistant .icom-chatbot__bubble {
    background: #e9f2f9;
    color: #0f2a42;
    border: 1px solid #d6e5f1;
}

.icom-chatbot__message--user .icom-chatbot__bubble {
    background: #0a3558;
    color: #ffffff;
}

/* ===== TYPING INDICATOR STYLES ===== */
.icom-chatbot__status {
    min-height: 24px;
    color: #4f6477;
    font-size: 12px;
    padding: 6px 12px 0 12px;
}

.icom-typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4f6477;
}

.icom-typing-dots {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

.icom-typing-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #0a3558;
    animation: icom-bounce 1.4s infinite;
}

.icom-typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.icom-typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes icom-bounce {

    0%,
    60%,
    100% {
        opacity: 0.5;
        transform: translateY(0);
    }

    30% {
        opacity: 1;
        transform: translateY(-6px);
    }
}

/* ===== END TYPING INDICATOR ===== */

.icom-chatbot__form {
    display: flex;
    gap: 8px;
    padding: 10px 12px 12px 12px;
    border-top: 1px solid #e4e8ec;
    background: #ffffff;
}

.icom-chatbot__input {
    flex: 1;
    border: 1px solid #cad7e4;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
}

.icom-chatbot__input:focus {
    outline: none;
    border-color: #0a3558;
    box-shadow: 0 0 0 2px rgba(10, 53, 88, 0.14);
}

.icom-chatbot__send {
    border: 0;
    border-radius: 8px;
    background: #e33f3f;
    color: #ffffff;
    font-weight: 700;
    padding: 0 14px;
    cursor: pointer;
}

.icom-chatbot__send:disabled {
    opacity: 0.6;
    cursor: wait;
}

@media (max-width: 767px) {
    #icom-chatbot {
        right: 12px;
        bottom: 12px;
    }

    .icom-chatbot__panel {
        width: calc(100vw - 24px);
        height: min(70vh, 520px);
    }
}
