/* ============================================================
   Onboarding-Bot — Floating-Chat-Widget
   Nutzt die Portal-Designtokens aus style.css (--lp-*)
   ============================================================ */

.ob-bot, .ob-bot * { box-sizing: border-box; }

/* Launcher */
.ob-launcher {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--lp-primary, #1f6feb);
    color: #fff;
    font: 600 14px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(31, 111, 235, 0.35);
    transition: transform .12s, box-shadow .12s, background-color .12s;
}
.ob-launcher:hover { background: var(--lp-primary-dark, #1956b8); transform: translateY(-1px); }
.ob-launcher svg { width: 20px; height: 20px; }
.ob-launcher[hidden] { display: none; }

/* Panel */
.ob-panel {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--lp-border, #e3e8ef);
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(20, 30, 50, 0.28);
    overflow: hidden;
    font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.ob-panel[hidden] { display: none; }

.ob-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--lp-primary, #1f6feb);
    color: #fff;
}
.ob-head-ic {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    display: flex; align-items: center; justify-content: center;
}
.ob-head-ic svg { width: 17px; height: 17px; }
.ob-head-t { font-weight: 700; font-size: 15px; }
.ob-head-s { font-size: 11px; opacity: .85; }
.ob-close {
    margin-left: auto;
    background: none; border: 0; color: #fff;
    font-size: 22px; line-height: 1; cursor: pointer;
    padding: 4px 6px; border-radius: 6px;
}
.ob-close:hover { background: rgba(255,255,255,0.15); }

.ob-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--lp-bg, #f5f7fb);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ob-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}
.ob-msg-bot {
    align-self: flex-start;
    background: #fff;
    border: 1px solid var(--lp-border, #e3e8ef);
    color: var(--lp-text, #1f2933);
    border-bottom-left-radius: 4px;
}
.ob-msg-user {
    align-self: flex-end;
    background: var(--lp-primary, #1f6feb);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.ob-msg-err {
    align-self: flex-start;
    background: #fdecec;
    border: 1px solid #f3c2c2;
    color: #a12a2a;
    border-bottom-left-radius: 4px;
}
.ob-typing { display: inline-block; opacity: .55; }

.ob-msg a, .ob-link {
    color: var(--lp-primary, #1f6feb);
    text-decoration: underline;
    word-break: break-word;
}
.ob-msg-user a { color: #fff; }

.ob-foot {
    border-top: 1px solid var(--lp-border, #e3e8ef);
    padding: 10px;
    background: #fff;
    display: flex;
    gap: 8px;
    align-items: flex-end;
}
.ob-input {
    flex: 1;
    resize: none;
    max-height: 110px;
    min-height: 40px;
    padding: 10px 12px;
    border: 1px solid var(--lp-border, #e3e8ef);
    border-radius: 9px;
    font: 14px/1.4 inherit;
    color: var(--lp-text, #1f2933);
}
.ob-input:focus {
    outline: none;
    border-color: var(--lp-primary, #1f6feb);
    box-shadow: 0 0 0 3px rgba(31,111,235,0.15);
}
.ob-send {
    flex: 0 0 auto;
    width: 40px; height: 40px;
    border: 0;
    border-radius: 9px;
    background: var(--lp-primary, #1f6feb);
    color: #fff;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.ob-send:hover { background: var(--lp-primary-dark, #1956b8); }
.ob-send:disabled { opacity: .5; cursor: not-allowed; }
.ob-send svg { width: 18px; height: 18px; }

.ob-disc {
    font-size: 10.5px;
    color: var(--lp-muted, #5b6776);
    text-align: center;
    padding: 0 12px 9px;
    background: #fff;
}

@media (max-width: 460px) {
    .ob-panel { right: 8px; bottom: 8px; height: calc(100vh - 16px); }
    .ob-launcher { right: 14px; bottom: 14px; }
}
