/* Homepage Chatbot Styles */
/* Ninety's Creative Innovations - Homepage Chatbot CSS */

/* Keyframe Animations */
@keyframes homepagePulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 1; 
    }
    50% { 
        transform: scale(1.2); 
        opacity: 0.7; 
    }
}

@keyframes homepageSlideUp {
    from { 
        transform: translateY(20px); 
        opacity: 0; 
    }
    to { 
        transform: translateY(0); 
        opacity: 1; 
    }
}

@keyframes homepageSlide {
    from { 
        transform: translateX(-100%); 
    }
    to { 
        transform: translateX(100%); 
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Chat Button Styles */
#chatToggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(74, 85, 104, 0.4), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1;
    text-align: center;
}

#chatToggle:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 12px 35px rgba(74, 85, 104, 0.6), 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Active Indicator */
#chatToggle .chat-indicator {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    border-radius: 50%;
    border: 2px solid white;
    animation: homepagePulse 2s infinite;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.4);
}

/* Chat Window Styles */
#homepageChatWindow {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
    transform: translateY(30px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#homepageChatWindow.show {
    transform: translateY(0) scale(1) !important;
    opacity: 1 !important;
}

/* Header Styles */
.chat-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    color: white;
    padding: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 25px 25px 0 0;
    position: relative;
    overflow: hidden;
}

.chat-header-content {
    position: relative;
    z-index: 2;
}

.chat-header-title {
    font-weight: 800;
    font-size: 22px;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.chat-header-status {
    font-size: 14px;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.chat-status-dot {
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    animation: homepagePulse 1.5s infinite;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Animated Background */
.chat-header-bg {
    position: absolute;
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0;
    opacity: 0.1;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255,255,255,0.1) 10px,
        rgba(255,255,255,0.1) 20px
    );
    animation: homepageSlide 20s linear infinite;
}

/* Messages Area */
#homepageChatMessages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 50%, #f1f5f9 100%);
    scroll-behavior: smooth;
}

/* Scrollbar Styles */
#homepageChatMessages::-webkit-scrollbar {
    width: 6px;
}

#homepageChatMessages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 10px;
}

#homepageChatMessages::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(74, 85, 104, 0.3), rgba(45, 55, 72, 0.3));
    border-radius: 10px;
}

#homepageChatMessages::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(74, 85, 104, 0.6), rgba(45, 55, 72, 0.6));
}

/* Welcome Message */
.welcome-message {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    padding: 18px 22px;
    border-radius: 22px 22px 22px 8px;
    margin-bottom: 20px;
    box-shadow: 
        0 5px 25px rgba(0, 0, 0, 0.08),
        0 2px 5px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(74, 85, 104, 0.1);
    position: relative;
    animation: homepageSlideUp 0.6s ease-out;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
}

.welcome-message::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 18px;
    width: 0; 
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

/* Input Area */
.chat-input-area {
    padding: 25px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
    align-items: flex-end;
    border-radius: 0 0 25px 25px;
}

#homepageChatInput {
    flex: 1;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    outline: none;
    font-size: 16px;
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
}

#homepageChatInput:focus {
    border-color: #4a5568;
    background: white;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(74, 85, 104, 0.2);
}

.chat-send-btn {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border: none;
    color: white;
    padding: 15px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(74, 85, 104, 0.4);
    min-width: 90px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chat-send-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 15px 40px rgba(74, 85, 104, 0.6);
}

/* Mobile Responsive */
@media (max-width: 480px) {
    #homepageChatWindow {
        width: calc(100vw - 30px) !important;
        height: 70vh !important;
        bottom: 100px !important;
        right: 15px !important;
        left: 15px !important;
    }
    
    #chatToggle {
        width: 60px !important;
        height: 60px !important;
        font-size: 24px !important;
        bottom: 20px !important;
        right: 20px !important;
    }
    
    #chatToggle .chat-indicator {
        width: 16px !important;
        height: 16px !important;
        top: -2px !important;
        right: -2px !important;
        border: 1px solid white !important;
    }
    
    .chat-header {
        padding: 16px !important;
    }
    
    .chat-header-title {
        font-size: 18px !important;
    }
    
    #homepageChatMessages {
        padding: 16px !important;
    }
    
    .chat-input-area {
        padding: 16px !important;
    }
}