/* ═══════════════════════════════════════════════════════
   ZARA AI ASSISTANT — Dark Industrial-Luxury Widget CSS
   Matches Aisend brand: #0A0A0B bg, #E8A020 amber accent
   ═══════════════════════════════════════════════════════ */

/* Shell container */
#zara-shell {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 99999;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── BUBBLE BUTTON ─────────────────────────────────────── */
#zara-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #E8A020 0%, #c47d10 100%);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 24px rgba(232,160,32,0.45), 0 2px 8px rgba(0,0,0,0.4);
    transition: transform 0.25s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.25s ease;
    position: relative;
    outline: none;
}

#zara-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 32px rgba(232,160,32,0.6), 0 2px 10px rgba(0,0,0,0.5);
}

#zara-bubble:active {
    transform: scale(0.96);
}

/* Notification dot — pulses to attract attention */
#zara-notif-dot {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #0A0A0B;
    animation: zara-pulse 2s infinite;
    display: block;
}

@keyframes zara-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); }
    50%       { box-shadow: 0 0 0 6px rgba(34,197,94,0); }
}

/* ── CHAT WINDOW ───────────────────────────────────────── */
#zara-window {
    width: 380px;
    height: 560px;
    background: #141416;
    border: 1px solid rgba(232,160,32,0.2);
    border-radius: 20px;
    box-shadow:
        0 24px 64px rgba(0,0,0,0.7),
        0 0 0 1px rgba(255,255,255,0.04) inset;
    position: absolute;
    bottom: 76px;
    right: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform-origin: bottom right;
    animation: zaraSlideIn 0.3s cubic-bezier(0.34,1.56,0.64,1) forwards;
}

#zara-window.open {
    display: flex;
}

@keyframes zaraSlideIn {
    from { opacity: 0; transform: scale(0.85) translateY(12px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ── HEADER ────────────────────────────────────────────── */
#zara-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, rgba(232,160,32,0.12) 0%, rgba(20,20,22,0) 100%);
    border-bottom: 1px solid rgba(232,160,32,0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

#zara-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

#zara-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8A020, #c47d10);
    color: #000;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Syne', sans-serif;
    flex-shrink: 0;
    box-shadow: 0 0 0 3px rgba(232,160,32,0.2);
}

#zara-name {
    font-weight: 700;
    font-size: 1rem;
    color: #F0EDE8;
    font-family: 'Syne', sans-serif;
    line-height: 1.2;
}

#zara-status {
    font-size: 0.75rem;
    color: #8A8880;
    display: flex;
    align-items: center;
    gap: 5px;
}

#zara-status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    animation: zara-pulse 2s infinite;
}

.zara-badge {
    font-size: 0.7rem;
    font-weight: 600;
    color: #E8A020;
    background: rgba(232,160,32,0.1);
    border: 1px solid rgba(232,160,32,0.25);
    border-radius: 999px;
    padding: 3px 10px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* ── MESSAGES AREA ─────────────────────────────────────── */
#zara-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
    background: #0F0F11;
}

#zara-messages::-webkit-scrollbar { width: 4px; }
#zara-messages::-webkit-scrollbar-track { background: transparent; }
#zara-messages::-webkit-scrollbar-thumb { background: rgba(232,160,32,0.2); border-radius: 4px; }

.zara-msg {
    display: flex;
    gap: 8px;
    animation: zaraMsgIn 0.25s ease forwards;
    max-width: 88%;
}

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

.zara-msg.from-zara { align-self: flex-start; }
.zara-msg.from-user { align-self: flex-end; flex-direction: row-reverse; }

.zara-msg-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8A020, #c47d10);
    color: #000;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.zara-msg-bubble {
    padding: 11px 15px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.from-zara .zara-msg-bubble {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #D8D5D0;
    border-radius: 4px 16px 16px 16px;
}

.from-user .zara-msg-bubble {
    background: linear-gradient(135deg, #E8A020, #c47d10);
    color: #000;
    font-weight: 500;
    border-radius: 16px 4px 16px 16px;
}

.zara-msg-time {
    font-size: 0.68rem;
    color: #5A5855;
    margin-top: 4px;
    text-align: right;
}
.from-zara .zara-msg-time { text-align: left; }

/* ── TYPING INDICATOR ──────────────────────────────────── */
#zara-typing {
    padding: 12px 16px 0 16px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

#zara-typing span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #E8A020;
    opacity: 0.4;
    animation: zaraBounce 1.2s infinite;
}
#zara-typing span:nth-child(2) { animation-delay: 0.2s; }
#zara-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes zaraBounce {
    0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
    40%            { transform: translateY(-5px); opacity: 1; }
}

/* ── INPUT AREA ────────────────────────────────────────── */
#zara-input-area {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    gap: 10px;
    align-items: center;
    background: #141416;
    flex-shrink: 0;
}

#zara-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 11px 16px;
    color: #F0EDE8;
    font-size: 0.9rem;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 0.2s;
}

#zara-input:focus {
    border-color: rgba(232,160,32,0.5);
}

#zara-input::placeholder { color: #5A5855; }

#zara-send {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: #E8A020;
    color: #000;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, transform 0.15s;
}

#zara-send:hover    { background: #d4911a; }
#zara-send:active   { transform: scale(0.94); }
#zara-send:disabled { background: #3a3835; color: #5A5855; cursor: not-allowed; }

/* ── FOOTER BRAND ──────────────────────────────────────── */
#zara-footer-brand {
    text-align: center;
    font-size: 0.68rem;
    color: #3A3835;
    padding: 6px 0 10px;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}

/* ── RESPONSIVE ────────────────────────────────────────── */
@media (max-width: 480px) {
    #zara-shell { bottom: 16px; right: 16px; }
    #zara-window { width: calc(100vw - 32px); right: 0; }
}
