/* chatbot.css - Floating Chatbot with Chat Mode & Ziva Mode */

.floating-chat-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #DF6951, #4152CB);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    box-shadow: 0 10px 25px rgba(223, 105, 81, 0.5);
    cursor: pointer;
    z-index: 9999;
    transition: all 0.3s ease;
}

.floating-chat-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(65, 82, 203, 0.6);
}

.chat-panel {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(24, 30, 75, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-panel.active {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

/* Navbar */
.chat-navbar {
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(245, 246, 255, 0.8);
    padding: 10px 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
}

.chat-tabs {
    display: flex;
    gap: 20px;
    position: relative;
}

.chat-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #8C92B1;
    cursor: pointer;
    transition: color 0.3s;
    border-radius: 20px;
}

.chat-tab.active {
    color: #4152CB;
    background: rgba(65, 82, 203, 0.1);
}

.chat-close {
    position: absolute;
    right: 20px;
    color: #8C92B1;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.2s;
}

.chat-close:hover {
    color: #181E4B;
}

/* Modes Container */
.chat-modes-container {
    flex: 1;
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.chat-mode-view {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.chat-mode-view.active {
    opacity: 1;
    pointer-events: all;
}

/* Chat Mode Styles */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: #E5E7EB; border-radius: 10px; }

.msg {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    animation: slide-up 0.3s ease-out;
}

.msg.user {
    flex-direction: row-reverse;
}

.msg-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.msg-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.5;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.msg.ai .msg-bubble {
    background: linear-gradient(135deg, #F5F6FF, #FFFFFF);
    color: #181E4B;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(65, 82, 203, 0.1);
}

.msg.user .msg-bubble {
    background: linear-gradient(135deg, #DF6951, #F1A501);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    background: #fff;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    padding: 12px 16px;
    border: 1.5px solid #E5E7EB;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-area input:focus {
    border-color: #DF6951;
    box-shadow: 0 0 0 3px rgba(223, 105, 81, 0.1);
}

.chat-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.chat-mic-btn {
    background: rgba(65, 82, 203, 0.1);
    color: #4152CB;
}

.chat-mic-btn:hover {
    background: rgba(65, 82, 203, 0.2);
}

.chat-send-btn {
    background: #DF6951;
    color: #fff;
}

.chat-send-btn:hover {
    background: #c9553f;
    transform: scale(1.05);
}

/* Ziva Mode Styles inside Chatbot */
.ziva-view {
    background: linear-gradient(180deg, #1A1A2E 0%, #16213E 100%);
    color: #fff;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}

.ziva-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(10px);
    z-index: 10;
    position: absolute;
    top: 0; width: 100%;
}

.ziva-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ziva-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, #8B5CF6, #4152CB);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.5);
    font-size: 20px;
}

.ziva-title {
    font-family: 'Volkhov', serif;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

.ziva-subtitle {
    font-size: 11px;
    color: #A0AEC0;
    margin: 0;
}

.ziva-lang-select {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    outline: none;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.ziva-lang-select option {
    background: #1A1A2E;
    color: #fff;
}

.ziva-avatar-container {
    flex: 1;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 1;
}

.ziva-ambient-elements {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 2;
}

.ziva-particle {
    position: absolute;
    background: #8B5CF6;
    border-radius: 50%;
    filter: blur(2px);
}

.ziva-bottom-area {
    position: absolute;
    bottom: 0; width: 100%;
    padding: 24px;
    background: linear-gradient(0deg, rgba(26,26,46,0.95) 0%, rgba(26,26,46,0) 100%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.ziva-status-text {
    font-size: 14px;
    color: #fff;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    animation: breathe 2s infinite ease-in-out;
}

.ziva-waveform {
    display: flex;
    gap: 4px;
    height: 30px;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.ziva-waveform.active {
    opacity: 1;
}

.ziva-waveform span {
    width: 4px;
    height: 5px;
    background: #8B5CF6;
    border-radius: 10px;
    animation: wave 1s infinite ease-in-out;
}

.ziva-waveform span:nth-child(2) { animation-delay: 0.1s; }
.ziva-waveform span:nth-child(3) { animation-delay: 0.2s; }
.ziva-waveform span:nth-child(4) { animation-delay: 0.3s; }
.ziva-waveform span:nth-child(5) { animation-delay: 0.4s; }

.ziva-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ziva-mic-btn {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #DF6951, #F1A501);
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 20px rgba(223, 105, 81, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ziva-mic-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 25px rgba(223, 105, 81, 0.6);
}

.ziva-mic-btn.listening {
    background: #E53E3E;
    animation: pulse-glow 2s infinite;
}

.ziva-subtitles {
    position: absolute;
    bottom: 120px;
    left: 20px;
    right: 20px;
    text-align: center;
    z-index: 10;
}

.ziva-translation-text {
    font-size: 16px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    backdrop-filter: blur(5px);
    max-width: 100%;
}

.ziva-user-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

