/* ==========================================================================
   DER CHATBOT: RAHMEN & CONTAINER
   ========================================================================== */

/* Die Hauptbox im Layout */
.crazy-bot-section {
    background: #ffffff !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: visible !important; 
    margin-bottom: 2rem !important; 
}

/* Zentrierter innerer Container */
.crazy-bot-container {
    max-width: 800px;
    margin: 0 auto !important;
    text-align: center;
    padding: 1rem 0 2.5rem 0 !important; 
}

/* Header & Avatar */
.crazy-bot-header {
    margin-bottom: 2rem;
}

.crazy-bot-avatar {
    font-size: 3rem;
    display: inline-block;
    cursor: pointer;
    font-style: normal !important;
    transition: transform 0.1s ease;
    margin-bottom: 1rem;
}

/* Roboter-Zittern bei Hover */
.crazy-bot-container:hover .crazy-bot-avatar {
    animation: jitter 0.3s infinite linear;
}

@keyframes jitter {
    0% { transform: translate(0, 0) rotate(0deg); }
    20% { transform: translate(-2px, 1px) rotate(-1deg); }
    40% { transform: translate(1px, -1px) rotate(1deg); }
    60% { transform: translate(-1px, -2px) rotate(0deg); }
    80% { transform: translate(2px, 2px) rotate(1deg); }
    100% { transform: translate(0, 0) rotate(0deg); }
}

/* ==========================================================================
   CRAZY BOT EINGABEBOX (NEUES DESIGN & PULSIERENDER RAHMEN)
   ========================================================================== */

.crazy-input-wrapper {
    position: relative;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    text-align: left;
}

/* Neugestaltetes Eingabefeld */
#ai-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0; /* Scharfe Kanten */
    background: #ffffff;
    color: #111111;
    outline: none;
    font-family: inherit;
    font-style: normal;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

/* Nur den Rahmen/Shadow im Ruhezustand atmen lassen */
#ai-input:placeholder-shown:not(:focus) {
    animation: gentleBorderPulse 3s infinite ease-in-out;
}

/* Stoppt die Animation sofort beim Fokus oder Hover */
#ai-input:focus,
#ai-input:hover {
    animation: none;
    border-color: #18bfef;
    box-shadow: 0 0 0 1px #18bfef;
}

@keyframes gentleBorderPulse {
    0%, 100% {
        border-color: rgba(0, 0, 0, 0.2);
        box-shadow: 0 0 0 0 rgba(24, 191, 239, 0);
    }
    50% {
        border-color: rgba(24, 191, 239, 0.6);
        box-shadow: 0 0 12px rgba(24, 191, 239, 0.25);
    }
}

/* ==========================================================================
   RESPONSE BOX & CONTENT FORMATIERUNG
   ========================================================================== */

.crazy-response-box {
    font-family: inherit !important;
    font-size: 1.05rem !important;
    font-weight: normal !important;
    font-style: normal !important; 
    text-transform: none !important;
    line-height: 1.6 !important;
    color: #1e252d;
    min-height: 80px;
    display: block;
    text-align: left;
    overflow: visible !important;
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 0; /* Scharfe Ecken analog zum Gesamtdesign */
    word-break: normal !important;
    white-space: normal !important; 
}

.crazy-response-box ul {
    margin-bottom: 1rem;
}

.crazy-response-box strong {
    font-weight: 700 !important;
    color: #1e252d !important;
}

.crazy-response-box em {
    font-style: italic !important;
}

.crazy-response-box li {
    list-style-type: disc !important;
    margin-left: 1.5rem !important;
    margin-top: 0.3rem !important;
    margin-bottom: 0.3rem !important;
    line-height: 1.5 !important;
    display: list-item !important;
    text-align: left !important;
}

.crazy-response-box li:first-of-type {
    margin-top: 1.2rem !important; 
}

/* Smartphone-Optimierung */
@media screen and (max-width: 736px) {
    .crazy-bot-section {
        padding: 2.5rem 1.5rem !important;
    }
    #ai-input {
        font-size: 1rem !important;
    }
    .crazy-response-box {
        font-size: 1rem !important;
        padding: 1rem;
        text-align: left;
    }
}