.chatbot-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1050;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #123a8f 0%, #2f77ff 100%);
    color: #fff;
    box-shadow: 0 18px 45px rgba(18, 58, 143, 0.28);
    padding: 14px 20px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.chatbot-launcher__logo {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: block;
}

.chatbot-launcher__label {
    white-space: nowrap;
}

.chatbot-panel {
    position: fixed;
    right: 24px;
    bottom: 88px;
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100vh - 120px);
    z-index: 1050;
    border-radius: 24px;
    overflow: hidden;
    background: #f4f7fb;
    box-shadow: 0 24px 70px rgba(12, 21, 44, 0.22);
    border: 1px solid rgba(18, 58, 143, 0.12);
    display: none;
}

.chatbot-panel.is-open {
    display: block;
}

.chatbot-panel__header {
    background: radial-gradient(circle at top left, #3f86ff 0%, #123a8f 62%, #0b2457 100%);
    color: #fff;
    padding: 22px 24px 18px;
}

.chatbot-panel__brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chatbot-panel__logo {
    width: 104px;
    max-width: 34vw;
    height: auto;
    display: block;
    flex: 0 0 auto;
}

.chatbot-panel__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(11, 36, 87, 0.28);
}

.chatbot-panel__subtitle {
    margin: 6px 0 0;
    color: rgba(255,255,255,0.82);
    font-size: 0.92rem;
    line-height: 1.45;
}

.chatbot-panel__body {
    padding: 18px;
}

.chatbot-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.chatbot-chip {
    border: 1px solid rgba(18, 58, 143, 0.14);
    background: #fff;
    color: #123a8f;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.chatbot-transcript {
    background: #fff;
    border: 1px solid rgba(18, 58, 143, 0.1);
    border-radius: 18px;
    padding: 14px;
    min-height: 180px;
}

.chatbot-bubble {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
    line-height: 1.5;
    font-size: 0.94rem;
}

.chatbot-bubble:last-child {
    margin-bottom: 0;
}

.chatbot-bubble--assistant {
    background: #eef4ff;
    color: #16315f;
}

.chatbot-bubble--user {
    background: #123a8f;
    color: #fff;
}

.chatbot-sources {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(18, 58, 143, 0.1);
}

.chatbot-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 10px;
}

.chatbot-meta__badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.chatbot-meta__badge--strategy {
    background: rgba(18, 58, 143, 0.11);
    color: #123a8f;
}

.chatbot-meta__badge--confidence-high {
    background: rgba(25, 135, 84, 0.14);
    color: #146c43;
}

.chatbot-meta__badge--confidence-medium {
    background: rgba(13, 202, 240, 0.14);
    color: #0b7285;
}

.chatbot-meta__badge--confidence-low,
.chatbot-meta__badge--confidence-none {
    background: rgba(255, 193, 7, 0.18);
    color: #8a6d00;
}

.chatbot-meta__note {
    font-size: 0.75rem;
    color: #6f7f97;
}

.chatbot-sources a {
    display: block;
    color: #123a8f;
    font-weight: 600;
    margin-top: 6px;
}

.chatbot-sources__title {
    font-size: 0.74rem;
    font-weight: 700;
    color: #6f7f97;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.chatbot-form {
    margin-top: 14px;
}

.chatbot-input {
    width: 100%;
    border: 1px solid rgba(18, 58, 143, 0.14);
    border-radius: 16px;
    padding: 12px 14px;
    min-height: 92px;
    resize: vertical;
    background: #fff;
}

.chatbot-actions {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-top: 12px;
}

.chatbot-helptext {
    font-size: 0.78rem;
    color: #6f7f97;
    line-height: 1.4;
}

.chatbot-submit {
    border: 0;
    border-radius: 999px;
    background: #123a8f;
    color: #fff;
    font-weight: 700;
    padding: 10px 18px;
}

.chatbot-submit:disabled {
    opacity: 0.6;
}

@media (max-width: 767.98px) {
    .chatbot-launcher {
        right: 16px;
        bottom: 16px;
        padding: 10px 14px;
        gap: 8px;
    }

    .chatbot-launcher__logo {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .chatbot-panel {
        right: 16px;
        left: 16px;
        bottom: 80px;
        width: auto;
        max-height: calc(100vh - 104px);
        border-radius: 20px;
    }

    .chatbot-panel__header {
        padding: 18px 18px 14px;
    }

    .chatbot-panel__brand {
        gap: 10px;
        align-items: flex-start;
    }

    .chatbot-panel__logo {
        width: 82px;
        max-width: 26vw;
    }

    .chatbot-panel__title {
        font-size: 1rem;
    }

    .chatbot-panel__subtitle {
        font-size: 0.84rem;
    }

    .chatbot-panel__body {
        padding: 14px;
    }

    .chatbot-transcript {
        min-height: 140px;
        max-height: 34vh;
        overflow-y: auto;
    }

    .chatbot-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .chatbot-submit {
        width: 100%;
    }
}

@media (max-width: 479.98px) {
    .chatbot-launcher {
        padding: 10px 12px;
        border-radius: 18px;
    }

    .chatbot-launcher__label {
        font-size: 0.92rem;
    }

    .chatbot-panel {
        right: 10px;
        left: 10px;
        bottom: 74px;
        max-height: calc(100vh - 88px);
    }

    .chatbot-panel__logo {
        width: 72px;
        max-width: 28vw;
    }
}