﻿.chatbot-toggle {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #1bb5cc, #064a97);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(27, 181, 204, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border: 3px solid #ffffff;
    outline: none;
}

    .chatbot-toggle:hover {
        transform: scale(1.05);
    }

    .chatbot-toggle i {
        color: #ffffff;
        transition: all 0.3s ease;
        position: absolute;
    }

    .chatbot-toggle .close-icon {
        opacity: 0;
        transform: rotate(180deg) scale(0.8);
    }

    .chatbot-toggle.active .message-icon {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }

    .chatbot-toggle.active .close-icon {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }

    .chatbot-toggle.active {
        transform: scale(0.95);
    }

/* Hover Tooltip */

.chatbot-tooltip {
    position: absolute;
    right: 85px;
    top: 50%;
    transform: translateY(-50%);
    background: #ffffff;
    color: #111111;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    border: 1.2px solid rgba(27, 181, 204, 0.22);
    z-index: 999;
}

    .chatbot-tooltip::after {
        content: '';
        position: absolute;
        left: 100%;
        top: 50%;
        transform: translateY(-50%);
        border: 6px solid transparent;
        border-left-color: #ffffff;
    }

.chatbot-toggle:hover .chatbot-tooltip {
    opacity: 1;
    visibility: visible;
}

.chatbot-toggle.active .chatbot-tooltip {
    display: none;
}

/* Chat Container */
.chat-container {
    position: fixed;
    bottom: 105px;
    right: 25px;
    width: 400px;
    height: 550px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(17, 17, 17, 0.15);
    display: none;
    flex-direction: column;
    z-index: 999;
    overflow: hidden;
    border: 2px solid rgba(27, 181, 204, 0.1);
}

    .chat-container.active {
        display: flex;
        animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 99999;
    }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Chat Header */
.chat-header {
    background: linear-gradient(135deg, #1bb5cc, #064a97);
    padding: 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 16px;
}

.chat-header-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .chat-header-icon i {
        color: #ffffff;
    }

.chat-header-text {
    flex: 1;
}

.chat-header-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.chat-header-subtitle {
    font-size: 14px;
    opacity: 0.85;
    font-weight: 400;
}

/* Chat Messages */
.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #ffffff;
}

    .chat-messages::-webkit-scrollbar {
        width: 4px;
    }

    .chat-messages::-webkit-scrollbar-track {
        background: #f1f1f1;
    }

    .chat-messages::-webkit-scrollbar-thumb {
        background: #1bb5cc;
        border-radius: 2px;
    }

.welcome-message {
    text-align: center;
    color: #666;
    font-size: 15px;
    margin-top: 60px;
    padding: 0 20px;
}

    .welcome-message .welcome-icon {
        width: 60px;
        height: 60px;
        background: #1bb5cc;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 20px;
        box-shadow: 0 4px 16px rgba(27, 181, 204, 0.25);
    }

        .welcome-message .welcome-icon i {
            color: #ffffff;
        }

    .welcome-message h3 {
        color: #111111;
        font-size: 20px;
        font-weight: 700;
        margin-bottom: 8px;
    }

    .welcome-message p {
        color: #666;
        line-height: 1.5;
        font-size: 14px;
    }

/* Message Styles */
.message {
    display: flex;
    margin-bottom: 12px;
    align-items: flex-start;
    gap: 8px;
}

    .message.user {
        justify-content: flex-end;
    }

    .message.bot {
        justify-content: flex-start;
    }

.message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.message.bot .message-avatar {
    background: #1bb5cc;
}

    .message.bot .message-avatar i {
        color: #ffffff;
        font-size: 14px;
    }

.message-content {
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.message.user .message-content {
    background: #1bb5cc;
    color: #ffffff;
    border-bottom-right-radius: 6px;
}

.message.bot .message-content {
    background: #f8f9fa;
    color: #111111;
    border-bottom-left-radius: 6px;
    border: 1px solid rgba(27, 181, 204, 0.1);
}



/* Typing Indicator */
.typing-indicator {
    padding: 16px 20px;
    background: #f8f9fa;
    border-radius: 20px;
    border-bottom-left-radius: 8px;
    max-width: 70%;
    border: 1px solid rgba(27, 181, 204, 0.08);
    margin-bottom: 12px;
}

.typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.typing-indicator-container {
    display: none;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

    .typing-indicator-container.visible {
        display: flex;
    }

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #1bb5cc;
    display: inline-block;
    animation: typingPulse 1.6s infinite ease-in-out;
}

    .typing-dot:nth-child(2) {
        animation-delay: 0.3s;
    }

    .typing-dot:nth-child(3) {
        animation-delay: 0.6s;
    }

@keyframes typingPulse {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }

    30% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Online Dot Animation */
.online-dot {
    animation: onlinePulse 2s infinite ease-in-out;
}

@keyframes onlinePulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1.1);
    }

    50% {
        opacity: 0.9;
        transform: scale(0.6);
    }
}

/* Chat Input */
.chat-input-container {
    padding: 16px 20px;
    background: #ffffff;
    border-top: 1px solid rgba(27, 181, 204, 0.1);
}

.chat-input-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1px solid rgba(27, 181, 204, 0.3);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 40px;
    max-height: 80px;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #111111;
    height:70px;
}

    .chat-input:focus {
        border-color: #1bb5cc;
        box-shadow: 0 0 0 3px rgba(27, 181, 204, 0.1);
    }

    .chat-input::placeholder {
        color: #999;
    }

.send-button {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1bb5cc, #064a97);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(27, 181, 204, 0.2);
}

    .send-button:active {
        transform: translateY(1px);
    }

    .send-button:disabled {
        opacity: 0.6;
        transform: none;
    }

    .send-button i {
        color: #ffffff;
        font-size: 16px;
    }


/* Lead Capture Modal */
.lead-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    border-radius: 20px;
}

    .lead-modal.show {
        display: flex;
    }

.lead-modal-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    max-width: 340px;
    width: 90%;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    position: relative;
}

.lead-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

    .lead-modal-close:hover {
        background: #f0f0f0;
        color: #666;
    }

.lead-modal h3 {
    color: #111111;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.lead-modal p {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 20px;
}

.lead-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.lead-input {
    border: 1px solid rgba(27, 181, 204, 0.3);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease;
    background: #ffffff;
    color: #111111;
}

    .lead-input:focus {
        border-color: #1bb5cc;
        box-shadow: 0 0 0 3px rgba(27, 181, 204, 0.1);
    }

    .lead-input::placeholder {
        color: #999;
    }

.lead-submit {
    background: linear-gradient(135deg, #1bb5cc, #064a97);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

    .lead-submit:hover:not(:disabled) {
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(27, 181, 204, 0.3);
    }

    .lead-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* Mobile Responsiveness */
@media (max-width: 450px) {
    .chat-container {
        right: 15px;
        left: 15px;
        width: auto;
        bottom: 95px;
    }

    .chatbot-toggle {
        right: 20px;
        bottom: 20px;
        width: 60px;
        height: 60px;
    }

        .chatbot-toggle i {
            font-size: 24px;
        }
}


@media (max-width: 768px) {
    .chatbot-tooltip span:last-child {
        font-size: 13px;
    }
}
