/* ===== Chatbot Premium Styles ===== */
.chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 12050;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 15px;
    pointer-events: none;
}

.chatbot-container .chatbot-fab,
.chatbot-container .chat-window {
    pointer-events: auto;
}

.chatbot-fab {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d83fd 0%, #012970 100%);
    box-shadow: 0 8px 25px rgba(13, 131, 253, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: #fff;
    font-size: 26px;
    border: none;
    position: relative;
}

.chatbot-fab:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 30px rgba(13, 131, 253, 0.5);
}

.chatbot-fab .badge {
    position: absolute;
    top: 0;
    right: 0;
    width: 15px;
    height: 15px;
    background: #ff4d4d;
    border-radius: 50%;
    border: 2px solid #fff;
}

.chat-window {
    width: 350px;
    height: 480px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    box-shadow: 0 15px 45px rgba(1, 41, 112, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform-origin: bottom right;
    animation: chatOpen 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chatOpen {
    from { opacity: 0; transform: scale(0.8) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-header {
    padding: 20px;
    background: linear-gradient(135deg, #012970 0%, #0d83fd 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header .bot-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .bot-info img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #fff;
    padding: 5px;
}

.chat-header h4 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #ffffff;
}

.chat-header .bot-info h4 {
    color: #ffffff;
}

.chat-header-status {
    font-size: 12px;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.92;
    margin-top: 2px;
    line-height: 1.2;
}

.chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f8faff;
}

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

.message.bot {
    align-self: flex-start;
    background: #fff;
    color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #0d83fd, #012970);
    color: #fff;
    border-bottom-right-radius: 2px;
}

.chat-input-area {
    padding: 15px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-input-area input {
    flex: 1;
    border: 1px solid #e1eefc;
    padding: 10px 15px;
    border-radius: 25px;
    outline: none;
    font-size: 14px;
    transition: all 0.3s;
}

.chat-input-area input:focus {
    border-color: #0d83fd;
    box-shadow: 0 0 0 3px rgba(13, 131, 253, 0.1);
}

.chat-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #0d83fd;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.chat-send-btn:hover {
    background: #012970;
    transform: scale(1.05);
}

.chat-header .chat-close-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 20px;
    padding: 0;
    line-height: 1;
}

/* Sit above mobile sticky CTA on homepage / contact */
body.index-page .chatbot-container,
body.contact-page .chatbot-container {
    bottom: 88px;
}

@media (min-width: 992px) {
    body.index-page .chatbot-container,
    body.contact-page .chatbot-container {
        bottom: 30px;
    }
}

/* Responsive Chat */
@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        height: 450px;
        right: 0;
    }
    .chatbot-container {
        right: 20px;
        bottom: 20px;
    }
}
