/* KI-Einkaufsassistent (LAKiAssistent) - like asystent.css / asystent-einstieg.css of the PL shop.
   Below Bootstrap offcanvas (1045) and modals (1055), above the fixed buy box (10) and the header. */
.la-ka {
    --la-ka-schwarz: #111;
    --la-ka-grau: #f4f4f2;
    --la-ka-linie: #e2e2de;
    --la-ka-text: #222;
    --la-ka-leise: #666;
    font-family: inherit;
    color: var(--la-ka-text);
}

.la-ka-sr {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Button */
.la-ka-knopf {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1040;
    display: none;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--la-ka-schwarz);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .25);
    cursor: pointer;
    transition: transform .2s ease, bottom .3s ease, opacity .2s ease;
}
.la-ka--bereit .la-ka-knopf { display: inline-flex; }
.la-ka-knopf:hover { transform: scale(1.06); }
.la-ka-knopf:focus-visible { outline: 3px solid #fff; box-shadow: 0 0 0 6px var(--la-ka-schwarz); }
.la-ka--offen .la-ka-knopf,
.la-ka--versteckt .la-ka-knopf { opacity: 0; pointer-events: none; visibility: hidden; }
/* above the fixed buy box of the product page (90 px on phones, 1.5rem from the bottom on larger screens) */
.la-ka--ueber-kaufbalken .la-ka-knopf { bottom: 106px; }
@media (min-width: 768px) {
    .la-ka-knopf { right: 24px; bottom: 24px; }
    .la-ka--ueber-kaufbalken .la-ka-knopf { bottom: 24px; right: 24px; }
}

/* One-time hint bubble next to the button (product page, first visit) */
.la-ka-tipp {
    position: fixed;
    right: 80px;
    bottom: 20px;
    z-index: 1040;
    display: flex;
    align-items: flex-start;
    gap: 4px;
    max-width: min(260px, calc(100vw - 112px));
    padding: 10px 6px 10px 14px;
    border-radius: 14px;
    background: #fff;
    color: var(--la-ka-schwarz);
    box-shadow: 0 4px 16px rgba(0, 0, 0, .18);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .3s ease, bottom .3s ease;
}
.la-ka-tipp--sichtbar { opacity: 1; transform: none; }
.la-ka--ueber-kaufbalken .la-ka-tipp { bottom: 110px; }
.la-ka--offen .la-ka-tipp, .la-ka--versteckt .la-ka-tipp { display: none; }
.la-ka-tipp-text {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    font-size: 14px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
}
.la-ka-tipp-zu {
    display: inline-flex;
    flex: 0 0 28px;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin-top: -4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: #555;
    cursor: pointer;
}
.la-ka-tipp-zu:hover { background: #f0f0f0; }
@media (min-width: 768px) {
    .la-ka-tipp, .la-ka--ueber-kaufbalken .la-ka-tipp { right: 88px; bottom: 28px; }
}

/* Window: full screen on phones, side panel from 768 px */
.la-ka-dialog {
    position: fixed;
    inset: 0;
    z-index: 1044;
    display: flex;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 0 24px rgba(0, 0, 0, .18);
}
.la-ka-dialog[hidden] { display: none; }
@media (min-width: 768px) {
    .la-ka-dialog { left: auto; width: 440px; max-width: 100vw; }
}
@media (max-width: 767.98px) {
    .la-ka-html-offen, .la-ka-html-offen body { overflow: hidden; }
    .la-ka-dialog { bottom: auto; height: 100%; }
    /* keyboard open: more room for the conversation and its buttons */
    .la-ka--tastatur .la-ka-hinweis { display: none; }
    .la-ka--tastatur .la-ka-kopf { padding-top: 4px; padding-bottom: 4px; }
    .la-ka--tastatur .la-ka-fuss { padding-top: 8px; padding-bottom: 8px; }
}

.la-ka-kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 8px 10px 18px;
    border-bottom: 1px solid var(--la-ka-linie);
}
.la-ka-titel {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: .02em;
}
.la-ka-titel svg { width: 20px; height: 20px; }
.la-ka-kopf-aktionen { display: flex; gap: 2px; }
.la-ka-kopf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--la-ka-text);
    cursor: pointer;
}
.la-ka-kopf-btn:hover { background: var(--la-ka-grau); }
.la-ka-kopf-btn:focus-visible { outline: 2px solid var(--la-ka-schwarz); outline-offset: -2px; }

.la-ka-verlauf {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 16px 16px 8px;
    -webkit-overflow-scrolling: touch;
}
.la-ka-verlauf:focus { outline: none; }

.la-ka-blase {
    max-width: 88%;
    margin: 0 0 12px;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 15px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.la-ka-blase p { margin: 0 0 .5em; }
.la-ka-blase p:last-child { margin-bottom: 0; }
.la-ka-blase ul { margin: .25em 0 .5em; padding-left: 1.2em; }
.la-ka-blase a { color: inherit; text-decoration: underline; }
.la-ka-blase--assistent { background: var(--la-ka-grau); border-bottom-left-radius: 4px; }
.la-ka-blase--kunde { margin-left: auto; background: var(--la-ka-schwarz); color: #fff; border-bottom-right-radius: 4px; }
.la-ka-blase--fehler { background: #fbf3ee; }
.la-ka-info { margin: 4px 0 12px; font-size: 13px; color: var(--la-ka-leise); text-align: center; }

.la-ka-denkt { display: inline-flex; gap: 5px; margin: 0 0 12px; padding: 14px 16px; border-radius: 14px; background: var(--la-ka-grau); }
.la-ka-punkt { width: 7px; height: 7px; border-radius: 50%; background: #999; animation: la-ka-puls 1.2s infinite ease-in-out; }
.la-ka-punkt:nth-child(3) { animation-delay: .15s; }
.la-ka-punkt:nth-child(4) { animation-delay: .3s; }
@keyframes la-ka-puls { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Product cards: image never cropped (object-fit contain) */
.la-ka-karten {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
}
.la-ka-karte {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 8px;
    border: 1px solid var(--la-ka-linie);
    border-radius: 10px;
    color: var(--la-ka-text);
    text-decoration: none;
    background: #fff;
}
.la-ka-karte:hover { border-color: #bbb; color: var(--la-ka-text); text-decoration: none; }
.la-ka-karte:focus-visible { outline: 2px solid var(--la-ka-schwarz); outline-offset: 2px; }
.la-ka-karte-bild { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; margin-bottom: 8px; background: #fff; }
.la-ka-karte-bild img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.la-ka-karte-name { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.la-ka-karte-preis { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; }

/* Trendblog links */
.la-ka-artikel-box { margin: -4px 0 14px; padding: 10px 14px; border-left: 3px solid var(--la-ka-schwarz); background: #fff; }
.la-ka-artikel-titel { margin: 0 0 4px; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--la-ka-leise); }
.la-ka-artikel { margin: 0; padding: 0; list-style: none; }
.la-ka-artikel li { margin: 4px 0; font-size: 14px; line-height: 1.4; }
.la-ka-artikel a { color: var(--la-ka-text); text-decoration: underline; }

/* Suggestions */
.la-ka-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 12px; }
.la-ka-chip {
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid var(--la-ka-schwarz);
    border-radius: 20px;
    background: #fff;
    color: var(--la-ka-schwarz);
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}
.la-ka-chip:hover { background: var(--la-ka-schwarz); color: #fff; }
.la-ka-chip:focus-visible { outline: 2px solid var(--la-ka-schwarz); outline-offset: 2px; }

/* Input */
.la-ka-fuss { padding: 10px 16px 12px; border-top: 1px solid var(--la-ka-linie); padding-bottom: max(12px, env(safe-area-inset-bottom)); }
.la-ka-form { display: flex; align-items: flex-end; gap: 8px; }
.la-ka-feld {
    flex: 1 1 auto;
    min-height: 44px;
    max-height: 120px;
    padding: 11px 14px;
    border: 1px solid #bbb;
    border-radius: 22px;
    font: inherit;
    font-size: 16px; /* no zoom on iOS */
    line-height: 1.35;
    resize: none;
    box-sizing: border-box;
    overflow-y: hidden;
}
.la-ka-feld:focus { outline: none; border-color: var(--la-ka-schwarz); box-shadow: 0 0 0 1px var(--la-ka-schwarz); }
.la-ka-senden {
    display: inline-flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--la-ka-schwarz);
    color: #fff;
    cursor: pointer;
}
.la-ka-senden:focus-visible { outline: 2px solid var(--la-ka-schwarz); outline-offset: 2px; }
.la-ka-hinweis { margin: 8px 2px 0; font-size: 11px; line-height: 1.4; color: var(--la-ka-leise); }
.la-ka-hinweis a { color: var(--la-ka-leise); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
    .la-ka-knopf, .la-ka-punkt { transition: none; animation: none; }
}

@media (prefers-reduced-motion: reduce) {
    .la-ka-tipp { transition: none; transform: none; }
}
