.chatbot-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    font-family: inherit;
}

.chatbot-widget__message a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
}

.chatbot-widget__toggle {
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    background: #2b55e0;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(43, 85, 224, 0.28);
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.chatbot-widget__toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(43, 85, 224, 0.35);
}

.chatbot-widget__panel {
    position: absolute;
    right: 0;
    bottom: 72px;
    width: 360px;
    max-width: calc(100vw - 20px);
    height: 560px;
    max-height: calc(100vh - 100px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(30, 41, 59, .18);
    overflow: hidden;
    display: none;
    flex-direction: column;
}

.chatbot-widget.is-open .chatbot-widget__panel {
    display: flex;
}

.chatbot-widget__header {
    background: #2b55e0;
    color: #fff;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.chatbot-widget__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: #fff;
}

.chatbot-widget__subtitle {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: .9;
}

.chatbot-widget__close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.chatbot-widget__body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: #f8fafc;
}

.chatbot-widget__messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chatbot-widget__message {
    max-width: 85%;
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
    white-space: normal;
}

.chatbot-widget__message > div:first-child:empty {
    display: none;
}

.chatbot-widget__meta {
    margin-top: 6px;
    font-size: 11px;
    opacity: .75;
}

.chatbot-widget__message--bot {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-bottom-left-radius: 6px;
}

.chatbot-widget__message--user {
    align-self: flex-end;
    background: #2b55e0;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.chatbot-widget__meta {
    margin-top: 4px;
    font-size: 11px;
    opacity: .75;
}

.chatbot-widget__typing {
    display: none;
    margin-top: 10px;
    font-size: 13px;
    color: #64748b;
}

.chatbot-widget__typing.is-visible {
    display: block;
}

.chatbot-widget__footer {
    border-top: 1px solid #e2e8f0;
    background: #fff;
    padding: 12px;
}

.chatbot-widget__form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chatbot-widget__input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 14px;
    outline: none;
}

.chatbot-widget__quick-actions {
    margin-top: 10px;
}

.chatbot-widget__input:focus {
    border-color: #2b55e0;
}

.chatbot-widget__send {
    border: 0;
    border-radius: 12px;
    background: #2b55e0;
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
}

.chatbot-widget__send[disabled] {
    opacity: .65;
    cursor: not-allowed;
}

.chatbot-widget__quick-actions {
    margin-top: 12px;
    position: relative;
}

.chatbot-widget__dropdown {
    position: relative;
    display: inline-block;
    width: 100%;
}

.chatbot-widget__quick-main-btn {
    width: 100%;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: 12px;
    padding: 9px 12px;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
    font-weight: 600;
}

.chatbot-widget__dropdown-menu {
    display: none;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dbe2ea;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .14);
    overflow: hidden;
    z-index: 30;
}

.chatbot-widget__dropdown.is-open .chatbot-widget__dropdown-menu {
    display: block;
}

.chatbot-widget__dropdown-item {
    width: 100%;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #eef2f7;
    padding: 11px 12px;
    text-align: left;
    cursor: pointer;
    font-size: 13px;
    color: #1e293b;
}

.chatbot-widget__dropdown-item:last-child {
    border-bottom: 0;
}

.chatbot-widget__dropdown-item:hover {
    background: #f8fafc;
}

.chatbot-widget__quick-btn {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
}

.chatbot-widget__empty {
    color: #64748b;
    font-size: 13px;
}

.chat-message {
    white-space: normal;
    line-height: 1.4;
}

.chat-message br {
    margin-bottom: 4px;
}

.chatbot-widget__suggestions, .chatbot-widget__category-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.chatbot-widget__suggestions:empty,
.chatbot-widget__category-picks:empty {
    display: none;
    margin-bottom: 0;
}

.chatbot-widget__suggestion-btn {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    color: #3730a3;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
}

.chatbot-widget__category-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.chatbot-widget__category-btn {
    background: #f8fafc;
    border: 1px solid #dbe2ea;
    color: #1e293b;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    cursor: pointer;
}

.chatbot-widget__category-btn:hover {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.chatbot-widget__feedback {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.chatbot-widget__feedback-btn {
    border: 1px solid #dbe2ea;
    background: #fff;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
}

.chatbot-widget__feedback-btn:hover {
    background: #f8fafc;
}

.chatbot-widget__feedback-btn.is-active {
    background: #b0beff;
    border-color: #768df6;
}

@media (max-width: 575.98px) {
    .chatbot-widget {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .chatbot-widget__panel {
        right: 0;
        left: 0;
        width: auto;
        max-width: none;
        height: 70vh;
    }

    .chatbot-widget__toggle {
        margin-left: auto;
        display: flex;
    }
}
