/**
 * Aguto Chatbot Default Styles
 * 
 * @package AgutoChatbot
 * @since 0.5
 */

#aguto-chatbot,
.aguto-chatbot {
    max-width: 1200px;
    margin: 30px auto;
    font-family: system-ui, sans-serif;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 320px;
    max-height: 90vh;
    height: auto;
}

#aguto-chatbot-messages,
.aguto-chatbot-messages {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    background: #f7f7fa;
    border-radius: 14px 14px 0 0;
    padding: 18px;
}

#aguto-chatbot-form,
.aguto-chatbot-form {
    display: flex;
    border-top: 1px solid #eee;
    background: #fafbfc;
    border-radius: 0 0 14px 14px;
    padding: 12px;
    flex-shrink: 0;
}

#aguto-chatbot-input,
.aguto-chatbot-input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 7px;
    padding: 10px;
    font-size: 16px;
    margin-right: 10px;
    background: #f7f7fa;
    transition: border 0.2s;
}

#aguto-chatbot-input:focus,
.aguto-chatbot-input:focus {
    border-color: #0073aa;
    outline: none;
}

#aguto-chatbot-form button,
.aguto-chatbot-send {
    background: linear-gradient(135deg,#0073aa 60%,#00b4d8 100%);
    color: #fff;
    border: none;
    border-radius: 7px;
    padding: 10px 18px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: bold;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

#aguto-chatbot-form button:hover,
.aguto-chatbot-send:hover {
    background: linear-gradient(135deg,#005177 60%,#0096c7 100%);
}

.aguto-chatbot-msg {
    margin-bottom: 14px;
    display: flex;
    align-items: flex-end;
}

.aguto-chatbot-msg.user {
    flex-direction: row-reverse;
}

.aguto-chatbot-avatar {
    width: 36px; 
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg,#0073aa 60%,#00b4d8 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 12px;
    font-size: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
}

.aguto-chatbot-avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: block;
}

.aguto-chatbot-bubble {
    background: #fff;
    border-radius: 18px;
    padding: 12px 16px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    max-width: 75%;
    word-break: break-word;
    font-size: 15px;
    position: relative;
}

.aguto-chatbot-msg.user .aguto-chatbot-avatar {
    display: none;
}

.aguto-chatbot-msg.user .aguto-chatbot-bubble {
    margin-left: auto;
}

.aguto-chatbot-msg.bot .aguto-chatbot-bubble {
    background: #fff;
    color: #222;
}

.aguto-chatbot-msg.user .aguto-chatbot-bubble:after {
    content: "";
    position: absolute;
    right: -10px; 
    bottom: 10px;
    border-width: 8px 0 8px 10px;
    border-style: solid;
    border-color: transparent transparent transparent #e6f0ff;
}

.aguto-chatbot-msg.bot .aguto-chatbot-bubble:after {
    content: "";
    position: absolute;
    left: -10px; 
    bottom: 10px;
    border-width: 8px 10px 8px 0;
    border-style: solid;
    border-color: transparent #fff transparent transparent;
}

.aguto-chatbot-sources {
    font-size: 12px;
    color: #888;
    margin: 8px 0px 8px 48px;
    display: none;
}

.aguto-chatbot-sources-list {
    margin: 0;
    padding-left: 18px;
}

.aguto-chatbot-loading-dots {
    display: inline-block;
    width: 32px;
    text-align: left;
}

.aguto-chatbot-loading-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 3px;
    background: #0073aa;
    border-radius: 50%;
    animation: aguto-bounce 1.4s infinite both;
}

.aguto-chatbot-loading-dots span:nth-child(2) { 
    animation-delay: .2s; 
}

.aguto-chatbot-loading-dots span:nth-child(3) { 
    animation-delay: .4s; 
}

.aguto-chatbot-error {
    color: red;
}

.aguto-chatbot-privacy-box {
    max-width: 400px;
    margin: 30px auto;
    padding: 18px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.09);
}

.aguto-chatbot-privacy-textbox {
    max-height: 160px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    background: #f9f9fb;
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.aguto-chatbot-privacy-links {
    font-size: 12px;
    color: #888;
    margin-bottom: 10px;
}

.aguto-chatbot-privacy-link {
    color: #0073aa;
    text-decoration: underline;
}

.aguto-chatbot-privacy-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}

.aguto-chatbot-privacy-accept {
    margin-top: 14px;
}

.aguto-chatbot-clear {
    background: #fff;
    color: #0073aa;
    border: 1px solid #0073aa;
    border-radius: 7px;
    padding: 7px 14px;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px;
    margin-right: 10px;
    transition: background 0.2s, color 0.2s;
}

.aguto-chatbot-clear:hover {
    background: #0073aa;
    color: #fff;
}

button#aguto-chatbot-clear {
    border: 0;
    text-decoration: none;
    text-align: center;
    margin: 0 auto;
    background-color: #8b8b8b;
    color: #fff;
    display: block; /* Wichtig für Zentrierung */
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 10px;
}

button#aguto-chatbot-clear:hover {
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

@keyframes aguto-bounce {
    0%, 80%, 100% { 
        transform: scale(0.8); 
    }
    40% { 
        transform: scale(1.3); 
    }
}

@media (max-width: 600px) {
    #aguto-chatbot,
    .aguto-chatbot {
        max-width: 100vw;
    }
    .aguto-chatbot-privacy-box { 
        max-width: 100vw; 
    }
}