/* LEANIO Chat-Assistent, Markup aus js/leanio-chat.js */

.lchat-knopf {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: #F2B300;
    color: #25282b;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    cursor: pointer;
}

.lchat-knopf:hover { background: #ffc61a; }
.lchat-knopf:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.lchat-offen .lchat-knopf { display: none; }

.lchat-fenster {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
    width: 400px;
    max-width: calc(100vw - 32px);
    /* Wächst mit dem Gespräch, erst ab der Maximalhöhe scrollt der Verlauf */
    max-height: min(760px, calc(100vh - 40px));
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #25282b;
    border-radius: 12px;
    border-top: 5px solid #F2B300;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
    overflow: hidden;
    font-size: .95rem;
}

.lchat-fenster[hidden] { display: none; }

.lchat-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: #25282b;
    color: #fff;
}

.lchat-kopf > div { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.lchat-kopf small { color: #c9c9c9; font-size: .75rem; }

.lchat-kopf button {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: .85rem;
}

.lchat-zu { font-size: 1.5rem !important; line-height: 1; }

.lchat-verlauf {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #f5f5f5;
}

.lchat-nachricht {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.lchat-assistent { align-self: flex-start; background: #fff; border: 1px solid #e3e3e3; }
.lchat-besucher { align-self: flex-end; background: #F2B300; color: #25282b; }
.lchat-nachricht a { color: #8a6600; font-weight: 600; }

.lchat-tippt::after {
    content: "…";
    animation: lchat-puls 1s infinite;
}

@keyframes lchat-puls { 50% { opacity: .3; } }

.lchat-vorschlaege {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 12px;
    background: #f5f5f5;
}

.lchat-vorschlaege:not(:empty) { padding-bottom: 10px; }

.lchat-vorschlaege button {
    border: 1px solid #F2B300;
    border-radius: 999px;
    background: #fff;
    padding: 4px 10px;
    font-size: .8rem;
    cursor: pointer;
}

.lchat-eingabe {
    display: flex;
    gap: 6px;
    padding: 8px;
    border-top: 1px solid #e3e3e3;
}

.lchat-eingabe textarea {
    flex: 1;
    resize: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 6px 10px;
    font: inherit;
}

.lchat-eingabe button {
    border: 0;
    border-radius: 8px;
    background: #F2B300;
    padding: 0 14px;
    cursor: pointer;
}

.lchat-eingabe button:disabled { opacity: .5; cursor: default; }

.lchat-hinweis {
    margin: 0;
    padding: 0 10px 8px;
    font-size: .7rem;
    color: #6b6b6b;
}

@media (max-width: 480px) {
    .lchat-fenster { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}
