
/* =========================================================
   K TECH CLANS AI ASSISTANT — FIXED COMPLETE VERSION
========================================================= */

#aiw-chatbot,
#aiw-chatbot * {
    box-sizing: border-box;
}

#aiw-chatbot {
    --primary: #015CAF;
    --primary-dark: #014485;
    --primary-light: #E7F0FA;
    --primary-lighter: #F3F8FD;

    --text-dark: #1B2430;
    --text-mid: #5B6472;
    --text-light: #8A93A0;

    --border: #E3E8EF;
    --bg: #F2F4F7;

    --live: #20C574;

    position: relative;

    width: 100%;
    max-width: 100%;

    margin: 0;

    overflow: hidden;

    background: var(--bg);

    color: var(--text-dark);

    font-family:
        "Segoe UI",
        -apple-system,
        BlinkMacSystemFont,
        Roboto,
        Arial,
        sans-serif;
}


/* =========================================================
   RESET INSIDE COMPONENT
========================================================= */

#aiw-chatbot h1,
#aiw-chatbot h2,
#aiw-chatbot h3,
#aiw-chatbot p,
#aiw-chatbot ul {
    margin-top: 0;
}

#aiw-chatbot button,
#aiw-chatbot input {
    font: inherit;
}

#aiw-chatbot a {
    -webkit-tap-highlight-color: transparent;
}


/* =========================================================
   AMBIENT BACKGROUND
========================================================= */

#aiw-chatbot .blob {
    position: absolute;

    border-radius: 50%;

    filter: blur(10px);

    opacity: .35;

    z-index: 0;

    pointer-events: none;
}

#aiw-chatbot .blob-1 {
    width: 420px;
    height: 420px;

    top: -140px;
    right: -120px;

    background:
        radial-gradient(
            circle,
            var(--primary) 0%,
            transparent 70%
        );
}

#aiw-chatbot .blob-2 {
    width: 280px;
    height: 280px;

    bottom: -80px;
    left: -60px;

    opacity: .15;

    background:
        radial-gradient(
            circle,
            var(--primary) 0%,
            transparent 70%
        );
}


/* =========================================================
   PAGE
========================================================= */

#aiw-chatbot .page {
    position: relative;

    z-index: 1;

    width: 100%;
    max-width: 1500px;

    margin: 0 auto;

    padding:
        56px
        40px
        80px;
}


/* =========================================================
   HERO
========================================================= */

#aiw-chatbot .hero {
    width: min(100%, 850px);

    margin:
        0 auto
        28px;

    text-align: center;
}

#aiw-chatbot .eyebrow {
    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 16px;

    padding:
        6px
        14px;

    color: var(--primary);

    background:
        var(--primary-lighter);

    border:
        1px solid
        var(--primary-light);

    border-radius: 20px;

    font-size: 11px;

    font-weight: 700;

    letter-spacing: .14em;

    text-transform: uppercase;
}

#aiw-chatbot .eyebrow .pulse,
#aiw-chatbot .video-banner .pulse {
    width: 6px;
    height: 6px;

    flex:
        0 0 6px;

    border-radius: 50%;

    background: var(--live);

    box-shadow:
        0 0 0 0
        rgba(32, 197, 116, .55);

    animation:
        aiwPulse
        1.8s infinite;
}

@keyframes aiwPulse {

    0% {
        box-shadow:
            0 0 0 0
            rgba(32,197,116,.55);
    }

    70% {
        box-shadow:
            0 0 0 6px
            rgba(32,197,116,0);
    }

    100% {
        box-shadow:
            0 0 0 0
            rgba(32,197,116,0);
    }
}


/* Use H2 because this is a homepage section */
#aiw-chatbot .hero h2 {
    margin:
        0;

    color:
        var(--text-dark);

    font-size:
        clamp(
            26px,
            3vw,
            34px
        );

    font-weight:
        400;

    line-height:
        1.3;
}

#aiw-chatbot .hero h2 strong {
    color:
        var(--primary);

    font-weight:
        700;
}

#aiw-chatbot .hero-description {
    width:
        min(
            100%,
            680px
        );

    margin:
        10px auto 0;

    color:
        var(--text-mid);

    font-size:
        13px;

    line-height:
        1.65;
}

#aiw-chatbot .explore-link {
    display:
        inline-flex;

    align-items:
        center;

    gap:
        6px;

    margin-top:
        14px;

    color:
        var(--primary);

    font-size:
        13px;

    font-weight:
        600;

    text-decoration:
        none;
}

#aiw-chatbot .explore-link:hover {
    text-decoration:
        underline;
}


/* =========================================================
   MAIN PANEL
========================================================= */

#aiw-chatbot .panel {
    display: grid;

    grid-template-columns:
        minmax(280px, 340px)
        minmax(0, 1fr);

    gap: 20px;

    align-items:
        stretch;
}


/* =========================================================
   VIDEO
========================================================= */

#aiw-chatbot .video-banner {
    position: relative;

    min-height: 380px;

    overflow: hidden;

    display: flex;

    align-items: flex-end;

    padding:
        26px
        24px;

    color: #ffffff;

    border-radius: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(1,20,45,.15),
            rgba(1,20,45,.9)
        ),
        #01152e;

    box-shadow:
        0 20px 60px
        rgba(1,92,175,.10),
        0 4px 12px
        rgba(1,92,175,.05);
}

#aiw-chatbot .video-banner::after {
    content: "";

    position: absolute;

    inset: 0;

    z-index: 1;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(1,20,45,.12),
            rgba(1,10,25,.90)
        );
}

#aiw-chatbot .video-banner video {
    position: absolute;

    inset: 0;

    z-index: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    background: #01152e;
}

#aiw-chatbot .banner-text {
    position: relative;

    z-index: 2;

    width: 100%;

    max-width: 520px;
}

#aiw-chatbot .video-banner .label {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom:
        8px;

    color:
        #8FC1FF;

    font-size:
        12px;

    font-weight:
        700;

    letter-spacing:
        .08em;

    text-transform:
        uppercase;
}

#aiw-chatbot .video-banner h3 {
    margin:
        0 0 8px;

    color:
        #ffffff;

    font-size:
        24px;

    font-weight:
        700;

    line-height:
        1.3;
}

#aiw-chatbot .video-banner p {
    margin: 0;

    color:
        #C8DCF4;

    font-size:
        14px;

    line-height:
        1.5;
}


/* =========================================================
   CHAT CARD
========================================================= */

#aiw-chatbot .chat-card {
    min-width: 0;

    display: flex;

    flex-direction: column;

    padding:
        20px
        20px
        18px;

    background:
        #ffffff;

    border:
        1px solid
        rgba(1,92,175,.05);

    border-radius:
        20px;

    box-shadow:
        0 20px 60px
        rgba(1,92,175,.10),
        0 4px 12px
        rgba(1,92,175,.05);
}


/* =========================================================
   CHAT HEADER
========================================================= */

#aiw-chatbot .chat-header {
    display: flex;

    align-items: center;

    gap: 14px;

    padding-bottom:
        16px;

    margin-bottom:
        16px;

    border-bottom:
        1px solid
        var(--border);
}

#aiw-chatbot .pip {
    position: relative;

    width: 52px;
    height: 52px;

    flex:
        0 0 52px;

    border-radius: 50%;
}

#aiw-chatbot .pip::before {
    content: "";

    position: absolute;

    inset: 0;

    border-radius: 50%;

    background:
        conic-gradient(
            from 0deg,
            var(--primary),
            #35A6FF,
            var(--primary)
        );

    animation:
        aiwSpin
        6s linear infinite;
}

@keyframes aiwSpin {
    to {
        transform:
            rotate(360deg);
    }
}

#aiw-chatbot .pip-inner {
    position: absolute;

    inset: 4px;

    z-index: 1;

    overflow: hidden;

    border-radius: 50%;

    background:
        #01152e;

    box-shadow:
        0 0 0 2px
        #ffffff;
}

#aiw-chatbot .pip-inner img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}

#aiw-chatbot .pip-dot {
    position: absolute;

    right: 0;
    bottom: 0;

    z-index: 3;

    width: 13px;
    height: 13px;

    border:
        2px solid
        #ffffff;

    border-radius: 50%;

    background:
        var(--live);
}

#aiw-chatbot .titles {
    flex: 1;

    min-width: 0;
}

#aiw-chatbot .titles h3 {
    margin: 0;

    color:
        var(--text-dark);

    font-size:
        15px;

    font-weight:
        700;
}

#aiw-chatbot .titles p {
    margin:
        3px 0 0;

    color:
        var(--primary);

    font-size:
        12px;
}

#aiw-chatbot .status-thinking {
    color:
        var(--primary);

    font-size:
        12px;

    white-space:
        nowrap;

    opacity: 0;

    transition:
        opacity .2s;
}

#aiw-chatbot .status-thinking.show {
    opacity: 1;
}


/* =========================================================
   MESSAGES
========================================================= */

#aiw-chatbot .messages {
    flex: 1;

    min-height:
        280px;

    max-height:
        420px;

    overflow-y:
        auto;

    display:
        flex;

    flex-direction:
        column;

    gap:
        12px;

    margin-bottom:
        16px;

    padding:
        4px 4px
        4px 0;

    scroll-behavior:
        smooth;
}

#aiw-chatbot .messages:empty::before {
    content:
        "Ask me anything about K Tech Clans services";

    min-height:
        280px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    text-align:
        center;

    color:
        var(--text-light);

    font-size:
        13px;
}

#aiw-chatbot .messages::-webkit-scrollbar {
    width: 6px;
}

#aiw-chatbot .messages::-webkit-scrollbar-thumb {
    background:
        var(--border);

    border-radius:
        6px;
}

#aiw-chatbot .msg {
    max-width:
        86%;

    padding:
        10px
        14px;

    border-radius:
        14px;

    font-size:
        13.5px;

    line-height:
        1.55;

    overflow-wrap:
        anywhere;

    animation:
        aiwPop
        .25s ease;
}

@keyframes aiwPop {

    from {
        opacity: 0;

        transform:
            translateY(6px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}

#aiw-chatbot .msg.user {
    align-self:
        flex-end;

    color:
        #ffffff;

    background:
        var(--primary);

    border-bottom-right-radius:
        4px;
}

#aiw-chatbot .msg.bot {
    align-self:
        flex-start;

    color:
        var(--text-dark);

    background:
        var(--primary-lighter);

    border:
        1px solid
        var(--primary-light);

    border-bottom-left-radius:
        4px;
}

#aiw-chatbot .msg.bot b,
#aiw-chatbot .msg.bot strong {
    color:
        var(--primary-dark);
}

#aiw-chatbot .msg.bot ul {
    margin:
        7px 0 0
        18px;

    padding: 0;
}

#aiw-chatbot .msg.bot li {
    margin-bottom:
        3px;
}


/* =========================================================
   CHAT LINKS / CTA
========================================================= */

#aiw-chatbot .msg-cta {
    display:
        inline-block;

    margin-top:
        9px;

    padding:
        8px
        14px;

    color:
        #ffffff !important;

    background:
        var(--primary);

    border:
        none;

    border-radius:
        20px;

    font-size:
        12px;

    font-weight:
        600;

    text-decoration:
        none !important;

    cursor:
        pointer;

    transition:
        background .15s,
        transform .1s;
}

#aiw-chatbot .msg-cta:hover {
    background:
        var(--primary-dark);

    transform:
        translateY(-1px);
}

#aiw-chatbot .aiw-service-link {
    color:
        var(--primary-dark);

    font-weight:
        700;

    text-decoration:
        none;
}

#aiw-chatbot .aiw-service-link:hover {
    color:
        var(--primary);

    text-decoration:
        underline;
}

#aiw-chatbot .aiw-service-arrow {
    display:
        inline-block;

    margin-left:
        4px;

    color:
        var(--primary);

    transition:
        transform .15s;
}

#aiw-chatbot .aiw-service-link:hover
.aiw-service-arrow {
    transform:
        translateX(3px);
}

#aiw-chatbot .aiw-service-disabled {
    color:
        var(--text-dark);

    font-weight:
        600;
}


/* =========================================================
   INPUT
========================================================= */

#aiw-chatbot .input-row {
    display: flex;

    gap: 10px;

    margin-bottom:
        14px;
}

#aiw-chatbot .input-row input {
    flex: 1;

    min-width: 0;

    min-height:
        44px;

    padding:
        11px
        16px;

    color:
        var(--text-dark);

    background:
        #ffffff;

    border:
        1.5px solid
        var(--primary-light);

    border-radius:
        24px;

    outline:
        none;

    font-size:
        13.5px;

    transition:
        border-color .15s,
        box-shadow .15s;
}

#aiw-chatbot .input-row input::placeholder {
    color:
        var(--text-light);
}

#aiw-chatbot .input-row input:focus {
    border-color:
        var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(1,92,175,.12);
}

#aiw-chatbot .send-btn {
    width: 44px;
    height: 44px;

    flex:
        0 0 44px;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 0;

    color:
        #ffffff;

    background:
        var(--primary);

    border:
        none;

    border-radius:
        50%;

    cursor:
        pointer;

    transition:
        background .15s,
        transform .1s;
}

#aiw-chatbot .send-btn:hover {
    background:
        var(--primary-dark);

    transform:
        scale(1.04);
}

#aiw-chatbot .send-btn:focus-visible,
#aiw-chatbot .chip:focus-visible,
#aiw-chatbot .msg-cta:focus-visible,
#aiw-chatbot .aiw-service-link:focus-visible,
#aiw-chatbot .explore-link:focus-visible {
    outline:
        3px solid
        rgba(1,92,175,.22);

    outline-offset:
        3px;
}

#aiw-chatbot .send-btn svg {
    width:
        18px;

    height:
        18px;
}

#aiw-chatbot #aiwChatInput:disabled,
#aiw-chatbot .send-btn:disabled {
    opacity:
        .55;

    cursor:
        not-allowed;
}


/* =========================================================
   SUGGESTIONS
========================================================= */

#aiw-chatbot .suggestions {
    display:
        flex;

    flex-wrap:
        wrap;

    gap:
        8px;
}

#aiw-chatbot .chip {
    padding:
        7px
        13px;

    color:
        var(--primary-dark);

    background:
        var(--primary-lighter);

    border:
        1px solid
        var(--primary-light);

    border-radius:
        16px;

    font-size:
        12px;

    cursor:
        pointer;

    transition:
        background .15s,
        color .15s,
        border-color .15s;
}

#aiw-chatbot .chip:hover {
    color:
        #ffffff;

    background:
        var(--primary);

    border-color:
        var(--primary);
}


/* =========================================================
   TYPING
========================================================= */

#aiw-chatbot .dot {
    display:
        inline-block;

    width:
        6px;

    height:
        6px;

    margin-right:
        3px;

    background:
        var(--primary);

    border-radius:
        50%;

    opacity:
        .4;

    animation:
        aiwBlink
        1.2s infinite ease-in-out;
}

#aiw-chatbot .dot:nth-child(2) {
    animation-delay:
        .2s;
}

#aiw-chatbot .dot:nth-child(3) {
    animation-delay:
        .4s;
}

@keyframes aiwBlink {

    0%,
    80%,
    100% {
        opacity:
            .25;

        transform:
            translateY(0);
    }

    40% {
        opacity:
            1;

        transform:
            translateY(-2px);
    }
}


/* =========================================================
   ACCESSIBILITY HELPER
========================================================= */

#aiw-chatbot .aiw-sr-only {
    position:
        absolute !important;

    width:
        1px !important;

    height:
        1px !important;

    padding:
        0 !important;

    margin:
        -1px !important;

    overflow:
        hidden !important;

    clip:
        rect(0,0,0,0) !important;

    white-space:
        nowrap !important;

    border:
        0 !important;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    #aiw-chatbot .page {
        padding:
            50px
            24px
            65px;
    }

    #aiw-chatbot .panel {
        grid-template-columns:
            300px
            minmax(0, 1fr);
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 720px) {

    #aiw-chatbot .page {
        padding:
            40px
            14px
            60px;
    }

    #aiw-chatbot .panel {
        grid-template-columns:
            1fr;
    }

    #aiw-chatbot .video-banner {
        min-height:
            220px;
    }

    #aiw-chatbot .hero h2 {
        font-size:
            26px;
    }
}


@media (max-width: 560px) {

    #aiw-chatbot .chat-card {
        padding:
            16px
            14px
            14px;

        border-radius:
            16px;
    }

    #aiw-chatbot .video-banner {
        min-height:
            190px;

        padding:
            18px;

        border-radius:
            16px;
    }

    #aiw-chatbot .video-banner h3 {
        font-size:
            20px;
    }

    #aiw-chatbot .pip {
        width:
            44px;

        height:
            44px;

        flex-basis:
            44px;
    }

    #aiw-chatbot .status-thinking {
        display:
            none;
    }

    #aiw-chatbot .msg {
        max-width:
            92%;
    }

    #aiw-chatbot .suggestions {
        gap:
            6px;
    }

    #aiw-chatbot .chip {
        font-size:
            11px;

        padding:
            7px
            10px;
    }
}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    #aiw-chatbot *,
    #aiw-chatbot *::before,
    #aiw-chatbot *::after {
        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;

        scroll-behavior:
            auto !important;
    }
}
