/* =========================================
   LAUNCHER BUTTON
========================================= */

#webvolv-ai-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 60px;
    height: 60px;
    border-radius: 999px;
    background: #ff007a;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100000;
    box-shadow: 0 12px 25px rgba(255, 0, 122, 0.5);
    font-size: 28px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#webvolv-ai-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(255, 0, 122, 0.6);
}


/* =========================================
   CHATWINDOW MIT CHECKBOX-TOGGLE
========================================= */

/* Grundlayout Chatfenster */
#webvolv-ai-chatbot {
    position: fixed;
    right: 24px;
    bottom: 100px;
    width: 360px;
    height: 450px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.25);
    padding: 18px 20px 16px;
    z-index: 99999;
    transition: opacity .25s ease, transform .25s ease;
  
  	display: flex;             /* NEU */
    flex-direction: column; 
	overflow: hidden;
}

/* STANDARD: VERSTECKT */
#webvolv-ai-toggle:not(:checked) ~ #webvolv-ai-chatbot {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* SICHTBAR: ANGEHAKT */
#webvolv-ai-toggle:checked ~ #webvolv-ai-chatbot {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#webvolv-ai-chatbot .wv-ai-form {
    margin-top: auto;          /* drückt die Form ganz nach unten */
}




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

#webvolv-ai-chatbot .chat-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Zeilenumbrüche für Bot-Antworten sichtbar machen */
.wv-ai-bot-message,
.webvolv-ai-bot-message,
.wv-ai-message,
.webvolv-ai-message,
.bot-message {
    white-space: pre-line;
}

/* Fett-Markierung für Markdown */
.wv-ai-message strong,
.webvolv-ai-message strong,
.wv-ai-bot-message strong,
.bot-message strong {
    font-weight: 700 !important;
    color: inherit;
}

/* =========================================
   MESSAGE LIST & BUBBLES – CLEAN
========================================= */

/* Nachrichten-Container */
#webvolv-ai-chatbot .wv-ai-messages {
    display: flex;
    flex-direction: column;   /* alles untereinander */
    gap: 8px;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 12px;
    padding-right: 6px;
}

/* Basis-Bubble für jede Nachricht */
#webvolv-ai-chatbot .wv-ai-message {
    display: inline-block;    /* Breite = Textbreite */
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    line-height: 1.4;
    font-size: 14px;
    word-wrap: break-word;
}

/* Bot – links, hellgrau */
#webvolv-ai-chatbot .wv-ai-message.wv-ai-bot {
    background: #f3f4f6;
    color: #111827;
    align-self: flex-start;
}

/* User – rechts, pink */
#webvolv-ai-chatbot .wv-ai-message.wv-ai-user {
    background: #ff007a;
    color: #ffffff;
    align-self: flex-end;
}



/* =========================================
   INPUT + SEND BUTTON
========================================= */

#webvolv-ai-chatbot .input-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

#webvolv-ai-chatbot input[type="text"] {
    flex: 1;
    border: 2px solid #111827;
    border-radius: 999px;
    padding: 10px 14px;
    font-size: 14px;
    outline: none;
    background: #ffffff;
    color: #111827;
}

#webvolv-ai-chatbot input::placeholder {
    color: #9ca3af;
}

#webvolv-ai-chatbot button.send-btn {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #ff007a;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 8px 18px rgba(255, 0, 122, 0.55);
    transition: 0.15s ease;
}

#webvolv-ai-chatbot button.send-btn:hover {
    transform: translateY(-1px);
    background: #ff1f8a;
    box-shadow: 0 12px 26px rgba(255, 0, 122, 0.7);
}

/* =========================================
   LAUNCHER HIDDEN
========================================= */

#webvolv-ai-launcher.hidden {
    display: none !important;
}

/* =========================================
   HEADER + CLOSE-PFEIL
========================================= */

#webvolv-ai-chatbot .wv-ai-header {
    position: relative;
    padding: 12px 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

#webvolv-ai-chatbot .wv-ai-title {
    font-size: 16px;
}

#webvolv-ai-chatbot .wv-ai-close {
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: inherit;
}

/* Close-Pfeil standardmäßig verstecken (Desktop) */
#webvolv-ai-chatbot .wv-ai-close {
    display: none;
}

/* =========================================
   MOBILE: VOLLBILD
========================================= */

@media (max-width: 768px) {
    #webvolv-ai-chatbot {
        position: fixed;
        inset: 0;
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        border-radius: 0;
        padding: 32px 20px 20px;
        box-shadow: none;
        z-index: 999999;
    }
}


#webvolv-ai-chatbot .wv-ai-close {
    display: block;
}

    /* Inhalt schön stretchen */
    #webvolv-ai-chatbot .wv-ai-messages {
        flex: 1;
        min-height: 0;
        overflow-y: auto;
        margin-bottom: 8px;
        padding-right: 4px;
    }

    #webvolv-ai-chatbot .wv-ai-form {
        display: flex;
        gap: 8px;
        margin-top: auto;
    }

    #webvolv-ai-chatbot input[type="text"] {
        font-size: 14px;
        padding: 8px 12px;
    }

    #webvolv-ai-chatbot button.send-btn {
        width: 46px;
        height: 46px;
        font-size: 16px;
        box-shadow: 0 6px 14px rgba(255, 0, 122, 0.5);
    }

    /* Launcher auf Handy bleibt unten rechts, aber wird per .hidden ausgeblendet */
    #webvolv-ai-launcher {
        width: 70px;
        height: 70px;
        right: 20px;
        bottom: 20px;
    }
}