/*******************************/
/******** Chatbot CSS **********/
/*******************************/
.chatbot-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 10005;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    pointer-events: none;
}

.chatbot-toggle {
    width: 56px;
    height: 56px;
    background: #fdbe33;
    color: #030f27;
    border: none !important;
    outline: none !important;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    pointer-events: auto;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    background: #e6a71e;
}

.chatbot-window {
    width: 350px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    height: 450px;
}

.chatbot-window.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.chatbot-header {
    background: #030f27;
    color: #ffffff;
    padding: 15px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
}

.chatbot-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
}

.chatbot-avatar i {
    font-size: 20px;
}

.status-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    background: #28a745;
    border-radius: 50%;
    border: 2px solid #030f27;
}

.chatbot-info {
    display: flex;
    flex-direction: column;
}

.chatbot-name {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.chatbot-status {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 400;
}

.header-actions {
    display: flex;
    align-items: center;
}

.chatbot-header .close-btn {
    cursor: pointer;
    font-size: 20px;
    opacity: 0.8;
}

.chatbot-header .close-btn:hover {
    opacity: 1;
}

.chatbot-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    padding: 10px 15px;
    border-radius: 12px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.bot {
    background: #e9ecef;
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.chat-message.user {
    background: #fdbe33;
    color: #030f27;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
    font-weight: 500;
}

.bot-suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.chip-btn {
    background: #ffffff;
    border: 1px solid #fdbe33;
    color: #030f27 !important;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 11px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none !important;
    display: inline-block;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.chip-btn:hover {
    background: #fdbe33;
    color: #030f27 !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(253, 190, 51, 0.35);
}

.chatbot-footer {
    padding: 10px;
    background: #ffffff;
    border-top: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    gap: 10px;
}

.chatbot-footer input {
    flex: 1;
    border: 1px solid #ced4da;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
    font-size: 14px;
}

.chatbot-footer input:focus {
    border-color: #fdbe33;
}

.chatbot-footer button {
    background: #030f27;
    color: #fdbe33;
    border: none;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.chatbot-footer button:hover {
    background: #fdbe33;
    color: #030f27;
}

.chatbot-footer button.listening {
    background: #dc3545;
    color: #fff;
    animation: pulse 1.5s infinite;
}

/* Voice Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }

    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@media (max-width: 768px) {
    body.chatbot-open-mobile {
        overflow: hidden !important;
        touch-action: none;
    }

    .chatbot-container {
        right: 15px !important;
        bottom: 15px !important;
        z-index: 10005;
    }

    .chatbot-toggle {
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
    }

    .chatbot-window {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        z-index: 10010;
        display: flex;
        flex-direction: column;
        box-shadow: none;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.25s ease, transform 0.25s ease;
    }

    .chatbot-window.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: all;
    }

    /* Hide the floating toggle button when chatbot window is active on mobile */
    .chatbot-window.active + .chatbot-toggle {
        display: none !important;
    }

    .chatbot-header {
        padding: 14px 16px;
        padding-top: max(14px, env(safe-area-inset-top));
        border-radius: 0;
        flex-shrink: 0;
    }

    .chatbot-header .close-btn {
        font-size: 28px;
        line-height: 1;
        padding: 8px 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .chatbot-body {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        padding: 15px 14px;
    }

    .chatbot-footer {
        flex-shrink: 0;
        padding: 10px 12px;
        padding-bottom: max(10px, env(safe-area-inset-bottom));
        background: #ffffff;
        border-top: 1px solid #dee2e6;
        position: relative;
        z-index: 2;
    }

    .chatbot-footer input {
        font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
        padding: 10px 16px;
    }

    .chatbot-footer button {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
    }
}