/* SIMPLIFIED WORKING CHATBOT CSS */

/* WhatsApp Button - LEFT SIDE */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    z-index: 9997;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

/* Chatbot Toggle Button - RIGHT SIDE */
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--metallic-gold);
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
    visibility: visible !important;
    opacity: 1 !important;
    border: none;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.6);
}

.chatbot-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--metallic-gold);
    animation: pulse 2s infinite;
    z-index: -1;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    70% { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

/* Chatbot Widget - SIMPLIFIED */
.chatbot-widget {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: var(--deep-charcoal);
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex !important;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.3);
    
    /* START HIDDEN */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s ease;
}

.chatbot-widget.active {
    /* WHEN ACTIVE */
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chatbot-header {
    background: linear-gradient(135deg, var(--metallic-gold) 0%, #c19b2a 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.chatbot-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.3s ease;
}

.chatbot-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    max-width: 80%;
    padding: 12px 15px;
    border-radius: 15px;
    line-height: 1.4;
    word-wrap: break-word;
    animation: messageAppear 0.3s ease;
}

@keyframes messageAppear {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.message.bot {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 5px;
}

.message.user {
    background: rgba(34, 139, 34, 0.2);
    border: 1px solid rgba(34, 139, 34, 0.3);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 5px;
}

.message p {
    margin: 0;
    font-size: 14px;
}

.typing-indicator {
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1px solid rgba(212, 175, 55, 0.2) !important;
    padding: 15px !important;
}

.typing-dots {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.typing-dots .dot {
    width: 8px;
    height: 8px;
    background: var(--metallic-gold);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dots .dot:nth-child(2) { animation-delay: -0.16s; }
.typing-dots .dot:nth-child(3) { animation-delay: 0s; }

@keyframes typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.quick-questions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 15px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.quick-question {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: var(--white);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.quick-question:hover {
    background: rgba(212, 175, 55, 0.3);
    transform: translateY(-2px);
}

.chatbot-input {
    display: flex;
    padding: 15px;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
}

.chatbot-input input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    outline: none;
    border-color: var(--metallic-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

#send-message {
    background: var(--metallic-gold);
    border: none;
    width: 45px;
    border-radius: 8px;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

#send-message:hover {
    background: #c19b2a;
    transform: scale(1.05);
}

/* IMPROVED RESPONSIVE STYLES FOR MOBILE */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
        font-size: 24px;
        z-index: 9998;
    }
    
    .chatbot-toggle {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
        z-index: 9999;
    }
    
    .chatbot-widget {
        width: calc(100vw - 40px);
        max-width: 100%;
        height: 70vh;
        max-height: 500px;
        right: 20px;
        left: 20px;
        bottom: 90px;
        border-radius: 20px;
    }
    
    .chatbot-header {
        padding: 18px 20px;
    }
    
    .chatbot-header h4 {
        font-size: 1rem;
    }
    
    .chatbot-body {
        height: calc(100% - 120px);
    }
    
    .chat-messages {
        padding: 15px;
        flex: 1;
        max-height: calc(100% - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .message {
        max-width: 85%;
        padding: 10px 14px;
        font-size: 15px;
    }
    
    .quick-questions {
        grid-template-columns: 1fr;
        padding: 12px 15px;
        gap: 8px;
    }
    
    .quick-question {
        padding: 10px;
        font-size: 13px;
    }
    
    .chatbot-input {
        padding: 12px 15px;
        position: sticky;
        bottom: 0;
        background: var(--deep-charcoal);
        border-top: 1px solid rgba(212, 175, 55, 0.2);
    }
    
    .chatbot-input input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    #send-message {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Extra small devices (phones under 480px) */
@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 15px;
        left: 15px;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    .chatbot-toggle {
        bottom: 15px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .chatbot-widget {
        width: calc(100vw - 30px);
        right: 15px;
        left: 15px;
        bottom: 80px;
        height: 65vh;
        max-height: 450px;
        border-radius: 15px;
    }
    
    .chatbot-header {
        padding: 15px;
    }
    
    .chatbot-header h4 {
        font-size: 0.95rem;
    }
    
    .chat-messages {
        padding: 12px 15px;
    }
    
    .message {
        max-width: 90%;
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .quick-questions {
        padding: 10px 12px;
        gap: 6px;
    }
    
    .quick-question {
        padding: 9px;
        font-size: 12px;
    }
    
    .chatbot-input {
        padding: 10px 12px;
    }
    
    .chatbot-input input {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    #send-message {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* For very small heights (landscape mode) */
@media (max-height: 600px) and (max-width: 768px) {
    .chatbot-widget {
        height: 60vh;
        max-height: 400px;
        bottom: 70px;
    }
    
    .chatbot-header {
        padding: 12px 15px;
    }
    
    .chat-messages {
        padding: 10px 12px;
    }
    
    .quick-questions {
        padding: 8px 10px;
        gap: 5px;
    }
    
    .quick-question {
        padding: 6px 8px;
        font-size: 11px;
    }
}

/* Fix for iOS Safari */
@supports (-webkit-touch-callout: none) {
    .chatbot-widget {
        height: -webkit-fill-available;
    }
    
    .chat-messages {
        -webkit-overflow-scrolling: touch;
    }
}