/* Chatbot Widget Styles */
.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    z-index: 10001;
    overflow: hidden;
    transform: translateY(40px) scale(0.6) rotate(15deg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.chatbot-window.active {
    transform: translateY(0) scale(1) rotate(0deg);
    opacity: 1;
    pointer-events: all;
}

.chatbot-window::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 69, 0, 0.15) 0%, rgba(30, 144, 255, 0.15) 30%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(30, 144, 255, 0.1) 0%, rgba(255, 69, 0, 0.1) 30%, transparent 50%);
    animation: liquidSpinZoom 15s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes liquidSpinZoom {
    0% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.15);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.chatbot-header {
    background: rgba(10, 25, 47, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    margin: 0;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading, sans-serif);
}

.chat-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 15px;
    font-family: var(--font-body, sans-serif);
    scroll-behavior: smooth;
    will-change: transform;
}

.chat-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
}

.chat-msg.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-bottom-left-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.chat-msg.user {
    align-self: flex-end;
    background: rgba(255, 69, 0, 0.95);
    color: #fff;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 10px rgba(255, 69, 0, 0.2);
}

.chatbot-suggestions {
    padding: 10px 15px;
    background: transparent;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-body, sans-serif);
}

.suggestion-chip:hover {
    background: var(--secondary-color, #ff4500);
    color: #fff;
    border-color: var(--secondary-color, #ff4500);
}

.chatbot-input-area {
    padding: 15px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: 10px;
}

.chatbot-input-area input {
    flex: 1;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    font-family: var(--font-body, sans-serif);
    transition: all 0.3s;
}

.chatbot-input-area input:focus {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--secondary-color, #ff4500);
}

.chatbot-input-area button {
    background: var(--secondary-color, #ff4500);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.chatbot-input-area button:hover {
    background: #cc3700;
}

/* Chat Link Button (in widget) */
.chat-link {
    background-color: transparent;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    text-decoration: none;
    position: relative;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* Chat Pointer Come & Out Animation */
.chat-link::before {
    content: 'Chat with us!';
    position: absolute;
    right: calc(100% + 15px);
    background: var(--primary-color, #0A192F);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    font-family: sans-serif;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: pointerComeOut 5s infinite 2s;
}

.chat-link::after {
    content: '';
    position: absolute;
    right: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent var(--primary-color, #0A192F);
    opacity: 0;
    pointer-events: none;
    animation: pointerComeOutTriangle 5s infinite 2s;
}

@keyframes pointerComeOut {

    0%,
    15% {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }

    20% {
        opacity: 1;
        transform: translateX(-5px) scale(1.05);
    }

    25%,
    75% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateX(-3px) scale(1.02);
    }

    85%,
    100% {
        opacity: 0;
        transform: translateX(20px) scale(0.8);
    }
}

@keyframes pointerComeOutTriangle {

    0%,
    15% {
        opacity: 0;
        transform: translateY(-50%) translateX(20px) scale(0.8);
    }

    20% {
        opacity: 1;
        transform: translateY(-50%) translateX(-5px) scale(1.05);
    }

    25%,
    75% {
        opacity: 1;
        transform: translateY(-50%) translateX(0) scale(1);
    }

    80% {
        opacity: 1;
        transform: translateY(-50%) translateX(-3px) scale(1.02);
    }

    85%,
    100% {
        opacity: 0;
        transform: translateY(-50%) translateX(20px) scale(0.8);
    }
}

.bot-anim {
    animation: botFloat 3s ease-in-out infinite;
}


@keyframes botFloat {
    0% {
        transform: translateY(0);
        box-shadow: 0 5px 15px rgba(30, 144, 255, 0.4);
    }

    50% {
        transform: translateY(-8px);
        box-shadow: 0 12px 25px rgba(30, 144, 255, 0.6);
    }

    100% {
        transform: translateY(0);
        box-shadow: 0 5px 15px rgba(30, 144, 255, 0.4);
    }
}

.chat-link:hover {
    animation-play-state: paused;
}

.chat-link img {
    transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.chat-link:hover img {
    transform: rotate(180deg) scale(1.15);
}




/* Responsiveness for mobile */
@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 40px);
        right: 20px;
        bottom: 110px;
    }
}

/* Lead Generation Form */
.chatbot-lead-form {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 10px;
    margin-top: 10px;
    border: 1px solid rgba(255, 69, 0, 0.3);
}

.lead-input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: var(--font-body, sans-serif);
    font-size: 14px;
    box-sizing: border-box;
}

.lead-input:focus {
    border-color: var(--secondary-color, #ff4500);
    outline: none;
}

.lead-btn {
    width: 100%;
    padding: 10px;
    background: var(--secondary-color, #ff4500);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.lead-btn:hover {
    background: #cc3700;
}

.lead-btn:disabled {
    background: #999;
    cursor: not-allowed;
}