/*
 * animado Feedback-Modus – Oberfläche
 * Alle Klassen beginnen mit «afb-», damit nichts mit dem Shop kollidiert.
 * Sehr hohe Ebenen (z-index), damit die Punkte auch über Menüs,
 * Warenkorb-Schublade und Cookie-Hinweis liegen.
 */

.afb-knopf,
.afb-leiste,
.afb-editor,
.afb-karte,
.afb-panel,
.afb-meldung,
.afb-pin {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    box-sizing: border-box;
    letter-spacing: normal;
    text-transform: none;
}

.afb-knopf *,
.afb-editor *,
.afb-karte *,
.afb-panel * {
    box-sizing: border-box;
}

/* Schwebende Kaufleiste am Handy (Produktseite): Knopf hoeher setzen,
   sonst deckt er Name und Preis in der Leiste zu. */
.animado-kaufleiste-an .afb-knopf {
    bottom: 88px;
}

/* --- Hauptknopf -------------------------------------------------------- */
.afb-knopf {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 2147483000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    cursor: pointer;
}

.afb-knopf:focus-visible {
    outline: 3px solid #f97316;
    outline-offset: 2px;
}

.afb-knopf__zaehler {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #f97316;
    color: #1a1a2e;
    font-size: 12px;
    font-weight: 800;
}

.afb-knopf__zaehler:empty {
    display: none;
}

.afb-an .afb-knopf {
    background: #f97316;
    color: #1a1a2e;
}

.afb-an .afb-knopf__zaehler {
    background: #1a1a2e;
    color: #fff;
}

/* --- Hinweisleiste unten ---------------------------------------------- */
/* Unten statt oben: Oben lag sie über USP-Leiste und Suchfeld – genau
   dem Bereich, zu dem am häufigsten Notizen entstehen.
   «width: max-content»: Mit left:50% hätte die Leiste sonst nur die
   halbe Bildschirmbreite zur Verfügung und die Knöpfe brächen um. */
.afb-leiste {
    display: none;
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2147483000;
    align-items: center;
    gap: 10px;
    width: max-content;
    max-width: calc(100vw - 24px);
    padding: 8px 8px 8px 16px;
    border-radius: 999px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.afb-an .afb-leiste {
    display: flex;
}

.afb-leiste .afb-btn {
    white-space: nowrap;
}

/* Knopf «Feedback» unten links und Leiste unten Mitte würden sich auf
   schmalen Bildschirmen überlagern – dort sitzt die Leiste darüber. */
@media (max-width: 1099px) {
    .afb-leiste {
        bottom: 72px;
    }
}

@media (max-width: 767px) {
    .afb-leiste {
        flex-wrap: wrap;
        justify-content: center;
        border-radius: 16px;
        padding: 10px;
        text-align: center;
    }
}

/* --- Fadenkreuz im Modus --------------------------------------------- */
.afb-an,
.afb-an * {
    cursor: crosshair !important;
}

.afb-an [data-animado-fb],
.afb-an [data-animado-fb] * {
    cursor: auto !important;
}

.afb-an button[data-animado-fb],
.afb-an [data-animado-fb] button {
    cursor: pointer !important;
}

/* --- Hervorhebung unter der Maus ------------------------------------- */
.afb-rahmen {
    display: none;
    position: fixed;
    z-index: 2147482990;
    pointer-events: none;
    border: 2px solid #f97316;
    border-radius: 4px;
    background: rgba(249, 115, 22, 0.08);
}

.afb-an .afb-rahmen.is-sichtbar {
    display: block;
}

/* --- Punkte ------------------------------------------------------------ */
.afb-pins {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 2147482995;
}

.afb-an .afb-pins {
    display: block;
}

.afb-pin {
    position: absolute;
    transform: translate(-50%, -50%);
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #f97316;
    color: #1a1a2e;
    font-size: 12px;
    font-weight: 800;
    line-height: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.afb-pin--erledigt {
    background: #16a34a;
    color: #fff;
}

/* Notizen, deren Stelle es auf dieser Ansicht nicht mehr gibt */
.afb-ohne-stelle {
    display: none;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 2147482996;
    width: 260px;
    max-width: calc(100vw - 32px);
    padding: 12px;
    border-radius: 12px;
    background: #fff;
    color: #1a1a2e;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.24);
}

.afb-an .afb-ohne-stelle:not([hidden]) {
    display: block;
}

.afb-ohne-stelle__titel {
    font-weight: 800;
}

.afb-ohne-stelle__text {
    margin-top: 2px;
    color: #555;
    font-size: 12px;
}

.afb-ohne-stelle__pins {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.afb-pin.afb-pin--frei {
    position: static;
    transform: none;
}

/* --- Boxen: neue Notiz, Karte, Liste ---------------------------------- */
.afb-editor,
.afb-karte,
.afb-panel {
    position: fixed;
    z-index: 2147483001;
    width: 340px;
    max-width: calc(100vw - 24px);
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    color: #1a1a2e;
    font-size: 14px;
    line-height: 1.45;
    text-align: left;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
}

.afb-panel {
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    max-height: calc(100vh - 96px);
    overflow-y: auto;
}

@media (max-width: 599px) {
    .afb-editor,
    .afb-karte {
        left: 12px !important;
        right: 12px;
        top: auto !important;
        bottom: 72px;
        width: auto;
    }
}

.afb-kopf {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #6b6b7b;
}

.afb-bezug {
    margin-bottom: 10px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.afb-feld {
    display: block;
    width: 100%;
    min-height: 96px;
    padding: 10px;
    border: 1px solid #c9c9d3;
    border-radius: 8px;
    background: #fff;
    color: #1a1a2e;
    font: inherit;
    resize: vertical;
}

.afb-feld:focus {
    outline: 3px solid rgba(26, 26, 46, 0.25);
    border-color: #1a1a2e;
}

.afb-fehler {
    min-height: 0;
    margin-top: 6px;
    color: #b91c1c;
    font-size: 13px;
}

.afb-fehler:empty {
    display: none;
}

.afb-notiz {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.afb-antwort {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: #ecfdf3;
    color: #14532d;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.afb-datum {
    margin-top: 8px;
    font-size: 12px;
    color: #6b6b7b;
}

.afb-knoepfe {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.afb-btn {
    min-height: 36px;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.afb-btn--haupt {
    border: 0;
    background: #f97316;
    color: #1a1a2e;
}

.afb-btn--leise {
    border: 1px solid #c9c9d3;
    background: #fff;
    color: #1a1a2e;
}

.afb-leiste .afb-btn--leise {
    border-color: rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #fff;
}

.afb-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* --- Liste ------------------------------------------------------------ */
.afb-leer {
    color: #6b6b7b;
}

.afb-zeile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2px 10px;
    width: 100%;
    margin: 0;
    padding: 10px 6px;
    border: 0;
    border-top: 1px solid #eee;
    background: transparent;
    color: #1a1a2e;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.afb-zeile:hover {
    background: #f6f6f8;
}

.afb-zeile__nr {
    grid-row: span 4;
    font-weight: 800;
    color: #f97316;
}

/* Alle Textzeilen einer Notiz stehen in der zweiten Spalte. */
.afb-zeile > :not(.afb-zeile__nr) {
    grid-column: 2;
}

.afb-zeile--erledigt .afb-zeile__nr {
    color: #16a34a;
}

.afb-zeile__text {
    overflow-wrap: anywhere;
}

.afb-zeile__status {
    font-size: 12px;
    color: #6b6b7b;
}

/* --- Meldung ---------------------------------------------------------- */
.afb-meldung {
    position: fixed;
    left: 50%;
    bottom: 136px;
    transform: translateX(-50%);
    z-index: 2147483002;
    padding: 10px 16px;
    border-radius: 999px;
    background: #1a1a2e;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

/* --- Stellenangabe und Übersicht «Alle Notizen» ------------------------ */
.afb-stelle {
    margin-bottom: 6px;
    color: #555;
    font-size: 12px;
}

.afb-panel.afb-panel--alle {
    width: 560px;
}

.afb-gruppe {
    margin: 14px 0 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e2e2e2;
    color: #1a1a2e;
    font-size: 13px;
    font-weight: 800;
}

.afb-zeile__stelle,
.afb-zeile__antwort {
    display: block;
    margin-top: 2px;
    color: #555;
    font-size: 12px;
}

.afb-zeile__antwort {
    color: #17693a;
}
