/* Chat Toggle Button */
#chatToggle {
    background: linear-gradient(135deg, #6937ff 0%, #8b5cf6 100%);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(105, 55, 255, 0.3);
}

/* Override for our-team page - remove background and styling */
#chatToggle[style*="background: none"] {
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

#chatToggle:hover {
    transform: translateY(-2px);
}

/* Remove focus outline and selection */
#chatToggle:focus,
#chatToggle:focus-visible,
#chatToggle:active {
    outline: none !important;
    border: none !important;
}

#chatToggle img {
    outline: none !important;
    border: none !important;
    user-select: none;
    -webkit-user-select: none;
}

/* Chat Close Button (position: absolute relative to #chatWindow which is position: fixed) */
.chat-close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
    font-size: 20px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.chat-close-btn:focus {
    outline: none;
}

/* Chat Window - z-index 9998 to stay above cookie banner (index) */
#chatWindow {
    z-index: 9998 !important;
    padding: 10px;
    padding-top: 44px; /* Space for close button */
    scrollbar-width: none !important;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
}

/* Chat Messages */
.message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 12px;
    max-width: 80%;
}

/* Ensure chat messages have proper font size (override page-specific .message styles) */
#chat-window .message,
#chat-container .message {
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-shadow: none !important;
    color: white !important;
}

.user {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.bot {
    background: rgba(255, 255, 255, 0.08);
    color: white;
    align-self: flex-start;
}

/* Input Container */
#input-container {
    display: flex;
    padding: 10px 0;
}

#user-input {
    flex: 1;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: white;
    outline: none;
}

#send-btn {
    margin-left: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #6937ff 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

#send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(105, 55, 255, 0.4);
}

/* Responsiveness */
@media (max-width: 768px) {
    #chatToggle {
        bottom: 20px !important;
        right: 20px !important;
    }
    
    #chatToggle img {
        width: 60px !important;
    }
    
    #chatWindow {
        width: calc(100vw - 40px) !important; /* Full width minus safe margins */
        max-width: none;
        right: 20px !important;
        bottom: 90px !important;
        max-height: 60vh !important;
        border-radius: 16px !important;
        padding: 12px !important;
        padding-top: 44px !important;
        margin: 0 !important;
        position: fixed !important;
        z-index: 9998 !important;
    }
    
    #user-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    #send-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}


