/* ===========================================
   SARA AI CHAT WIDGET - ORBIS GLOBAL
   Professional Female Assistant
   =========================================== */

/* Sara Launcher - TOP (above WhatsApp) */
#sara-chat-launcher {
    position: fixed;
    bottom: 100px;
    right: 24px;
    z-index: 9998;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

#sara-chat-launcher .sara-launcher-label {
    background: white;
    color: #1e293b;
    padding: 10px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    white-space: nowrap;
    position: relative;
    animation: saraFloat 3s ease-in-out infinite;
    border: 1px solid #e2e8f0;
}

#sara-chat-launcher .sara-launcher-label::after {
    content: '';
    position: absolute;
    right: -7px;
    top: 50%;
    transform: translateY(-50%);
    width: 0; height: 0;
    border-left: 8px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

#sara-chat-launcher .sara-launcher-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(168, 85, 247, 0.5);
    transition: transform 0.3s;
    position: relative;
    overflow: hidden;
    border: 3px solid white;
}

#sara-chat-launcher .sara-launcher-btn:hover {
    transform: scale(1.08);
}

/* Live online indicator */
#sara-chat-launcher .sara-launcher-btn::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #10b981;
    border-radius: 50%;
    bottom: 2px;
    right: 2px;
    border: 2px solid white;
    z-index: 10;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* Female Avatar SVG - Professional look */
.sara-avatar-svg {
    width: 100%;
    height: 100%;
    display: block;
}

@keyframes saraFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* CHAT WINDOW */
#sara-chat-window {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 380px;
    height: 600px;
    max-height: calc(100vh - 48px);
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: var(--font-body);
}

#sara-chat-window.open {
    display: flex;
    animation: saraSlideUp 0.3s ease-out;
}

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

.sara-header {
    background: linear-gradient(135deg, #f472b6, #a855f7);
    color: white;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sara-header .sara-avatar-lg {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid rgba(255,255,255,0.5);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.sara-header .sara-avatar-lg::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    bottom: -2px;
    right: -2px;
    border: 2px solid white;
}

.sara-header .sara-info {
    flex: 1;
}

.sara-header .sara-name {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 2px;
}

.sara-header .sara-status {
    font-size: 12px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sara-header .sara-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
    animation: pulse 2s infinite;
}

.sara-close-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
}

.sara-close-btn:hover {
    background: rgba(255,255,255,0.3);
}

.sara-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sara-msg {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: msgIn 0.3s ease-out;
}

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

.sara-msg.bot {
    background: white;
    color: #0f172a;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.sara-msg.user {
    background: linear-gradient(135deg, #a855f7, #f472b6);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.sara-typing {
    align-self: flex-start;
    background: white;
    padding: 14px 18px;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    display: flex;
    gap: 5px;
}

.sara-typing span {
    width: 8px;
    height: 8px;
    background: #cbd5e1;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.sara-typing span:nth-child(2) { animation-delay: 0.2s; }
.sara-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-8px); opacity: 1; }
}

.sara-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
    align-self: flex-start;
    max-width: 100%;
}

.sara-quick-btn {
    background: white;
    border: 1.5px solid #a855f7;
    color: #a855f7;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body);
}

.sara-quick-btn:hover {
    background: #a855f7;
    color: white;
}

.sara-input-area {
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 8px;
    align-items: center;
}

.sara-input {
    flex: 1;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    font-family: var(--font-body);
    transition: border-color 0.2s;
}

.sara-input:focus {
    border-color: #a855f7;
}

.sara-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f472b6, #a855f7);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.sara-send-btn:hover { transform: scale(1.05); }
.sara-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.sara-send-btn i {
    width: 18px;
    height: 18px;
}

.sara-footer {
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    color: #64748b;
    font-size: 11px;
}

/* MOBILE */
@media (max-width: 768px) {
    #sara-chat-launcher {
        right: 20px;
        bottom: 90px;
    }
    
    #sara-chat-launcher .sara-launcher-label {
        display: none;
    }
    
    #sara-chat-launcher .sara-launcher-btn {
        width: 56px;
        height: 56px;
    }
    
    #sara-chat-window {
        width: calc(100vw - 24px);
        height: calc(100vh - 100px);
        right: 12px;
        bottom: 12px;
        max-height: none;
    }
}
