/*
 * Live-Chat – Shop-Widget (.sgc-*) und Backend-Eckfenster (.sgcb-*).
 *
 * Bewusst eine eigene Datei statt eines Anhangs an style.css: Der Chat ist
 * optional und soll nur geladen werden, wenn er wirklich erscheint (siehe
 * chat_widget_zeigen()), und der ?v=filemtime-Cachebrecher soll bei einer
 * Chat-Änderung nicht das komplette Shop-Stylesheet ungültig machen.
 *
 * Beide Bereiche liegen zusammen, damit die Chat-Optik an genau einer Stelle
 * wohnt – der Backend-Teil wird von includes/admin_footer.php geladen.
 */

/* ============================================================
   1. Shop-Widget
   ============================================================ */

.sgc {
    /* Unter der Wartungsleiste (z-index 99999), aber über allem anderen. */
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9990;
    font-family: var(--f-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
}

/* Läuft der Wartungsmodus, klebt dessen Leiste am unteren Rand (siehe
   wartung_hinweis_einfuegen()) – der Chat-Knopf weicht ihr aus, statt sich
   dahinter zu verstecken. Als Klasse am Widget selbst, nicht am <body>: Das
   Widget wird erst nachträglich vor </body> eingespleißt, an das
   body-Element kommt es zu diesem Zeitpunkt nicht mehr heran. */
.sgc.sgc-tief {
    bottom: 84px;
}

.sgc-knopf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 20px;
    border: none;
    border-radius: 999px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .24);
    transition: transform .14s ease, box-shadow .14s ease;
}

.sgc-knopf:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}

.sgc-knopf:active {
    transform: translateY(0);
}

.sgc-knopf:focus-visible {
    outline: 3px solid var(--c-amber, #f0b429);
    outline-offset: 3px;
}

.sgc-knopf-symbol {
    width: 21px;
    height: 21px;
    flex: none;
}

.sgc-ungelesen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--c-signal, #c8102e);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.sgc-fenster {
    display: none;
    flex-direction: column;
    width: 350px;
    max-width: calc(100vw - 40px);
    height: 470px;
    max-height: calc(100vh - 120px);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 44px rgba(0, 0, 0, .26);
    overflow: hidden;
}

.sgc.offen .sgc-fenster {
    display: flex;
}

.sgc.offen .sgc-knopf {
    display: none;
}

/* Vergrößern (assets/js/chat.js, sgChatVergroessern): doppelte Größe auf
   Klick, weiterhin innerhalb des Viewports begrenzt (dieselben max-width/
   max-height wie oben) statt starr auf 700×940 – sonst liefe die Fläche auf
   schmalen/kurzen Fenstern über den Rand hinaus. */
.sgc.gross .sgc-fenster {
    width: 700px;
    height: 940px;
}

.sgc-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
}

/* flex:1 statt justify-content:space-between am Kopf – sonst wanderte der
   neue Vergrößern-Knopf zwischen Titel und Schließen-Knopf statt daneben. */
.sgc-kopf-titel {
    flex: 1;
    min-width: 0;
    font-size: 14.5px;
    font-weight: 600;
}

.sgc-vergroessern {
    display: inline-flex;
    padding: 4px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}

.sgc-vergroessern svg {
    width: 17px;
    height: 17px;
}

.sgc-vergroessern:hover {
    background: rgba(255, 255, 255, .26);
}

.sgc-vergroessern[aria-pressed="true"] {
    background: rgba(255, 255, 255, .32);
}

.sgc-schliessen {
    display: inline-flex;
    padding: 4px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    cursor: pointer;
}

.sgc-schliessen svg {
    width: 17px;
    height: 17px;
}

.sgc-schliessen:hover {
    background: rgba(255, 255, 255, .26);
}

.sgc-koerper {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f6f7f9;
}

.sgc-begruessung {
    margin: 0 0 14px;
    color: #55606d;
    font-size: 14px;
    line-height: 1.55;
}

/* ---------- Vorab-Formular ---------- */

.sgc-start {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
    background: #f6f7f9;
}

.sgc-feld {
    display: block;
    margin-bottom: 11px;
}

.sgc-feld>span {
    display: block;
    margin-bottom: 4px;
    color: #3c4753;
    font-size: 12.5px;
    font-weight: 600;
}

.sgc-feld em {
    color: #7b8794;
    font-style: normal;
    font-weight: 400;
}

.sgc-feld input,
.sgc-feld textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #d3d8dd;
    border-radius: 8px;
    background: #fff;
    color: #1f2933;
    font: inherit;
    font-size: 14px;
    resize: vertical;
}

.sgc-feld input:focus,
.sgc-feld textarea:focus,
.sgc-eingabe textarea:focus {
    border-color: var(--c-navy, #1b2a4a);
    outline: 2px solid rgba(27, 42, 74, .16);
    outline-offset: 0;
}

/* Der Honigtopf muss für Menschen unerreichbar sein, für Skripte aber wie
   ein normales Feld aussehen – deshalb aus dem Bild geschoben statt
   display:none (Muster: shop/kontakt.php). */
.sgc-honigtopf {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.sgc-zustimmung {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 4px 0 13px;
    color: #55606d;
    font-size: 12px;
    line-height: 1.5;
}

.sgc-zustimmung input {
    margin-top: 2px;
    flex: none;
}

.sgc-zustimmung a {
    color: var(--c-navy, #1b2a4a);
}

.sgc-absenden {
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
    font: inherit;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
}

.sgc-absenden:hover:not(:disabled) {
    background: #16223c;
}

.sgc-absenden:disabled {
    opacity: .6;
    cursor: default;
}

.sgc-fehler {
    margin: 10px 0 0;
    color: #b3121f;
    font-size: 13px;
    line-height: 1.45;
}

/* ---------- Nachrichten ---------- */

.sgc-zeile {
    display: flex;
    margin-bottom: 10px;
}

.sgc-zeile.von-kunde {
    justify-content: flex-end;
}

.sgc-blase {
    max-width: 78%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.von-kunde .sgc-blase {
    border-bottom-right-radius: 4px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
}

.von-mitarbeiter .sgc-blase {
    border: 1px solid #e2e6ea;
    border-bottom-left-radius: 4px;
    background: #fff;
    color: #1f2933;
}

.sgc-absender {
    display: block;
    margin-bottom: 2px;
    color: #7b8794;
    font-size: 11.5px;
    font-weight: 600;
}

.sgc-zeit {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    opacity: .65;
}

/* Systemzeilen: schmal, mittig, unaufdringlich – sie sind Beiwerk. */
.sgc-zeile.von-system {
    justify-content: center;
}

.sgc-zeile.von-system .sgc-blase {
    max-width: 92%;
    background: transparent;
    color: #7b8794;
    font-size: 12px;
    text-align: center;
}

/* ---------- Eingabe ---------- */

.sgc-fuss {
    border-top: 1px solid #e4e7ea;
    background: #fff;
}

.sgc-eingabe {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
}

.sgc-eingabe textarea {
    flex: 1;
    max-height: 120px;
    padding: 9px 12px;
    border: 1px solid #d3d8dd;
    border-radius: 18px;
    font: inherit;
    font-size: 14px;
    line-height: 1.45;
    resize: none;
    overflow-y: auto;
}

.sgc-bildknopf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #7b8794;
    cursor: pointer;
}

.sgc-bildknopf svg {
    width: 20px;
    height: 20px;
}

.sgc-bildknopf:hover {
    background: #eef1f4;
    color: var(--c-navy, #1b2a4a);
}

.sgc-bildknopf:disabled {
    opacity: .4;
    cursor: default;
}

/* Bilder in Nachrichtenblasen: feste Größe erst, wenn sie geladen sind –
   die Maße kommen aus der Datenbank, damit der Verlauf beim Nachladen nicht
   springt. */
.sgc-bild,
.sgcb-bild {
    display: block;
    max-width: 100%;
    max-height: 220px;
    width: auto;
    height: auto;
    margin-top: 4px;
    border-radius: 8px;
    background: rgba(0, 0, 0, .05);
    cursor: zoom-in;
}

.sgc-bild-laedt {
    display: block;
    min-width: 120px;
    padding: 18px 0;
    color: #7b8794;
    font-size: 12px;
    text-align: center;
}

/* ---------- Produktkarte (Kundenseite) ---------- */

.sgc-produkt {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 8px;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    background: #fff;
    color: #1f2933;
    text-decoration: none;
}

.sgc-produkt:hover {
    border-color: var(--c-navy, #1b2a4a);
}

/* In der dunklen Kundenblase muss die Karte hell bleiben, sonst verschwindet
   sie im Hintergrund. */
.von-kunde .sgc-produkt {
    color: #1f2933;
}

.sgc-produkt-bild {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 6px;
    object-fit: cover;
    background: #f1f3f5;
}

.sgc-produkt-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.sgc-produkt-name {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sgc-produkt-preis {
    color: var(--c-signal, #c8102e);
    font-size: 13.5px;
    font-weight: 700;
}

.sgc-produkt-mehr {
    color: #7b8794;
    font-size: 11.5px;
}

.sgc-senden {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: none;
    border: none;
    border-radius: 50%;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
    cursor: pointer;
}

.sgc-senden svg {
    width: 18px;
    height: 18px;
}

.sgc-senden:hover:not(:disabled) {
    background: #16223c;
}

.sgc-senden:disabled {
    opacity: .45;
    cursor: default;
}

.sgc-beenden {
    display: block;
    width: 100%;
    padding: 7px;
    border: none;
    border-top: 1px solid #eef0f2;
    background: transparent;
    color: #7b8794;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.sgc-beenden:hover {
    color: var(--c-signal, #c8102e);
}

@media (max-width: 480px) {
    .sgc {
        right: 12px;
        bottom: 12px;
    }

    .sgc-fenster {
        width: calc(100vw - 24px);
        height: calc(100vh - 90px);
    }
}

/* ---------- Wo der schwebende Knopf stört ----------
   Das Chatfenster selbst ist nie betroffen: Wer es geöffnet hat (.offen),
   sieht es immer. Es geht nur um den Knopf, der über Inhalten liegt. */

/* Gestalter offen (Overlay auf der Artikelseite, .sg-overlay.offen): kein
   Knopf über der Gestaltung. Der Gestalter hat dafür einen eigenen
   Chat-Knopf in seiner Werkzeugleiste, der dieses Fenster öffnet (siehe
   "Gestalter" in assets/js/chat.js). Das Fenster liegt mit z-index 9990
   über dem Overlay (120). */
body:has(.sg-overlay.offen) .sgc:not(.offen) {
    display: none;
}

/* Nur das Symbol: im Warenkorb und in der Kasse (Klasse vom Server, siehe
   chat_widget_einfuegen()) und auf dem Handy überall. */
.sgc.sgc-klein .sgc-knopf-text {
    display: none;
}

.sgc.sgc-klein .sgc-knopf {
    padding: 13px;
}

.sgc .sgc-ungelesen {
    flex: 0 0 auto;
}

@media (max-width: 760px) {
    .sgc {
        transition: transform .22s ease, opacity .22s ease;
    }

    .sgc .sgc-knopf-text {
        display: none;
    }

    .sgc-knopf {
        padding: 13px;
    }

    /* Beim Runterscrollen weg, beim Hochscrollen wieder da (Klasse setzt
       assets/js/chat.js) – wer liest, braucht den Knopf nicht, wer sucht,
       scrollt ohnehin zurück. */
    .sgc.sgc-versteckt:not(.offen) {
        transform: translateY(calc(100% + 24px));
        opacity: 0;
        pointer-events: none;
    }

    /* Warenkorb und Kasse: auf dem Handy liegen unten Summe und "Zur Kasse"
       – dort gar kein Knopf. */
    .sgc.sgc-kasse:not(.offen) {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sgc {
        transition: none;
    }
}

/* ============================================================
   2. Backend-Chat: Navbar-Einstieg + Flyout-Panel
   ============================================================
   Bewusst NICHT auf .adm-modal-overlay aufgebaut: assets/js/admin_modal.js
   setzt dort body.adm-modal-offen { overflow: hidden } und schließt per ESC
   jedes offene Overlay. Für ein Panel, neben dem weitergearbeitet wird, ist
   beides falsch.

   Ruhezustand ist bewusst nur ein kleiner Textknopf in der Navbar (siehe
   includes/admin_header.php, .admin-navbar-rechts) – kein dauerhaft
   sichtbares Eckfenster mehr, das im Produktivbetrieb störte. Das Panel
   darunter öffnet erst auf Klick oder automatisch bei einem neuen
   Kunden-Chat (siehe assets/js/admin_chat.js, panelOeffnen()).
*/

.sgcb {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: var(--f-body, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif);
}

/* [hidden] MUSS hier explizit gewinnen: Jede Klasse mit einer eigenen
   display-Angabe schlägt sonst die UA-Regel [hidden]{display:none}, weil
   Autor-Regeln unabhängig von der Spezifität immer vor Browser-Vorgaben
   kommen – das Element bliebe trotz hidden-Attribut/-Property sichtbar
   (betraf hier .sgcb, .sgcb-panel und .sgcb-zahl, alle per JS umgeschaltet). */
.sgcb[hidden],
.sgcb-panel[hidden],
.sgcb-zahl[hidden] {
    display: none;
}

.sgcb-navknopf {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    font: inherit;
}

/* Wartender Kunden-Chat: derselbe Signalton wie die übrigen Backend-Badges
   (siehe .badge in includes/admin_header.php), damit "hier ist etwas offen"
   überall gleich aussieht – amber für den Knopftext, weil Signalrot auf dem
   dunklen Navy-Hintergrund der Navbar zu wenig Kontrast hätte. */
.sgcb-navknopf.hat-neue {
    color: var(--c-amber, #f0b429);
}

.sgcb-navknopf.hat-neue .sgcb-zahl {
    background: var(--c-signal, #c8102e);
    color: #fff;
}

.sgcb-zahl {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: rgba(233, 236, 243, .22);
    color: inherit;
    font-size: 11px;
    font-weight: 700;
}

/* ---------- Flyout-Panel (Liste + Gesprächsfenster zusammen) ---------- */

.sgcb-panel {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    max-width: calc(100vw - 24px);
    max-height: calc(100vh - 90px);
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
    overflow-y: auto;
}

.sgcb-panel-kopf {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 10px 9px 14px;
    border-bottom: 1px solid #eceff1;
    background: #f7f8fa;
    font-size: 12.5px;
    /* Bleibt beim Scrollen des Panels sichtbar – der Minimieren-Knopf muss
       auch bei langer Liste/mehreren Fenstern erreichbar bleiben. */
    position: sticky;
    top: 0;
    z-index: 1;
}

.sgcb-schalter {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #55606d;
    cursor: pointer;
}

.sgcb-schalter input {
    margin: 0;
}

.sgcb-vollseite {
    color: var(--c-navy, #1b2a4a);
    text-decoration: none;
    font-weight: 600;
}

.sgcb-vollseite:hover {
    text-decoration: underline;
}

.sgcb-minimieren {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: none;
    border: none;
    border-radius: 6px;
    background: #eceff1;
    color: #55606d;
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
}

.sgcb-minimieren:hover {
    background: #dfe3e8;
    color: #1f2933;
}

/* ---------- Liste ---------- */

.sgcb-liste {
    width: 380px;
    max-height: 320px;
    overflow-y: auto;
    border-bottom: 1px solid #eceff1;
    height: 100px;
}

.sgcb-liste-koerper {
    overflow-y: auto;
}

.sgcb-eintrag {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: none;
    border-bottom: 1px solid #f0f2f4;
    background: none;
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.sgcb-eintrag:hover {
    background: #f6f8fa;
}

.sgcb-eintrag-kopf {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 2px;
}

.sgcb-eintrag-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #1f2933;
}

.sgcb-marke {
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef1f4;
    color: #55606d;
    font-size: 11px;
    font-weight: 600;
}

.sgcb-marke.wartet {
    background: #fff1d6;
    color: #8a5a00;
}

.sgcb-marke.neu {
    background: var(--c-signal, #c8102e);
    color: #fff;
}

.sgcb-eintrag-text {
    color: #7b8794;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgcb-leer {
    padding: 18px 12px;
    color: #7b8794;
    font-size: 13px;
    text-align: center;
}

/* ---------- Gesprächsfenster ---------- */

.sgcb-fenster-reihe {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    overflow-x: auto;
}

.sgcb-fenster-reihe:empty {
    display: none;
}

.sgcb-fenster {
    display: flex;
    flex-direction: column;
    width: 700px;
    height: 940px;
    flex: none;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
}

.sgcb-fenster-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
}

.sgcb-fenster-titel {
    flex: 1;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sgcb-fenster-shop {
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    font-size: 11px;
    font-weight: 600;
}

.sgcb-fenster-knopf {
    display: inline-flex;
    padding: 3px 6px;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, .14);
    color: #fff;
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.sgcb-fenster-knopf:hover {
    background: rgba(255, 255, 255, .28);
}

.sgcb-verlauf {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px;
    background: #f6f7f9;
}

/* Nachrichtenblasen: spiegelbildlich zum Shop – hier steht der MITARBEITER
   rechts, denn aus dieser Sicht ist er "ich". */
.sgcb-zeile {
    display: flex;
    margin-bottom: 8px;
}

.sgcb-zeile.von-mitarbeiter {
    justify-content: flex-end;
}

.sgcb-zeile.von-system {
    justify-content: center;
}

.sgcb-blase {
    max-width: 80%;
    padding: 7px 11px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.von-mitarbeiter .sgcb-blase {
    border-bottom-right-radius: 4px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
}

.von-kunde .sgcb-blase {
    border: 1px solid #e2e6ea;
    border-bottom-left-radius: 4px;
    background: #fff;
    color: #1f2933;
}

.von-system .sgcb-blase {
    max-width: 92%;
    background: transparent;
    color: #7b8794;
    font-size: 11.5px;
    text-align: center;
}

.sgcb-zeit {
    display: block;
    margin-top: 2px;
    font-size: 10.5px;
    opacity: .65;
}

.sgcb-eingabe {
    display: flex;
    align-items: flex-end;
    gap: 7px;
    padding: 9px 10px;
    border-top: 1px solid #e4e7ea;
    background: #fff;
}

.sgcb-eingabe textarea {
    flex: 1;
    max-height: 100px;
    padding: 7px 10px;
    border: 1px solid #d3d8dd;
    border-radius: 16px;
    font: inherit;
    font-size: 13.5px;
    line-height: 1.4;
    resize: none;
}

.sgcb-eingabe textarea:focus {
    border-color: var(--c-navy, #1b2a4a);
    outline: 2px solid rgba(27, 42, 74, .16);
}

.sgcb-senden {
    padding: 7px 13px;
    border: none;
    border-radius: 16px;
    background: var(--c-navy, #1b2a4a);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.sgcb-senden:hover {
    background: #16223c;
}

.sgcb-bildknopf {
    padding: 6px 10px;
    background: #eef1f4;
    color: #55606d;
    font-size: 15px;
}

.sgcb-bildknopf:hover {
    background: #e2e6ea;
}

.sgcb-bildknopf:disabled {
    opacity: .45;
    cursor: default;
}

/* ---------- Produktkarte und Artikelauswahl (Backend) ---------- */

.sgcb-produkt {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .16);
    font-size: 12.5px;
}

.von-kunde .sgcb-produkt {
    background: #f1f3f5;
}

.sgcb-produkt img {
    width: 34px;
    height: 34px;
    border-radius: 5px;
    object-fit: cover;
    flex: none;
}

.sgcb-artikelwahl {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 52px;
    max-height: 260px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #dfe3e8;
    background: #fff;
    box-shadow: 0 -6px 20px rgba(0, 0, 0, .12);
}

/* Die Auswahl legt sich über den Verlauf – dafür braucht das Fenster einen
   Bezugspunkt. */
.sgcb-fenster {
    position: relative;
}

.sgcb-artikelsuche {
    margin: 8px;
    padding: 7px 10px;
    border: 1px solid #d3d8dd;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
}

.sgcb-artikelliste {
    overflow-y: auto;
    padding: 0 8px 8px;
}

.sgcb-artikel {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 7px 8px;
    border: none;
    border-radius: 6px;
    background: none;
    text-align: left;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.sgcb-artikel:hover {
    background: #f1f4f7;
}

.sgcb-artikel-name {
    font-weight: 600;
    color: #1f2933;
}

.sgcb-artikel-info {
    color: #7b8794;
    font-size: 12px;
    white-space: nowrap;
}

.sgcb-hinweis {
    padding: 9px 12px;
    border-top: 1px solid #e4e7ea;
    background: #fafbfc;
    color: #7b8794;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 720px) {

    /* Auf schmalen Backends nur ein Fenster und dieses in voller Breite –
       zwei nebeneinander wären dort ohnehin unbedienbar. .sgcb-panel bleibt
       am Knopf verankert (position: absolute, siehe Grundregel oben) und
       schrumpft über max-width: calc(100vw - 24px) automatisch mit. */
    .sgcb-fenster {
        width: 100%;
    }

    .sgcb-fenster-reihe>.sgcb-fenster:not(:last-child) {
        display: none;
    }

    .sgcb-liste {
        width: 100%;
    }
}