#aoth-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--aoth-primary, #0B4B64), var(--aoth-primary-dark, #063547));
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999998;
    transition: transform 0.15s ease;
}
#aoth-chat-bubble:hover { transform: scale(1.06); }
#aoth-chat-bubble svg { width: 28px; height: 28px; fill: #fff; }

#aoth-chat-greeting {
    position: fixed;
    bottom: 96px;
    right: 24px;
    max-width: 220px;
    background: #fff;
    color: #14313d;
    padding: 12px 14px;
    border-radius: 14px;
    border-bottom-right-radius: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 13.5px;
    line-height: 1.4;
    z-index: 999997;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}
#aoth-chat-greeting.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
#aoth-chat-greeting .aoth-greeting-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #14313d;
    color: #fff;
    border: none;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
    padding: 0;
}

#aoth-chat-window {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 340px;
    max-width: calc(100vw - 32px);
    height: 480px;
    max-height: calc(100vh - 140px);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    border: 1px solid #dfe7ea;
}
#aoth-chat-window.open { display: flex; }

#aoth-chat-header {
    background: linear-gradient(135deg, var(--aoth-primary, #0B4B64), var(--aoth-primary-dark, #063547));
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#aoth-chat-header .aoth-title { font-weight: 600; font-size: 15px; }
#aoth-chat-header .aoth-subtitle { font-size: 11px; opacity: 0.85; }
#aoth-chat-close { cursor: pointer; font-size: 18px; line-height: 1; background: none; border: none; color: #fff; }

#aoth-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f4f7f8;
}

.aoth-msg {
    max-width: 80%;
    padding: 9px 13px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.aoth-msg.user {
    align-self: flex-end;
    background: linear-gradient(135deg, var(--aoth-primary, #0B4B64), var(--aoth-primary-dark, #063547));
    color: #fff;
    border-bottom-right-radius: 4px;
}
.aoth-msg.bot {
    align-self: flex-start;
    background: #fff;
    color: #1c1c24;
    border: 1px solid #dfe7ea;
    border-bottom-left-radius: 4px;
}

.aoth-typing {
    align-self: flex-start;
    display: flex;
    gap: 4px;
    padding: 10px 13px;
    background: #fff;
    border: 1px solid #dfe7ea;
    border-radius: 14px;
}
.aoth-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--aoth-primary, #0B4B64);
    opacity: 0.6;
    animation: aoth-bounce 1.2s infinite ease-in-out;
}
.aoth-typing span:nth-child(2) { animation-delay: 0.15s; }
.aoth-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes aoth-bounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30% { transform: translateY(-5px); opacity: 1; }
}

#aoth-chat-inputbar {
    display: flex;
    gap: 8px;
    padding: 10px;
    background: #fff;
    border-top: 1px solid #dfe7ea;
}
#aoth-chat-input {
    flex: 1;
    background: #f4f7f8;
    border: 1px solid #dfe7ea;
    border-radius: 20px;
    padding: 9px 14px;
    color: #14313d;
    font-size: 13.5px;
    outline: none;
}
#aoth-chat-send {
    background: linear-gradient(135deg, var(--aoth-primary, #0B4B64), var(--aoth-primary-dark, #063547));
    border: none;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}
