.mht-ai-widget {
    --mht-primary: #0D6EFD;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 99999;
    font-family: Arial, sans-serif;
    color: #142033;
}

.mht-chat-toggle {
    width: 62px;
    height: 62px;
    border: 0;
    border-radius: 50%;
    background: var(--mht-primary);
    color: #fff;
    box-shadow: 0 14px 34px rgba(14, 34, 64, .24);
    cursor: pointer;
    font-size: 26px;
}

.mht-chat-panel {
    width: min(380px, calc(100vw - 28px));
    height: min(620px, calc(100vh - 44px));
    background: #fff;
    border: 1px solid #dfe7f2;
    border-radius: 8px;
    box-shadow: 0 22px 58px rgba(14, 34, 64, .24);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.mht-chat-panel[hidden],
.mht-lead-modal[hidden] {
    display: none;
}

.mht-chat-header {
    min-height: 64px;
    padding: 12px 14px;
    background: var(--mht-primary);
    color: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
}

.mht-chat-header img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    background: #fff;
    border-radius: 6px;
}

.mht-chat-header strong,
.mht-chat-header small {
    display: block;
}

.mht-chat-header small {
    opacity: .86;
    margin-top: 2px;
}

.mht-chat-close {
    margin-left: auto;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.mht-chat-body {
    flex: 1;
    padding: 16px;
    overflow: auto;
    background: #f7f9fc;
}

.mht-message {
    max-width: 86%;
    margin: 0 0 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-line;
}

.mht-message strong {
    display: block;
    margin-bottom: 4px;
}

.mht-ai {
    background: #fff;
    border: 1px solid #e2e8f0;
}

.mht-user {
    margin-left: auto;
    color: #fff;
    background: var(--mht-primary);
}

.mht-quick-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.mht-quick-actions button {
    min-height: 40px;
    border: 1px solid #cfd9e8;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    cursor: pointer;
    text-align: left;
    padding: 0 12px;
}

.mht-quick-actions button:hover {
    border-color: var(--mht-primary);
}

.mht-chat-input {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
}

.mht-chat-input input {
    flex: 1;
    min-width: 0;
    border: 1px solid #cfd9e8;
    border-radius: 8px;
    padding: 11px 12px;
}

.mht-chat-input button,
.mht-lead-modal button {
    border: 0;
    border-radius: 8px;
    background: var(--mht-primary);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.mht-chat-input button {
    width: 46px;
}

.mht-lead-modal {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, .42);
    display: grid;
    place-items: center;
    padding: 18px;
}

.mht-lead-modal form {
    width: min(360px, 100%);
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 22px 58px rgba(14, 34, 64, .28);
}

.mht-lead-modal h3 {
    margin: 0 0 14px;
    font-size: 19px;
}

.mht-lead-modal label {
    display: block;
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
}

.mht-lead-modal input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 5px;
    border: 1px solid #cfd9e8;
    border-radius: 8px;
    padding: 10px 11px;
}

.mht-lead-modal button {
    width: 100%;
    min-height: 42px;
}

@media (max-width: 520px) {
    .mht-ai-widget {
        right: 14px;
        bottom: 14px;
    }

    .mht-chat-panel {
        width: calc(100vw - 28px);
        height: calc(100vh - 28px);
    }
}
