/* ELITE PRINT - SMART ASSISTANT WIDGET CSS */
.elite-ai-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: auto;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
}

body.iv-rtl .elite-ai-fab {
    right: 24px;
    left: auto;
}

@media (max-width: 600px) {
    .iv-floating-wa-label {
        display: none;
    }
    .iv-floating-wa-btn {
        padding: 14px;
        border-radius: 50%;
    }
    .elite-ai-toggle {
        width: 52px;
        height: 52px;
    }
    .elite-ai-fab {
        bottom: 18px;
        right: 18px;
    }
    .iv-floating-wa {
        bottom: 18px;
        left: 18px;
    }
}

.elite-ai-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37 0%, #f39c12 100%);
    color: #0b0f19;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.45);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.elite-ai-toggle:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.65);
}

.elite-ai-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 15px;
    height: 15px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid #0b0f19;
    animation: elitePulse 2s infinite;
}

@keyframes elitePulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Chat Window Modal */
.elite-ai-window {
    position: fixed;
    bottom: 95px;
    right: 24px;
    width: 380px;
    max-width: calc(100vw - 32px);
    height: 540px;
    max-height: calc(100vh - 120px);
    background: #0f172a;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 20px rgba(212, 175, 55, 0.15);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.elite-ai-window.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.elite-ai-header {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elite-ai-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.elite-ai-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #f39c12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0b0f19;
    font-weight: bold;
    font-size: 18px;
}

.elite-ai-title {
    color: #f8fafc;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.elite-ai-status {
    color: #10b981;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.elite-ai-status-dot {
    width: 7px;
    height: 7px;
    background: #10b981;
    border-radius: 50%;
}

.elite-ai-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 20px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.elite-ai-close:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.1);
}

.elite-ai-body {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Chat Messages */
.elite-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    animation: fadeInMsg 0.3s ease forwards;
}

@keyframes fadeInMsg {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.elite-msg.bot {
    align-self: flex-start;
}

.elite-msg.user {
    align-self: flex-end;
}

.elite-bubble {
    padding: 12px 15px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}

.elite-msg.bot .elite-bubble {
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
}

.elite-msg.user .elite-bubble {
    background: linear-gradient(135deg, #d4af37, #f39c12);
    color: #0b0f19;
    font-weight: 600;
    border-bottom-right-radius: 4px;
}

.elite-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.elite-chip {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #f3ba2f;
    padding: 6px 11px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.elite-chip:hover {
    background: #d4af37;
    color: #0b0f19;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
}

.elite-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10b981;
    color: #ffffff !important;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: bold;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.elite-link-btn:hover {
    background: #059669;
}

.elite-ai-footer {
    padding: 12px;
    background: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    gap: 8px;
}

.elite-ai-input {
    flex: 1;
    background: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #f8fafc;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
    outline: none;
    transition: border 0.2s;
}

.elite-ai-input:focus {
    border-color: #d4af37;
}

.elite-ai-send {
    background: linear-gradient(135deg, #d4af37, #f39c12);
    border: none;
    color: #0b0f19;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: transform 0.2s;
}

.elite-ai-send:hover {
    transform: scale(1.05);
}


/* Auto-hide Floating Buttons when Offcanvas or Modal is Open */
body.offcanvas-open .elite-ai-fab,
body.offcanvas-open .elite-ai-window,
body.offcanvas-open .iv-floating-wa,
body.modal-open .elite-ai-fab,
body.modal-open .elite-ai-window,
body.modal-open .iv-floating-wa,
.offcanvas.show ~ .elite-ai-fab,
.offcanvas.show ~ .iv-floating-wa,
.offcanvas-backdrop.show ~ .elite-ai-fab,
.offcanvas-backdrop.show ~ .iv-floating-wa {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
