/* ADN Chatbot Widget v2 */
:root {
    --adn-primary: #426794;
    --adn-primary-dark: #334f73;
    --adn-primary-light: #e8eef5;
    --adn-text: #333;
    --adn-bg: #fff;
    --adn-border: #e0e0e0;
    --adn-shadow: 0 4px 24px rgba(0,0,0,0.15);
}

#adn-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--adn-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--adn-shadow);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, background 0.2s;
    padding: 0;
}
#adn-chat-bubble:hover {
    transform: scale(1.08);
    background: var(--adn-primary-dark);
}
#adn-chat-bubble svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}
#adn-chat-bubble .adn-close-icon { display: none; }
#adn-chat-bubble.adn-open .adn-chat-icon { display: none; }
#adn-chat-bubble.adn-open .adn-close-icon { display: block; }

#adn-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 420px;
    height: 580px;
    background: var(--adn-bg);
    border-radius: 16px;
    box-shadow: var(--adn-shadow);
    z-index: 99998;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
#adn-chat-window.adn-visible {
    display: flex;
    animation: adnSlideUp 0.3s ease;
}

@keyframes adnSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.adn-chat-header {
    background: var(--adn-primary);
    color: #fff;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.adn-chat-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.adn-chat-header-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}
.adn-chat-header-text h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}
.adn-chat-header-text p {
    margin: 2px 0 0;
    font-size: 12px;
    opacity: 0.85;
}

.adn-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.adn-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}
.adn-msg-bot {
    align-self: flex-start;
    background: #f0f2f5;
    color: var(--adn-text);
    border-bottom-left-radius: 4px;
}
.adn-msg-user {
    align-self: flex-end;
    background: var(--adn-primary);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.adn-msg-bot img {
    max-width: 100%;
    border-radius: 8px;
    margin: 8px 0;
    cursor: pointer;
}
.adn-msg-bot a {
    color: var(--adn-primary);
    text-decoration: underline;
}

.adn-typing {
    align-self: flex-start;
    background: #f0f2f5;
    padding: 12px 18px;
    border-radius: 12px;
    display: none;
}
.adn-typing.adn-visible { display: flex; gap: 4px; }
.adn-typing span {
    width: 8px; height: 8px;
    background: #999;
    border-radius: 50%;
    animation: adnBounce 1.2s infinite;
}
.adn-typing span:nth-child(2) { animation-delay: 0.2s; }
.adn-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes adnBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}

.adn-cart-action {
    background: var(--adn-primary-light);
    border: 1px solid var(--adn-primary);
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.adn-cart-action button {
    background: var(--adn-primary);
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
}
.adn-cart-action button:hover { background: var(--adn-primary-dark); }

.adn-chat-input-area {
    padding: 12px 16px;
    border-top: 1px solid var(--adn-border);
    display: flex;
    gap: 8px;
    background: #fafafa;
}
.adn-chat-input-area input {
    flex: 1;
    border: 1px solid var(--adn-border);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
}
.adn-chat-input-area input:focus {
    border-color: var(--adn-primary);
}
.adn-chat-input-area button {    width: 42px !important;    height: 42px !important;    border-radius: 50% !important;    border: none !important;    background: #426794 !important;    color: #fff !important;    cursor: pointer;    display: flex !important;    align-items: center;    justify-content: center;    flex-shrink: 0;}
.adn-chat-input-area button:hover { background: var(--adn-primary-dark); }
.adn-chat-input-area button:disabled { opacity: 0.5; cursor: not-allowed; }

.adn-human-btn {
    text-align: center;
    padding: 6px;
    border-top: 1px solid var(--adn-border);
    background: #fafafa;
}
.adn-human-btn a {
    color: #666;
    font-size: 12px;
    text-decoration: none;
}
.adn-human-btn a:hover { color: var(--adn-primary); text-decoration: underline; }

.adn-notification {
    position: fixed;
    bottom: 100px;
    right: 24px;
    background: var(--adn-primary);
    color: #fff;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    z-index: 100000;
    animation: adnSlideUp 0.3s ease;
}

/* Mobile */
@media (max-width: 480px) {
    #adn-chat-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
    #adn-chat-bubble {
        bottom: 16px;
        right: 16px;
    }
}
