/* NoVA Ascend Chat Widget Styles */
.nova-chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.nova-chat-widget.position-bottom-left {
    right: auto;
    left: 20px;
}

.nova-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00A7C7, #0FC4D6);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 167, 199, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nova-chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 167, 199, 0.6);
}

.nova-chat-toggle svg {
    width: 28px;
    height: 28px;
}

.chat-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.nova-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 600px;
    max-height: calc(100vh - 120px);
    background: #0B1220;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

.nova-chat-widget.position-bottom-left .nova-chat-window {
    right: auto;
    left: 20px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nova-chat-header {
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header-info strong {
    display: block;
    color: rgba(255,255,255,.95);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
}

.chat-header-info span {
    display: block;
    color: rgba(255,255,255,.65);
    font-size: 12px;
}

.chat-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.live-chat-btn {
    background: linear-gradient(135deg, rgba(0,167,199,.15), rgba(15,196,214,.15));
    border: 1px solid rgba(0,167,199,.35);
    color: rgba(255,255,255,.88);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.live-chat-btn:hover {
    background: linear-gradient(135deg, rgba(0,167,199,.25), rgba(15,196,214,.25));
}

.live-chat-btn.active {
    background: linear-gradient(135deg, rgba(16,185,129,.25), rgba(16,185,129,.15));
    border-color: rgba(16,185,129,.45);
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,.7);
    font-size: 28px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.chat-close-btn:hover {
    background: rgba(255,255,255,.1);
    color: rgba(255,255,255,.95);
}

.nova-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: rgba(0,0,0,.1);
}

.chat-message {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    align-items: flex-end;
}

.chat-message.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: rgba(255,255,255,.8);
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    display: none;
}

.message-bubble {
    max-width: 75%;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,.92);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    word-wrap: break-word;
    white-space: pre-wrap;
}

.chat-message.bot .message-bubble {
    background: linear-gradient(180deg, rgba(0,167,199,.14), rgba(255,255,255,.04));
    border-color: rgba(0,167,199,.25);
}

.chat-message.user .message-bubble {
    background: linear-gradient(180deg, rgba(201,162,39,.14), rgba(255,255,255,.04));
    border-color: rgba(201,162,39,.25);
}

.nova-chat-input {
    border-top: 1px solid rgba(255,255,255,.1);
    padding: 12px;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: rgba(255,255,255,.03);
}

#nova-chat-textarea {
    flex: 1;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 12px;
    padding: 10px 12px;
    color: rgba(255,255,255,.92);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    min-height: 40px;
}

#nova-chat-textarea:focus {
    outline: none;
    border-color: rgba(0,167,199,.5);
}

.chat-send-btn {
    background: linear-gradient(135deg, #00A7C7, #0FC4D6);
    border: none;
    border-radius: 12px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.2s;
}

.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,167,199,.3);
}

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nova-chat-footer {
    text-align: center;
    padding: 8px;
    background: rgba(255,255,255,.02);
    border-top: 1px solid rgba(255,255,255,.05);
}

.nova-chat-footer small {
    color: rgba(255,255,255,.4);
    font-size: 11px;
}

/* Scrollbar */
.nova-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.nova-chat-messages::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
}

.nova-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.2);
    border-radius: 3px;
}

.nova-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,.3);
}

/* Mobile responsive */
@media (max-width: 480px) {
    .nova-chat-window {
        width: calc(100vw - 20px);
        height: calc(100vh - 100px);
        bottom: 80px;
        right: 10px;
    }
    
    .nova-chat-widget.position-bottom-left .nova-chat-window {
        left: 10px;
    }
}
