.vvv-chat {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 999999;
    font-family: inherit;
    color: #1f2933;
}

.vvv-chat__launcher {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 52px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #1672b8;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}

.vvv-chat__launcher:hover,
.vvv-chat__launcher:focus-visible {
    background: #105f9c;
}

.vvv-chat__launcher-icon {
    font-size: 20px;
    line-height: 1;
}

.vvv-chat__panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(390px, calc(100vw - 28px));
    height: min(610px, calc(100vh - 110px));
    overflow: hidden;
    border: 1px solid #dce8f1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .22);
}

.vvv-chat__panel:not([hidden]) {
    display: flex;
    flex-direction: column;
}

.vvv-chat__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 17px;
    border-bottom: 1px solid #dce8f1;
    background: #f6f9fc;
}

.vvv-chat__title,
.vvv-chat__subtitle {
    display: block;
}

.vvv-chat__title {
    font-size: 16px;
    line-height: 1.25;
}

.vvv-chat__subtitle {
    margin-top: 2px;
    color: #667785;
    font-size: 12px;
}

.vvv-chat__header-actions {
    display: flex;
    gap: 4px;
}

.vvv-chat__clear,
.vvv-chat__close {
    display: grid;
    width: 34px;
    height: 34px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #52616d;
    font: inherit;
    font-size: 21px;
    cursor: pointer;
}

.vvv-chat__clear:hover,
.vvv-chat__close:hover {
    background: #eaf1f6;
}

.vvv-chat__messages {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 18px 16px;
    background: #fff;
}

.vvv-chat__message {
    display: flex;
    margin: 0 0 12px;
}

.vvv-chat__message--user {
    justify-content: flex-end;
}

.vvv-chat__bubble {
    max-width: 86%;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f1f5f8;
    font-size: 15px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.vvv-chat__bubble a {
    color: #0f65a5;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.vvv-chat__bubble a:hover,
.vvv-chat__bubble a:focus-visible {
    text-decoration-thickness: 2px;
}


.vvv-chat__message--user .vvv-chat__bubble {
    background: #1672b8;
    color: #fff;
    border-bottom-right-radius: 4px;
}

.vvv-chat__message--assistant .vvv-chat__bubble {
    border-bottom-left-radius: 4px;
}

.vvv-chat__message--status .vvv-chat__bubble {
    padding: 7px 10px;
    background: transparent;
    color: #7a8791;
    font-size: 13px;
    font-style: italic;
}

.vvv-chat__message--error .vvv-chat__bubble {
    background: #fff4f3;
    color: #9f2e28;
    border: 1px solid #f1d0cd;
}

.vvv-chat__form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid #dce8f1;
    background: #fff;
}

.vvv-chat__input {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    resize: none;
    overflow-y: hidden;
    box-sizing: border-box;
    padding: 10px 11px;
    border: 1px solid #cfdbe4;
    border-radius: 9px;
    background: #fff;
    color: #1f2933;
    font: inherit;
    font-size: 15px;
    line-height: 1.35;
}

.vvv-chat__input:focus {
    outline: 2px solid rgba(22, 114, 184, .2);
    border-color: #1672b8;
}

.vvv-chat__send {
    min-height: 42px;
    padding: 0 13px;
    border: 0;
    border-radius: 9px;
    background: #1672b8;
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.vvv-chat__send:disabled,
.vvv-chat__input:disabled {
    opacity: .65;
    cursor: wait;
}

.vvv-chat__notice {
    padding: 0 13px 11px;
    color: #74818b;
    font-size: 11px;
    line-height: 1.35;
}

@media (max-width: 600px) {
    .vvv-chat {
        right: 14px;
        bottom: 14px;
    }

    .vvv-chat__panel {
        position: fixed;
        right: 8px;
        bottom: 76px;
        left: 8px;
        width: auto;
        height: min(620px, calc(100vh - 96px));
    }

    .vvv-chat__launcher-label {
        display: none;
    }

    .vvv-chat__launcher {
        width: 54px;
        padding: 0;
        justify-content: center;
    }
}

/* 0.2.0 – separat gerenderte Website-Quellen */
.vvv-chat__answer {
    white-space: pre-wrap;
}

.vvv-chat__sources {
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px solid #dce3e8;
}

.vvv-chat__sources-label {
    margin-bottom: 6px;
    color: #6c7a85;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.vvv-chat__source {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    line-height: 1.3;
}
