/* Revo Chatbot Styles - DeepRevAI Theme */

/* ============================================================
   CHAT BUTTON
   ============================================================ */
.revo-chat-button {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #727FD5;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(114, 127, 213, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.revo-chat-button:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 30px rgba(114, 127, 213, 0.6);
}

.revo-chat-button .chat-icon {
    width: 26px;
    height: 26px;
    stroke-width: 2;
}

/* ============================================================
   CHAT WIDGET
   ============================================================ */
.revo-chat-widget {
    position: fixed;
    bottom: 100px;
    left: 30px;
    width: 380px;
    height: 520px;
    background: #0b0b12;
    border-radius: 16px;
    border: 1px solid rgba(114, 127, 213, 0.15);
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: all 0.3s ease;
    overflow: hidden;
    font-family: 'Urania Light', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.revo-chat-widget.closed {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   CHAT HEADER
   ============================================================ */
.revo-chat-header {
    background: rgba(114, 127, 213, 0.08);
    border-bottom: 1px solid rgba(114, 127, 213, 0.1);
    color: #FFFFFF;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.revo-chat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 400;
    font-size: 15px;
    font-family: 'Urania Light', 'Inter', sans-serif;
    letter-spacing: 0.02em;
}

.revo-avatar {
    display: flex;
    align-items: center;
}

.revo-avatar .icon-large {
    width: 26px;
    height: 26px;
    color: #727FD5;
    stroke-width: 2;
}

.revo-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.revo-close-btn:hover {
    color: #FFFFFF;
}

.revo-close-btn .icon {
    width: 22px;
    height: 22px;
    stroke-width: 2;
}

/* ============================================================
   CHAT MESSAGES
   ============================================================ */
.revo-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #0b0b12;
}

.revo-chat-messages::-webkit-scrollbar {
    width: 4px;
}

.revo-chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.revo-chat-messages::-webkit-scrollbar-thumb {
    background: rgba(114, 127, 213, 0.3);
    border-radius: 4px;
}

.revo-welcome-message {
    margin-bottom: 4px;
}

/* ============================================================
   MESSAGE BUBBLES
   ============================================================ */
.revo-message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: revoMessageIn 0.3s ease;
    font-weight: 300;
    font-size: 0.92rem;
}

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

.revo-message-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Bot Messages */
.revo-bot {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.revo-bot-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.revo-bot-icon .icon-small {
    width: 16px;
    height: 16px;
    color: #727FD5;
    stroke-width: 2;
}

/* User Messages */
.revo-user {
    background: #727FD5;
    color: #FFFFFF;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.revo-user .revo-message-content {
    flex-direction: row-reverse;
}

.revo-user-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.revo-user-icon .icon-small {
    width: 16px;
    height: 16px;
    stroke-width: 2;
}

/* Error Messages */
.revo-error {
    background: rgba(239, 68, 68, 0.08);
    color: #f87171;
    align-self: center;
    font-size: 0.85rem;
    border: 1px solid rgba(239, 68, 68, 0.12);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
}

.revo-error .icon-small {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: #f87171;
}

/* ============================================================
   CHAT INPUT
   ============================================================ */
.revo-chat-input {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    gap: 10px;
    align-items: center;
}

.revo-chat-input input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    background: rgba(255, 255, 255, 0.02);
    color: #FFFFFF;
    font-family: 'Urania Light', 'Inter', sans-serif;
    font-weight: 300;
}

.revo-chat-input input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.revo-chat-input input:focus {
    border-color: rgba(114, 127, 213, 0.3);
}

.revo-chat-input button {
    background: #727FD5;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.15s;
}

.revo-chat-input button:hover {
    background: #8B96E0;
    transform: scale(1.02);
}

.revo-chat-input button:active {
    transform: scale(0.95);
}

.revo-chat-input button .icon {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

/* ============================================================
   TYPING INDICATOR
   ============================================================ */
.revo-typing-indicator {
    padding: 8px 16px;
    display: none;
    gap: 4px;
    align-items: center;
}

.revo-typing-indicator span {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: inline-block;
    animation: revoTyping 1.4s infinite both;
}

.revo-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.revo-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes revoTyping {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.3;
    }
    30% {
        transform: translateY(-6px);
        opacity: 1;
    }
}

/* ============================================================
   ICON SIZES
   ============================================================ */
.icon {
    width: 20px;
    height: 20px;
}

.icon-small {
    width: 16px;
    height: 16px;
}

.icon-large {
    width: 28px;
    height: 28px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 480px) {
    .revo-chat-widget {
        width: 100%;
        height: 100vh;
        bottom: 0;
        left: 0;
        border-radius: 0;
        border: none;
    }
    
    .revo-chat-header {
        border-radius: 0;
        padding: 14px 16px;
    }
    
    .revo-chat-button {
        bottom: 20px;
        left: 20px;
        width: 50px;
        height: 50px;
    }
    
    .revo-chat-button .chat-icon {
        width: 24px;
        height: 24px;
    }
    
    .revo-chat-messages {
        padding: 12px;
    }
    
    .revo-chat-input {
        padding: 10px 12px;
    }
}

/* Dark scrollbar for Firefox */
.revo-chat-messages {
    scrollbar-width: thin;
    scrollbar-color: rgba(114, 127, 213, 0.3) transparent;
}