﻿

:root {
    /* NDIS-inspired palette */
    --ndis-purple: #5B2B82;
    --ndis-purple-dark: #442062;
    --ndis-teal: #009CA7;
    --ndis-bg: #f5f4f8;
    --ndis-bubble-user: #5B2B82;
    --ndis-bubble-assistant: #ffffff;
    --ndis-border: #ded7ea;
    --ai-steel-blue: #4682B4;
    --ai-deep-navy: #0C1724;
    --ai-deep-navy-soft: #101D30;
    --ai-soft-border: rgba(255, 255, 255, 0.08);
    --ai-soft-white: rgba(255, 255, 255, 0.85);
}

/* Floating Chat Button – bottom right, purple → blue hover */
.chat-fab {
    position: fixed;
    bottom: 52px;
    right: 20px;
    z-index: 9999;
    /* pill shape */
    border-radius: 999px;
    border: 3px solid #ffffff;
    /* size & layout */
    min-width: 94px;
    height: 56px;
    padding: 0 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    /* text */
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    /* colours & effects */
    background-color: #6B2976; /* purple default */
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    cursor: pointer;
   
    opacity: 1;
    transition: opacity 0.3s ease, transform 0.3s ease;
}


    /* When close to contact section */
    .chat-fab.fade-out {
        opacity: 0;
        transform: translateY(6px); /* optional: sink slightly */
        pointer-events: none; /* don’t allow clicks while faded */
        /* no display: none here */
    }

    /* text inside */
    .chat-fab span {
        line-height: 1;
    }

/* we keep .chat-ai-btn only for layout extras, no colours here */
.chat-ai-btn {
    background-color: #6B2976;
    border: none;
    animation: none;
}

/* hover: turn blue and lift slightly */
.chat-fab:hover {
    background-color: #4682B4; /* Steel Blue on hover */
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.35);
}




.text-white-75 {
    color: rgba(255, 255, 255, 0.75) !important;
}

.ai-shell {
    background: radial-gradient(circle at top left, #244b6f 0%, #0a1524 45%, #03060c 100%);
    border-radius: 1.75rem;
    position: relative;
    padding: 2.25rem 2.25rem 2rem;
    color: #fff;
    overflow: hidden;
}

.ai-shell-glow {
    position: absolute;
    inset: -30%;
    opacity: 0.35;
    background: radial-gradient(circle at top left, rgba(70, 130, 180, 0.55), transparent 55%), radial-gradient(circle at bottom right, rgba(38, 198, 218, 0.18), transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.ai-shell-inner {
    position: relative;
    z-index: 1;
}

.ai-avatar {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: radial-gradient(circle at 30% 0%, #fff, #c4d9f0);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.ai-avatar-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--ai-steel-blue), #2c648e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
}

.ai-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.24);
    display: inline-block;
}

.ai-badge-pill {
    border-radius: 999px;
    background: rgba(3, 169, 244, 0.14);
    color: #e0f3ff;
    border: 1px solid rgba(144, 202, 249, 0.4);
    padding: 0.35rem 0.9rem;
}

.ai-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    align-items: center;
}

.ai-chip {
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: rgba(255, 255, 255, 0.86);
    background: rgba(10, 25, 41, 0.65);
    padding: 0.2rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(16px);
    transition: all 0.16s ease;
}

    .ai-chip:hover {
        background: rgba(70, 130, 180, 0.22);
        border-color: rgba(70, 130, 180, 0.8);
        color: #fff;
        transform: translateY(-1px);
    }

.chat-bubble {
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
    .chat-bubble.bg-light {
        color: #212529; /* Bootstrap dark text */
    }

#chatContainer.ai-chat-card {
    background: linear-gradient(140deg, rgba(6, 14, 28, 0.95), rgba(9, 23, 41, 0.98));
    border-radius: 1.4rem;
    border: 1px solid var(--ai-soft-border);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.02);
    height: 540px;
}

#chatWindow.ai-chat-window {
    background: radial-gradient(circle at top left, rgba(70, 130, 180, 0.16), transparent 55%), radial-gradient(circle at bottom right, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.95));
    border-radius: 1rem;
    padding: 0.9rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
    color: var(--ai-soft-white);
    font-size: 0.95rem;
}

    #chatWindow.ai-chat-window::-webkit-scrollbar {
        width: 6px;
    }

    #chatWindow.ai-chat-window::-webkit-scrollbar-track {
        background: transparent;
    }

    #chatWindow.ai-chat-window::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.22);
        border-radius: 999px;
    }

.ai-typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #b0b0b0; /* light grey text */
}

/* Nudge the text up slightly */
.ai-typing-label {
    transform: translateY(-2px); /* adjust -1 / -3px to taste */
    display: inline-block;
}

/* Typing dots */
.ai-typing-dot {
    width: 12px; /* bigger dots */
    height: 12px;
    border-radius: 50%;
    background-color: #d0d0d0; /* light grey base */
    display: inline-block;
    animation: typingWave 1s infinite ease-in-out;
}

    /* Left → right wave via staggered delays */
    .ai-typing-dot:nth-child(1) {
        animation-delay: 0s;
    }

    .ai-typing-dot:nth-child(2) {
        animation-delay: 0.15s;
    }

    .ai-typing-dot:nth-child(3) {
        animation-delay: 0.3s;
    }

@keyframes typingWave {
    0%, 80%, 100% {
        background-color: #d0d0d0; /* light grey */
        transform: translateY(0);
    }

    40% {
        background-color: #555555; /* dark grey highlight */
        transform: translateY(-3px);
    }
}


.ai-input-group .ai-input-addon {
    border-radius: 999px 0 0 999px;
    background: rgba(4, 10, 20, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-right: none;
    color: rgba(255, 255, 255, 0.75);
}

.ai-input-group .ai-input {
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    border-right: none;
    background: rgba(5, 13, 24, 0.85);
    color: #fff;
    box-shadow: none;
}

.ai-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.ai-input:focus {
    background: rgba(6, 16, 30, 0.95);
    border-color: rgba(70, 130, 180, 0.7);
    box-shadow: 0 0 0 1px rgba(70, 130, 180, 0.6);
    color: #fff;
}

.ai-icon-btn {
    border-radius: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    border-left: none;
    border-right: none;
    background: rgba(8, 20, 36, 0.85);
    color: rgba(255, 255, 255, 0.75);
}

    .ai-icon-btn:hover {
        background: rgba(10, 26, 46, 0.95);
    }

#chatContainer .btn-primary.ai-send-btn {
    border-radius: 0 999px 999px 0;
    background: var(--ai-steel-blue);
    border-color: var(--ai-steel-blue);
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    padding-inline: 1rem;
}

    #chatContainer .btn-primary.ai-send-btn:hover {
        background: #376792;
        border-color: #376792;
        box-shadow: 0 0 0 1px rgba(150, 202, 255, 0.35);
    }

#chatContainer .bg-primary {
    background-color: var(--ai-steel-blue) !important;
}

#chatContainer .text-white {
    color: #fff !important;
}

@media (max-width: 576px) {
    .ai-shell {
        padding: 1.5rem 1.25rem;
    }

    #chatContainer.ai-chat-card {
        height: 480px;
    }
}

@keyframes attentionCycle {
    0% {
        transform: translateY(0);
    }
    /* Start normal */
    10% {
        transform: translateY(-10px);
    }
    /* Bounce up */
    20% {
        transform: translateY(0);
    }

    40% {
        transform: rotate(5deg);
    }
    /* Wiggle right */
    50% {
        transform: rotate(-5deg);
    }
    /* Wiggle left */
    60% {
        transform: rotate(0deg);
    }

    80% {
        transform: translateX(10px);
    }
    /* Slide right */
    90% {
        transform: translateX(-10px);
    }
    /* Slide left */
    100% {
        transform: translateX(0);
    }
    /* Back to normal */
}

.attention-icon {
    display: inline-block;
    animation: attentionCycle 3s infinite; /* Runs continuously */
    transition: transform 0.3s ease;
    cursor: pointer; /* Optional: shows it's interactive */
}