/* ------------------------------------------------------------------
   1. TRIGGER BUTTON & FENSTER
   ------------------------------------------------------------------ */
#smrtbot-trigger {
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    width: 60px; 
    height: 60px;
    background-color: #000; 
    color: #fff; 
    border-radius: 50%; 
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2); 
    z-index: 99999;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: 24px; 
    transition: transform 0.3s;
    overflow: hidden; /* Wichtig für Bild */
}
#smrtbot-trigger:hover { 
    transform: scale(1.1); 
}

/* NEU: Bild im Trigger Button */
#smrtbot-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

#smrtbot-window {
    position: fixed; 
    bottom: 100px; 
    right: 30px; 
    width: 90vw; 
    max-width: 700px; 
    height: 75vh; 
    max-height: 850px; 
    background: #fff; 
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15); 
    display: none; 
    flex-direction: column;
    z-index: 99999; 
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #e0e0e0;
}

/* ------------------------------------------------------------------
   2. HEADER
   ------------------------------------------------------------------ */
#smrtbot-header {
    padding: 18px 25px; 
    background: #ffffff; 
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600; 
    font-size: 18px; 
    display: flex; 
    justify-content: space-between;
    align-items: center; 
    color: #333;
}
#smrtbot-close { 
    cursor: pointer; 
    font-size: 24px; 
    color: #888; 
    line-height: 1;
    margin-left: 15px;
}
.smrtbot-reset { 
    font-size: 13px; 
    color: #555; 
    cursor: pointer; 
    text-decoration: none; 
    background-color: #f0f0f0; 
    padding: 6px 12px;
    border-radius: 15px; 
    transition: background-color 0.2s;
    margin-right: 10px;
}

.smrtbot-reset:hover {
    background-color: #e0e0e0;
    color: #000;
}
/* Download Icon Hover Effekt */
#smrtbot-download:hover {
    color: #000 !important; /* Wird schwarz */
    transform: scale(1.1);
    transition: all 0.2s;
}

/* ------------------------------------------------------------------
   3. NACHRICHTEN BEREICH (Ohne Avatars)
   ------------------------------------------------------------------ */
#smrtbot-messages {
    flex: 1; 
    padding: 25px; 
    overflow-y: auto; 
    background: #ffffff;
    display: flex; 
    flex-direction: column; 
    gap: 15px; /* Abstand zwischen Blasen verringert, da kein Avatar mehr stört */
    scroll-behavior: smooth;
}

/* Basis Styling für Blasen */
.smrtbot-msg { 
    max-width: 85%; 
    padding: 14px 20px; 
    border-radius: 12px; 
    line-height: 1.6; 
    font-size: 16px; 
    word-wrap: break-word;
}

/* User Nachricht */
.smrtbot-msg.user { 
    align-self: flex-end; 
    background-color: #f3f3f3; 
    color: #1a1a1a; 
    border-bottom-right-radius: 4px; 
}

/* Bot Nachricht */
.smrtbot-msg.bot { 
    align-self: flex-start; 
    background-color: #fff; 
    color: #1a1a1a; 
    padding-left: 0; 
    padding-right: 0;
    margin-top: 0;
}

/* --- HIER WURDEN DIE AVATAR STYLES ENTFERNT --- */

/* ------------------------------------------------------------------
   4. MARKDOWN CONTENT
   ------------------------------------------------------------------ */
.smrtbot-msg p {
    margin: 0 0 10px 0;
}
.smrtbot-msg p:first-child { margin-top: 0; }
.smrtbot-msg p:last-child { margin-bottom: 0; }

.smrtbot-msg ul, .smrtbot-msg ol {
    margin: 5px 0 10px 0;
    padding-left: 20px;
}
.smrtbot-msg li { margin-bottom: 4px; }

.smrtbot-msg pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    font-family: Consolas, Monaco, monospace;
    font-size: 14px;
    margin: 10px 0;
    white-space: pre-wrap;
}
.smrtbot-msg code {
    font-family: monospace;
    background: rgba(0,0,0,0.06);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #d63384; 
}
.smrtbot-msg pre code {
    background: transparent;
    padding: 0;
    color: inherit;
}

.smrtbot-msg a {
    color: #0073aa;
    text-decoration: none;
}
.smrtbot-msg a:hover { text-decoration: underline; }

.smrtbot-msg strong, 
.smrtbot-msg b {
    font-weight: 700 !important;
    color: #000 !important;
}

.smrtbot-msg blockquote {
    border-left: 3px solid #ccc;
    margin: 5px 0;
    padding-left: 10px;
    color: #666;
    font-style: italic;
}

/* ------------------------------------------------------------------
   5. INPUT & CHIPS
   ------------------------------------------------------------------ */
#smrtbot-chips-area {
    padding: 10px 25px 0 25px; 
    background: #fff; 
    display: flex; 
    gap: 10px;
    overflow-x: auto; 
    white-space: nowrap; 
    scrollbar-width: none;
}
#smrtbot-chips-area::-webkit-scrollbar { display: none; }

.smrtbot-chip {
    background: #f0f0f0; 
    border: 1px solid #e0e0e0; 
    padding: 8px 16px;
    border-radius: 20px; 
    font-size: 14px; 
    cursor: pointer; 
    color: #333;
    transition: all 0.2s; 
    user-select: none;
}
.smrtbot-chip:hover { 
    background: #333; 
    color: #fff; 
    border-color: #333; 
}

#smrtbot-input-area { 
    padding: 15px 25px 30px 25px; 
    background: #fff; 
}
#smrtbot-input-wrapper {
    display: flex; 
    background: #f9f9f9; 
    border-radius: 30px; 
    padding: 8px 20px;
    align-items: center; 
    transition: border 0.2s; 
    border: 1px solid #e0e0e0;
}
#smrtbot-input-wrapper:focus-within { 
    border-color: #999; 
    background: #fff; 
}
#smrtbot-input { 
    flex: 1; 
    border: none; 
    background: transparent; 
    padding: 10px; 
    outline: none; 
    font-size: 16px; 
    color: #333; 
}
#smrtbot-send { 
    background: none; 
    border: none; 
    cursor: pointer; 
    color: #000; 
    font-weight: bold; 
    padding: 8px 12px; 
    font-size: 18px; 
    line-height: 1;
}

/* ------------------------------------------------------------------
   6. CURSOR ANIMATION
   ------------------------------------------------------------------ */
@keyframes smrtbot-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.smrtbot-msg.typing > :last-child::after {
    content: '';
    display: inline-block;
    width: 7px;
    height: 15px;
    background-color: #333;
    margin-left: 4px;
    vertical-align: -2px;
    animation: smrtbot-blink 1s infinite;
}