/* Floating Widgets Styles */

/* WhatsApp Float (Left) */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37,211,102,0.35);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: 0 8px 25px rgba(37,211,102,0.45);
    background-color: #128c7e;
    color: #fff;
}

.whatsapp-icon { font-size: 22px; }
.whatsapp-text { display: none; }

/* AI Chatbot (Right) */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px;
    background: #fff;
    border-radius: 25px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(120%); /* Completely hide below the fold */
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.chatbot-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.chatbot-header {
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: #fff;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.chatbot-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.chatbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    opacity: 0.7;
}

.chatbot-body {
    height: 400px;
    padding: 20px;
    overflow-y: auto;
    background: #f7fafc;
}

.chat-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chat-form input {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
}

.message.bot {
    background: #edf2f7;
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.message.user {
    background: #1a365d;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.chatbot-footer {
    padding: 15px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
}

.chatbot-footer input {
    flex: 1;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    outline: none;
}

#sendChatBtn {
    background: #1a365d;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a365d 0%, #2d3748 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(26, 54, 93, 0.3);
    cursor: pointer;
    z-index: 1001;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chatbot-trigger:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 15px 35px rgba(26, 54, 93, 0.4);
}

.chatbot-trigger i {
    font-size: 22px;
}

/* Hide trigger when body is active */
.chatbot-container.active + .chatbot-trigger,
.chatbot-container.active ~ .chatbot-trigger {
    opacity: 0;
    pointer-events: none;
    transform: scale(0);
}

@media (max-width: 480px) {
    .chatbot-container {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 20px;
    }
    .whatsapp-float {
        left: 20px;
        bottom: 20px;
        padding: 10px 15px;
    }
    .whatsapp-text { display: none; }
}
