/* ARIS Chat Bubble & Overlay Styles */
.aris-chat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Chat Bubble */
.aris-chat-bubble {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.aris-chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    border-radius: 50%;
}

.aris-chat-bubble:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
}

.aris-chat-bubble svg {
    width: 28px;
    height: 28px;
    color: white;
    z-index: 1;
    position: relative;
}

/* Chat Overlay Window */
.aris-chat-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.aris-chat-window.active {
    opacity: 1;
    visibility: visible;
}

/* Chat Container */
.aris-chat-container-inner {
    width: 90%;
    max-width: 800px;
    height: 80vh;
    max-height: 600px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(0, 212, 255, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.8) translateY(50px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.aris-chat-window.active .aris-chat-container-inner {
    transform: scale(1) translateY(0);
}

/* Chat Header */
.aris-chat-header {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.aris-chat-header h3 {
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.aris-chat-header h3::before {
    content: '🤖';
    font-size: 1.8rem;
}

.aris-status {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.aris-status::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #00ff88;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.aris-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aris-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Messages Area */
.aris-chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
}

.aris-chat-messages::-webkit-scrollbar {
    width: 6px;
}

.aris-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.aris-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 212, 255, 0.5);
    border-radius: 3px;
}

.aris-chat-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 212, 255, 0.7);
}

/* Message Bubbles */
.aris-message {
    max-width: 80%;
    padding: 15px 20px;
    border-radius: 20px;
    font-size: 1rem;
    line-height: 1.5;
    word-wrap: break-word;
    animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aris-message.user {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.aris-message.aris {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-bottom-left-radius: 5px;
    backdrop-filter: blur(10px);
}

.aris-message.aris::before {
    content: '🤖 ARIS';
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #00d4ff;
    margin-bottom: 5px;
}

/* Typing Indicator */
.aris-typing {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    border-bottom-left-radius: 5px;
    padding: 15px 20px;
    backdrop-filter: blur(10px);
    animation: messageSlideIn 0.3s ease-out;
}

.aris-typing-dots {
    display: flex;
    gap: 4px;
    margin-top: 5px;
}

.aris-typing-dot {
    width: 8px;
    height: 8px;
    background: #00d4ff;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.aris-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.aris-typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typingDot {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Area */
.aris-chat-input {
    padding: 20px 25px;
    background: rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 15px;
    align-items: center;
}

.aris-input-field {
    flex: 1;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 15px 20px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.aris-input-field::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.aris-input-field:focus {
    border-color: #00d4ff;
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.2);
}

.aris-send-btn {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.aris-send-btn:hover:not(:disabled) {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.5);
}

.aris-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.aris-send-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .aris-chat-container-inner {
        width: 95%;
        height: 90vh;
        max-height: none;
        border-radius: 15px;
    }
    
    .aris-chat-header {
        padding: 15px 20px;
    }
    
    .aris-chat-header h3 {
        font-size: 1.3rem;
    }
    
    .aris-chat-messages {
        padding: 20px;
    }
    
    .aris-message {
        max-width: 90%;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .aris-chat-input {
        padding: 15px 20px;
        gap: 10px;
    }
    
    .aris-input-field {
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    .aris-send-btn {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .aris-chat-bubble {
        width: 55px;
        height: 55px;
        bottom: 15px;
        right: 15px;
    }
    
    .aris-chat-bubble svg {
        width: 24px;
        height: 24px;
    }
}