:root {
    --faqchat-primary: #004b9b;
    --faqchat-user: #e5f1ff;
    --faqchat-bot: #f2f2f2;
}

/* =========================================
   CHAT-WIDGET (Container)
   ========================================= */

#faqchat-widget {
    position: fixed;
    right: 20px;
    bottom: 80px;
    z-index: 99999;
    width: 320px;
    height: 420px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    overflow: hidden;
    max-width: 100%;
    max-height: calc(100% - 120px);
}

/* Falls du später mit Klassen arbeiten willst:
#faqchat-widget.faqchat-bottom-left {
    right: auto;
    left: 20px;
}
*/

/* =========================================
   HEADER
   ========================================= */

.faqchat-header {
    background: var(--faqchat-primary);
    color: #122F4E!important;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faqchat-header-title {
    display: flex;
    flex-direction: column;
}

.faqchat-header-title-main {
    font-size: 16px!important;
    font-weight: 600;
}

.faqchat-header-title-sub {
    font-size: 12px!important;
    opacity: 0.85;
    margin-top: 2px;
}

.faqchat-header-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.faqchat-clear,
.faqchat-close {
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
}

.faqchat-clear {
    font-size: 15px;
}

.faqchat-close {
    font-size: 18px;
}

/* =========================================
   BODY / INHALT
   ========================================= */

.faqchat-body {
    flex: 1;
    min-height: 0;              /* <<< WICHTIG für mobiles Scrollen (v.a. iOS) */
    overflow-y: auto;
    padding: 8px;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =========================================
   HÄUFIGE FRAGEN (FAQ-LISTE)
   ========================================= */

.faqchat-faq-list {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 6px;
}

.faqchat-faq-header {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #555;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.faqchat-faq-toggle-icon {
    font-size: 11px;
    color: #777;
}

.faqchat-faq-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 120px;
    overflow-y: auto;
}

.faqchat-faq-items button {
    text-align: left;
    width: 100%;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    background: #f5f5f5;
    color: #333;
}

.faqchat-faq-items button:hover {
    background: #e6eef9;
}

/* =========================================
   VORSCHLÄGE (AUTO-SUGGESTIONS)
   ========================================= */

.faqchat-suggestions {
    font-size: 11px;
    color: #555;
    display: none; /* per JS auf "flex" gestellt */
    flex-direction: column;
    gap: 4px;
    max-height: 220px!important;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    padding: 4px;
}

.faqchat-suggestions-title {
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
}

.faqchat-suggestion-button {
    text-align: left;
    width: 100%;
    border: none;
    padding: 4px 6px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    background: #f5f5f5;
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.faqchat-suggestion-button:hover {
    background: #e6eef9;
}

.faqchat-suggestion-label {
    font-size: 11px;
    font-weight: 600;
}

.faqchat-suggestion-snippet {
    font-size: 10px;
    color: #666;
    margin-top: 1px;
}

.faqchat-suggestion-meta {
    font-size: 10px;
    color: #999;
    margin-top: 1px;
}

/* =========================================
   MESSAGES
   ========================================= */

.faqchat-messages {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.faqchat-info-message {
    align-self: flex-start;
    font-size: 11px;
    color: #777;
    margin-top: -2px;
    margin-bottom: 4px;
    max-width: 90%;
}

/* Die eigentlichen Bubbles werden weiterhin per JS gestylt,
   du kannst hier aber zusätzliche Klassen ergänzen, falls
   du später von Inline-Styles weg willst. */

/* =========================================
   FOOTER / INPUT
   ========================================= */

.faqchat-footer {
    display: flex;
    border-top: 1px solid #ddd;
    background: #fff;
}

.faqchat-input {
    flex: 1;
    border: none;
    padding: 8px;
    font-size: inherit;
    outline: none;
    background: #fff;
}

.faqchat-send {
    background: var(--faqchat-primary);
    color: #fff;
    border: none;
    padding: 0 12px;
    cursor: pointer;
    font-size: 14px;
}

/* =========================================
   TOGGLE-BUTTON (Öffnen/Schließen)
   ========================================= */

#faqchat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    background: var(--faqchat-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 999px;
    padding: 8px 14px;
}

/* Runde Variante – die eigentliche Breite/Höhe
   kommen zusätzlich aus dem inline-style (Backend-Einstellung) */
#faqchat-toggle.faqchat-round {
    border-radius: 50%;
    padding: 0;
}

/* Linke Position – optional, JS setzt aktuell left/right inline */
#faqchat-toggle.faqchat-bottom-left {
    right: auto;
    left: 20px;
}

/* Icon im Toggle */
#faqchat-toggle img {
    border-radius: 50%;
    object-fit: contain;
}
/* Standard: Scrollen auf der gesamten Seite immer erlaubt */
body {
    overflow: auto !important;
}

/* Nur wenn Chat offen und auf Mobile sperren */
@media (max-width: 600px) {
    body.faqchat-lock {
        overflow: hidden !important;
        touch-action: none; /* verhindert, dass Safari die Seite verschiebt */
    }
}
/****** Vollbild-Chatfenster kleinen Displays (max 600px Breite) *****/
@media (max-width: 600px) {
    #faqchat-widget {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw !important;
        height: 100vh !important;
        max-width: none;
        max-height: none;
        border-radius: 0;

    }

  /* Reihenfolge festlegen: Header (1), Footer/Eingabe (2), Body/Verlauf (3) */
    .faqchat-header {
        order: 1;
        position: sticky;
        top: 0;
        z-index: 3;
    }

    .faqchat-footer {
        order: 2;
        position: sticky;
        /* Abstand direkt unter dem Header – bei Bedarf anpassen (z.B. 64px oder 72px) */
        top: 56px;
        z-index: 3;
        background: #ffffff;
        border-bottom: 1px solid #ddd;
    }

    .faqchat-body {
        order: 3;
        flex: 1;
        overflow-y: auto;
        /* kleiner Abstand unterhalb des Eingabefelds */
        padding-top: 128px;
    }
    .faqchat-send {background:#000!important;}
        /* WICHTIG: Eingabefeld groß genug, damit iOS nicht zoomt */
    .faqchat-input {
        font-size: 16px !important;
        line-height: 1.4;
    }

    /* Optional: Send-Button optisch anpassen, damit es zusammenpasst */
    .faqchat-send {
        font-size: 16px;
        padding: 0 14px;
    }

    /* Falls du irgendwo global 14px vererbst, hier leicht anheben */
    #faqchat-widget {
        font-size: 16px;
    }
    .faqchat-suggestions {
    max-height: 180px!important;

}
.faqchat-header {padding:2px 12px!important;}
button {line-height: 22px!important;}

}
body.faqchat-lock {
    overflow: hidden !important;
    touch-action: none;
}
/* Sprechblase */
. welcome-bubble-head {
    font-family: 'Uni Neue' !important;
    font-weight: 700;
    font-size: 14px;
    color: #122F4E;
}

.welcome-bubble {
    font-family: 'Uni Neue Book';
  font-size: 13px;
  color: #333;
}



#faqchat-welcome-bubble {
    animation: faqchatFadeIn 0.4s ease-out forwards;
    
        position: fixed;
        bottom: 90px;
        right: 90px;
        background: #ffffff;
        
        padding: 10px 14px;
        border-radius: 12px 12px 12px 12px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.35);
        max-width: 220px;
        display: none;
        z-index: 99998;
}
/* lange Papier-Spitze unten rechts */
#faqchat-welcome-bubble::after {
    content: "";
    position: absolute;
    bottom: -26px;       /* Abstand unterhalb der Blase */
    right: 22px;         /* horizontaler Versatz */
    width: 36px;         /* Länge der Falte */
    height: 26px;        /* Höhe der Falte */
    
       background: linear-gradient(
        190deg,
        #ffffff 0%,
        #f7f7f7 60%,
        #eaeaea 100%
    );

    clip-path: polygon(100% 0, 0 0, 100% 100%); /* Dreieckige Form */
    
    box-shadow: 0 4px 10px rgba(0,0,0,0.18);/* kleine Oberkante für die Papier-Falte */
#faqchat-welcome-bubble::before {
    content: "";
    position: absolute;
    bottom: -8px;
    right: 22px;

    width: 22px;
    height: 14px;

    background: #ffffff;
    clip-path: polygon(0 0, 100% 0, 0 100%);
    opacity: 0.8;
}
}



@keyframes faqchatFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes faqchatFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* Mobile: Bubble woanders platzieren */
@media (max-width: 600px) {
    #faqchat-welcome-bubble {
        right: 40px !important;
        bottom: 110px !important;
        font-size: 13px;
        max-width: 180px;
    }
}



