
/* Chatbot Widget Styles */
:root {
    --chatbot-primary: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --chatbot-base-blue: #2563eb;
    --chatbot-glow: rgba(99, 102, 241, 0.5);
}

/* Launcher Button */
.chatbot-launcher {
    position: fixed;
    bottom: 30px;
    right: 105px; /* Shifted to avoid overlap with WhatsApp */
    width: 65px;
    height: 65px;
    background: var(--chatbot-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2), 0 0 20px var(--chatbot-glow);
    z-index: 9999;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: chatbot-pulse 2s infinite;
    visibility: visible;
}

.chatbot-launcher:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3), 0 0 30px var(--chatbot-glow);
}

.chatbot-launcher svg {
    width: 35px;
    height: 35px;
    fill: white;
}

@keyframes chatbot-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(37, 99, 235, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0);
    }
}

/* Chatbot Window */
.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 400px;
    height: 600px;
    min-width: 300px;
    min-height: 400px;
    max-width: 90vw;
    max-height: 80vh;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 
                inset 0 0 0 1px rgba(255, 255, 255, 0.3);
    z-index: 9998;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* Header */
.chatbot-header {
    padding: 15px 20px;
    background: var(--chatbot-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: move; /* Draggable indicator */
    user-select: none;
}

.chatbot-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-header-info img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: white;
    padding: 2px;
}

.chatbot-header-info h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.chatbot-header-controls {
    display: flex;
    gap: 10px;
}

.chatbot-control-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 14px;
}

.chatbot-control-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.chatbot-control-btn:active {
    transform: translateY(0);
}

/* Maximized State */
.chatbot-window.maximized {
    width: 95vw !important;
    height: 95vh !important;
    top: 2.5vh !important;
    left: 2.5vw !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(0, 0) scale(1) !important;
}

/* Content / Iframe */
.chatbot-content {
    flex: 1;
    position: relative;
    background: white;
}

.chatbot-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Resizer Handle */
.chatbot-resizer {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 10;
    background: linear-gradient(135deg, transparent 50%, rgba(99, 102, 241, 0.3) 50%);
}

/* Mobile Adjustments */
@media (max-width: 600px) {
    .chatbot-launcher {
        bottom: 100px; /* Stacked above WhatsApp */
        right: 30px;
        width: 55px;
        height: 55px;
    }

    .chatbot-window {
        width: calc(100vw - 40px);
        height: 60vh;
        right: 20px;
        bottom: 20px;
        z-index: 10002; /* Above everything when active */
    }
}
