.vf-chatbot {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1200;
    font-family: "Segoe UI", Arial, sans-serif;
}

.vf-chatbot.is-open .vf-chatbot__toggle {
    display: none;
}

.vf-chatbot__panel {
    display: none;
}

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

.vf-chatbot__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0;
    border: 0;
    border-radius: 999px;
    background: #111827;
    color: #fff;
    width: 58px;
    height: 58px;
    padding: 0;
    justify-content: center;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.vf-chatbot__toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 46px rgba(15, 23, 42, 0.34);
}

.vf-chatbot__toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    font-size: 17px;
}

.vf-chatbot__panel {
    width: min(380px, calc(100vw - 24px));
    height: min(620px, calc(100vh - 96px));
    margin-top: 12px;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

.vf-chatbot__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 16px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 100%);
    flex: 0 0 auto;
}

.vf-chatbot__eyebrow {
    margin: 0 0 4px;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.vf-chatbot__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
}

.vf-chatbot__close {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.vf-chatbot__body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.06), transparent 35%),
        #f8fafc;
}

.vf-chatbot__messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    min-height: 220px;
}

.vf-chatbot__message {
    max-width: 88%;
    padding: 12px 14px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    word-break: break-word;
}

.vf-chatbot__message--bot {
    align-self: flex-start;
    background: #fff;
    color: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-bottom-left-radius: 6px;
}

.vf-chatbot__message--user {
    align-self: flex-end;
    background: #1d4ed8;
    color: #fff;
    border-bottom-right-radius: 6px;
}

.vf-chatbot__quick-actions.is-hidden,
.vf-chatbot__composer.is-hidden {
    display: none !important;
}

.vf-chatbot__quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 14px;
}

.vf-chatbot__quick-action {
    border: 1px solid rgba(37, 99, 235, 0.18);
    background: #fff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.vf-chatbot__quick-action:hover {
    background: rgba(29, 78, 216, 0.06);
    border-color: rgba(29, 78, 216, 0.32);
}

.vf-chatbot__lead-form {
    margin: 0 16px 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.vf-chatbot__lead-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.vf-chatbot__lead-grid + .vf-chatbot__field--full {
    margin-top: 10px;
}

.vf-chatbot__label {
    display: block;
    margin-bottom: 6px;
    color: #334155;
    font-size: 12px;
    font-weight: 700;
}

.vf-chatbot__input,
.vf-chatbot__textarea,
.vf-chatbot__composer-input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 14px;
    color: #0f172a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.vf-chatbot__input,
.vf-chatbot__textarea {
    display: block;
}

.vf-chatbot__input:focus,
.vf-chatbot__textarea:focus,
.vf-chatbot__composer-input:focus {
    border-color: rgba(29, 78, 216, 0.55);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.vf-chatbot__textarea {
    resize: vertical;
    min-height: 84px;
}

.vf-chatbot__error {
    margin: 10px 0 0;
    color: #dc2626;
    font-size: 12px;
}

.vf-chatbot__submit,
.vf-chatbot__composer-button {
    border: 0;
    border-radius: 12px;
    background: #111827;
    color: #fff;
    padding: 11px 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
}

.vf-chatbot__submit {
    width: 100%;
    margin-top: 12px;
}

.vf-chatbot__composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 14px 16px 16px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: #fff;
    flex: 0 0 auto;
}

.vf-chatbot__composer-input {
    min-width: 0;
}

@media (max-width: 640px) {
    .vf-chatbot {
        right: 12px;
        left: auto;
        bottom: 12px;
        transform: none;
        width: auto;
        max-width: none;
    }

    .vf-chatbot__panel {
        position: fixed;
        left: 50%;
        right: auto;
        bottom: 12px;
        transform: translateX(-50%);
        width: calc(100vw - 24px);
        max-width: 380px;
        height: min(78vh, 620px);
        margin-top: 0;
    }

    .vf-chatbot__lead-grid,
    .vf-chatbot__composer {
        grid-template-columns: 1fr;
    }
}