/* FILE: ai-offer-nudge/assets/css/ai-offer-nudge-frontend.css */

#aon-popup {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

#aon-popup.aon-hidden {
    display: none;
}

#aon-popup .aon-popup-inner {
    background: #fff7e6;
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
    border: 1px solid #f3e2cf;
    max-width: 380px;
    width: 100%;
    position: relative;
}

/* Size variants */
#aon-popup.aon-size-small .aon-popup-inner {
    max-width: 320px;
}
#aon-popup.aon-size-medium .aon-popup-inner {
    max-width: 380px;
}
#aon-popup.aon-size-large .aon-popup-inner {
    max-width: 420px;
}

/* Close */
#aon-popup .aon-popup-close {
    position: absolute;
    top: 6px;
    right: 8px;
    border: none;
    background: none;
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Header with avatar */
#aon-popup .aon-popup-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

#aon-popup .aon-avatar {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f97316, #ec4899);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

#aon-popup .aon-header-text {
    flex: 1;
}

#aon-popup .aon-popup-heading {
    font-weight: 600;
    font-size: 14px;
}

/* Body & answer */
#aon-popup .aon-popup-body {
    font-size: 13px;
    margin-top: 2px;
    margin-bottom: 6px;
    line-height: 1.5;
    color: #374151;
}

#aon-popup .aon-popup-answer {
    font-size: 13px;
    margin-bottom: 6px;
    line-height: 1.45;
    color: #444;
}

/* Chat style variants */
#aon-popup.aon-chat-modern .aon-popup-answer {
    background: #fff2d6;
    border-radius: 10px;
    padding: 6px 9px;
}
#aon-popup.aon-chat-clean .aon-popup-answer {
    background: transparent;
    padding: 0;
}
#aon-popup.aon-chat-whatsapp .aon-popup-answer {
    background: #e1ffc7;
    border-radius: 10px;
    padding: 6px 9px;
}

/* Typing row */
#aon-popup .aon-typing-row {
    margin-bottom: 6px;
}
#aon-popup .aon-typing-row.aon-hidden {
    display: none;
}

#aon-popup .aon-typing-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.05);
}
#aon-popup .aon-typing-dots span {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #9ca3af;
    display: inline-block;
    animation: aon-dot 0.9s infinite ease-in-out;
}
#aon-popup .aon-typing-dots span:nth-child(2) {
    animation-delay: 0.15s;
}
#aon-popup .aon-typing-dots span:nth-child(3) {
    animation-delay: 0.3s;
}
@keyframes aon-dot {
    0%, 80%, 100% { transform: scale(0.7); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

/* Input row */
#aon-popup .aon-popup-input-row {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

#aon-popup .aon-popup-question {
    flex: 1;
    border-radius: 999px;
    border: 1px solid #e0d2c0;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}
#aon-popup .aon-popup-question:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.2);
}

#aon-popup .aon-popup-send {
    border: none;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    cursor: pointer;
    background: #f97316;
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
    transition: opacity 0.2s ease, transform 0.1s ease;
}
#aon-popup .aon-popup-send:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 767px) {
    #aon-popup {
        right: 0;
        left: 0;
        bottom: 0;
        justify-content: center;
    }
    #aon-popup .aon-popup-inner {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
    }
}
