/* BRAHM_SITE_BOT_CSS_V5_TRUE_AI_ADAPTIVE_PROJECT_CONSULTANT */
/* BRAHM_SITE_BOT_CSS_V1 */

.brahm-site-bot{
    --bsb-bg:#0b1020;
    --bsb-surface:#111827;
    --bsb-surface-2:#182238;
    --bsb-text:#f8fafc;
    --bsb-muted:#a8b2c5;
    --bsb-line:rgba(255,255,255,.10);
    --bsb-primary:#8064f4;
    --bsb-primary-2:#6547df;
    --bsb-cyan:#59d6e8;
    --bsb-green:#5ed9a1;
    --bsb-danger:#ff8997;
    --bsb-shadow:0 28px 78px rgba(0,0,0,.42);
    position:relative;
    z-index:1800;
    font-family:'Inter','Noto Sans Devanagari',system-ui,sans-serif;
}

body.light-mode .brahm-site-bot{
    --bsb-bg:#f4f7fb;
    --bsb-surface:#ffffff;
    --bsb-surface-2:#edf2f8;
    --bsb-text:#111827;
    --bsb-muted:#647084;
    --bsb-line:rgba(15,23,42,.10);
    --bsb-shadow:0 24px 64px rgba(15,23,42,.18);
}

.brahm-bot-launcher{
    position:fixed;
    right:22px;
    bottom:var(--brahm-bot-desktop-bottom,22px);
    z-index:1801;
    min-width:164px;
    min-height:56px;
    padding:8px 14px 8px 8px;
    display:flex;
    align-items:center;
    gap:10px;
    border:1px solid rgba(255,255,255,.13);
    border-radius:19px;
    background:linear-gradient(145deg,rgba(17,24,39,.96),rgba(11,16,32,.96));
    color:#fff;
    box-shadow:0 18px 48px rgba(0,0,0,.34),0 0 0 1px rgba(128,100,244,.12);
    cursor:pointer;
    backdrop-filter:blur(16px);
    -webkit-backdrop-filter:blur(16px);
    transition:transform .2s ease,box-shadow .2s ease,opacity .2s ease;
}

body.light-mode .brahm-bot-launcher{
    border-color:rgba(15,23,42,.10);
    background:rgba(255,255,255,.96);
    color:#111827;
}

.brahm-bot-launcher:hover{
    transform:translateY(-3px);
    box-shadow:0 22px 58px rgba(0,0,0,.40),0 0 0 1px rgba(128,100,244,.22);
}

.brahm-bot-launcher.hidden{
    opacity:0;
    pointer-events:none;
    transform:translateY(12px) scale(.96);
}

.brahm-bot-launcher-icon{
    width:40px;
    height:40px;
    display:grid;
    place-items:center;
    border-radius:13px;
    background:linear-gradient(135deg,var(--bsb-primary),var(--bsb-primary-2));
    box-shadow:0 10px 24px rgba(101,71,223,.32);
    font-size:20px;
}

.brahm-bot-launcher-copy{
    min-width:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    line-height:1.05;
}

.brahm-bot-launcher-copy strong{
    font-size:13px;
    font-weight:800;
}

.brahm-bot-launcher-copy small{
    margin-top:5px;
    color:#aeb8cb;
    font-size:9.5px;
    font-weight:700;
}

body.light-mode .brahm-bot-launcher-copy small{
    color:#647084;
}

.brahm-bot-live-dot{
    width:8px;
    height:8px;
    margin-left:auto;
    border-radius:50%;
    background:var(--bsb-green);
    box-shadow:0 0 0 5px rgba(94,217,161,.12);
    animation:brahmBotPulse 2.2s ease-in-out infinite;
}

@keyframes brahmBotPulse{
    0%,100%{transform:scale(1);opacity:1}
    50%{transform:scale(.78);opacity:.62}
}

.brahm-bot-panel{
    position:fixed;
    right:22px;
    bottom:86px;
    z-index:1802;
    width:min(390px,calc(100vw - 32px));
    height:min(610px,calc(100dvh - 112px));
    min-height:430px;
    display:grid;
    grid-template-rows:auto auto minmax(0,1fr) auto auto auto;
    overflow:hidden;
    border:1px solid var(--bsb-line);
    border-radius:24px;
    background:linear-gradient(180deg,var(--bsb-bg),var(--bsb-surface));
    color:var(--bsb-text);
    box-shadow:var(--bsb-shadow);
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transform:translateY(18px) scale(.975);
    transform-origin:bottom right;
    transition:opacity .22s ease,transform .22s ease,visibility .22s ease;
}

.brahm-bot-panel.open{
    opacity:1;
    visibility:visible;
    pointer-events:auto;
    transform:translateY(0) scale(1);
}

.brahm-bot-panel.minimized{
    height:74px;
    min-height:74px;
    grid-template-rows:auto;
}

.brahm-bot-panel.minimized > :not(.brahm-bot-header){
    display:none!important;
}

.brahm-bot-header{
    min-height:72px;
    padding:12px 13px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    border-bottom:1px solid var(--bsb-line);
    background:linear-gradient(135deg,rgba(128,100,244,.13),rgba(89,214,232,.04));
}

.brahm-bot-identity{
    min-width:0;
    display:flex;
    align-items:center;
    gap:10px;
}

.brahm-bot-avatar{
    width:42px;
    height:42px;
    flex:0 0 42px;
    display:grid;
    place-items:center;
    border:1px solid rgba(255,255,255,.15);
    border-radius:14px;
    background:linear-gradient(135deg,var(--bsb-primary),var(--bsb-primary-2));
    box-shadow:0 10px 24px rgba(101,71,223,.28);
    font-size:20px;
}

.brahm-bot-identity strong{
    display:block;
    overflow:hidden;
    color:var(--bsb-text);
    font-size:14px;
    font-weight:800;
    white-space:nowrap;
    text-overflow:ellipsis;
}

.brahm-bot-identity > div:last-child > span{
    margin-top:5px;
    display:flex;
    align-items:center;
    gap:6px;
    color:var(--bsb-muted);
    font-size:10px;
    font-weight:700;
}

.brahm-bot-identity i{
    width:7px;
    height:7px;
    border-radius:50%;
    background:var(--bsb-green);
}

.brahm-bot-header-actions{
    display:flex;
    align-items:center;
    gap:5px;
}

.brahm-bot-header-btn{
    width:34px;
    height:34px;
    padding:0;
    display:grid;
    place-items:center;
    border:1px solid var(--bsb-line);
    border-radius:10px;
    background:var(--bsb-surface);
    color:var(--bsb-text);
    text-decoration:none;
    font-size:15px;
    font-weight:800;
    cursor:pointer;
    transition:.17s ease;
}

.brahm-bot-header-btn:hover{
    border-color:rgba(128,100,244,.42);
    transform:translateY(-1px);
}

.brahm-bot-header-btn.muted{
    border-color:rgba(255,137,151,.32);
    background:rgba(255,137,151,.10);
    color:var(--bsb-danger);
}


.brahm-bot-usage{
    padding:8px 13px;
    border-bottom:1px solid var(--bsb-line);
    background:rgba(232,184,92,.08);
    color:#e9c982;
    font-size:9.5px;
    font-weight:800;
    text-align:center;
}

body.light-mode .brahm-bot-usage{
    color:#7b570f;
}

.brahm-bot-messages{
    min-height:0;
    padding:16px 14px 12px;
    display:flex;
    flex-direction:column;
    gap:11px;
    overflow-y:auto;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    scrollbar-color:rgba(128,100,244,.45) transparent;
}

.brahm-bot-message{
    max-width:88%;
    position:relative;
    padding:11px 13px;
    border-radius:16px;
    font-size:12.5px;
    line-height:1.62;
    word-break:break-word;
}

.brahm-bot-message.assistant{
    align-self:flex-start;
    border:1px solid var(--bsb-line);
    border-bottom-left-radius:5px;
    background:var(--bsb-surface-2);
    color:var(--bsb-text);
}

.brahm-bot-message.user{
    align-self:flex-end;
    border-bottom-right-radius:5px;
    background:linear-gradient(135deg,var(--bsb-primary),var(--bsb-primary-2));
    color:#fff;
}

.brahm-bot-message.system{
    max-width:100%;
    align-self:stretch;
    border:1px dashed rgba(128,100,244,.35);
    background:rgba(128,100,244,.08);
    color:var(--bsb-muted);
    text-align:center;
    font-size:10.5px;
}

.brahm-bot-message.error{
    border-color:rgba(255,137,151,.28);
    background:rgba(255,137,151,.09);
    color:#ffc1ca;
}

body.light-mode .brahm-bot-message.error{
    color:#a12e3d;
}

.brahm-bot-message a{
    color:var(--bsb-cyan);
    font-weight:800;
}

.brahm-bot-message p{
    margin:0 0 8px;
}

.brahm-bot-message p:last-child{
    margin-bottom:0;
}

.brahm-bot-message ul,
.brahm-bot-message ol{
    margin:8px 0 0;
    padding-left:18px;
}

.brahm-bot-message-actions{
    max-width:92%;
    align-self:flex-start;
    display:flex;
    flex-wrap:wrap;
    gap:7px;
    margin-top:-4px;
}

.brahm-bot-action{
    min-height:34px;
    padding:0 10px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid rgba(128,100,244,.30);
    border-radius:10px;
    background:rgba(128,100,244,.09);
    color:var(--bsb-text);
    font-size:10px;
    font-weight:800;
    text-decoration:none;
    cursor:pointer;
}

.brahm-bot-action.primary{
    border-color:transparent;
    background:linear-gradient(135deg,var(--bsb-primary),var(--bsb-primary-2));
    color:#fff;
}

.brahm-bot-thinking{
    display:inline-flex;
    align-items:center;
    gap:4px;
}

.brahm-bot-thinking i{
    width:5px;
    height:5px;
    border-radius:50%;
    background:currentColor;
    animation:brahmBotThinking 1.1s infinite ease-in-out;
}

.brahm-bot-thinking i:nth-child(2){animation-delay:.14s}
.brahm-bot-thinking i:nth-child(3){animation-delay:.28s}

@keyframes brahmBotThinking{
    0%,80%,100%{transform:translateY(0);opacity:.35}
    40%{transform:translateY(-4px);opacity:1}
}

.brahm-bot-quick-actions{
    padding:8px 13px 10px;
    display:flex;
    gap:7px;
    overflow-x:auto;
    scrollbar-width:none;
    border-top:1px solid var(--bsb-line);
    background:rgba(11,16,32,.44);
}

body.light-mode .brahm-bot-quick-actions{
    background:rgba(247,249,252,.78);
}

.brahm-bot-quick-actions::-webkit-scrollbar{
    display:none;
}

.brahm-bot-chip{
    min-height:34px;
    flex:0 0 auto;
    padding:0 11px;
    border:1px solid var(--bsb-line);
    border-radius:999px;
    background:var(--bsb-surface);
    color:var(--bsb-muted);
    font-size:10px;
    font-weight:800;
    cursor:pointer;
    transition:.16s ease;
}

.brahm-bot-chip:hover{
    border-color:rgba(128,100,244,.42);
    color:var(--bsb-text);
    transform:translateY(-1px);
}

.brahm-bot-project-summary{
    margin:0 13px 10px;
    padding:12px;
    border:1px solid rgba(89,214,232,.25);
    border-radius:14px;
    background:rgba(89,214,232,.07);
}

.brahm-bot-project-summary strong{
    display:block;
    margin-bottom:6px;
    font-size:11px;
}

.brahm-bot-project-summary p{
    margin:0;
    color:var(--bsb-muted);
    font-size:10.5px;
    line-height:1.55;
}

.brahm-bot-project-summary .brahm-bot-action{
    margin-top:10px;
}

.brahm-bot-project-progress{
    height:6px;
    margin-top:9px;
    overflow:hidden;
    border-radius:999px;
    background:rgba(255,255,255,.08);
}

.brahm-bot-project-progress span{
    display:block;
    height:100%;
    border-radius:inherit;
    background:linear-gradient(90deg,var(--bsb-primary),var(--bsb-primary-2));
    transition:width .22s ease;
}

.brahm-bot-project-review{
    max-height:178px;
    overflow:auto;
    margin-top:7px;
    padding-right:3px;
}

.brahm-bot-project-review ul{
    margin:0;
    padding:0;
    list-style:none;
}

.brahm-bot-project-review li{
    padding:7px 0;
    border-bottom:1px solid var(--bsb-line);
}

.brahm-bot-project-review li:last-child{border-bottom:0}

.brahm-bot-project-review span,
.brahm-bot-project-review strong{
    display:block;
}

.brahm-bot-project-review span{
    color:var(--bsb-muted);
    font-size:9px;
    font-weight:800;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.brahm-bot-project-review strong{
    margin-top:2px;
    color:var(--bsb-text);
    font-size:10.5px;
    line-height:1.45;
}

.brahm-bot-composer{
    min-height:64px;
    padding:9px 10px;
    display:grid;
    grid-template-columns:40px minmax(0,1fr) 40px;
    gap:7px;
    align-items:end;
    border-top:1px solid var(--bsb-line);
    background:var(--bsb-bg);
}

.brahm-bot-composer textarea{
    width:100%;
    max-height:116px;
    min-height:40px;
    padding:10px 11px;
    resize:none;
    overflow-y:auto;
    border:1px solid var(--bsb-line);
    border-radius:13px;
    outline:0;
    background:var(--bsb-surface);
    color:var(--bsb-text);
    font:inherit;
    font-size:12px;
    line-height:1.45;
}

.brahm-bot-composer textarea:focus{
    border-color:rgba(128,100,244,.56);
    box-shadow:0 0 0 3px rgba(128,100,244,.10);
}

.brahm-bot-composer textarea::placeholder{
    color:var(--bsb-muted);
}

.brahm-bot-composer-btn,
.brahm-bot-send{
    width:40px;
    height:40px;
    padding:0;
    display:grid;
    place-items:center;
    border:1px solid var(--bsb-line);
    border-radius:12px;
    background:var(--bsb-surface);
    color:var(--bsb-text);
    cursor:pointer;
}

.brahm-bot-send{
    border:0;
    background:linear-gradient(135deg,var(--bsb-primary),var(--bsb-primary-2));
    color:#fff;
}

.brahm-bot-send:disabled,
.brahm-bot-composer-btn:disabled{
    opacity:.45;
    cursor:not-allowed;
}

.brahm-bot-composer-btn.listening{
    border-color:rgba(255,137,151,.50);
    background:rgba(255,137,151,.13);
    animation:brahmBotMic 1s infinite ease-in-out;
}

@keyframes brahmBotMic{
    0%,100%{transform:scale(1)}
    50%{transform:scale(.92)}
}

.brahm-bot-footer-note{
    min-height:26px;
    padding:5px 12px 7px;
    display:flex;
    align-items:center;
    justify-content:center;
    color:var(--bsb-muted);
    font-size:8.5px;
    font-weight:700;
    text-align:center;
    background:var(--bsb-bg);
}

body.brahm-bot-sheet-open{
    overflow:hidden;
}

@media(max-width:680px){
    .brahm-bot-launcher{
        right:13px;
        bottom:var(--brahm-bot-effective-mobile-bottom,var(--brahm-bot-mobile-bottom,82px));
        min-width:132px;
        min-height:49px;
        padding:6px 11px 6px 6px;
        border-radius:16px;
    }

    .brahm-bot-launcher-icon{
        width:37px;
        height:37px;
        border-radius:12px;
        font-size:18px;
    }

    .brahm-bot-launcher-copy strong{
        font-size:11px;
    }

    .brahm-bot-launcher-copy small{
        font-size:8.5px;
    }

    .brahm-bot-panel{
        left:8px;
        right:8px;
        bottom:8px;
        width:auto;
        height:min(72dvh,620px);
        min-height:410px;
        border-radius:23px 23px 16px 16px;
        transform-origin:bottom center;
    }

    .brahm-bot-panel::before{
        content:"";
        position:absolute;
        top:7px;
        left:50%;
        z-index:2;
        width:42px;
        height:4px;
        border-radius:999px;
        background:rgba(255,255,255,.20);
        transform:translateX(-50%);
    }

    body.light-mode .brahm-bot-panel::before{
        background:rgba(15,23,42,.18);
    }

    .brahm-bot-header{
        min-height:70px;
        padding-top:15px;
    }

    .brahm-bot-header-actions .brahm-bot-header-btn:first-child{
        display:none;
    }

    .brahm-bot-message{
        max-width:91%;
        font-size:12px;
    }

    .brahm-bot-quick-actions{
        padding-bottom:8px;
    }

    .brahm-bot-composer{
        padding-bottom:max(9px,env(safe-area-inset-bottom));
    }
}

@media(max-width:390px){
    .brahm-bot-panel{
        left:5px;
        right:5px;
        bottom:5px;
        height:min(76dvh,640px);
    }

    .brahm-bot-header-btn{
        width:32px;
        height:32px;
    }

    .brahm-bot-header-actions{
        gap:3px;
    }
}

@media(prefers-reduced-motion:reduce){
    .brahm-site-bot *,
    .brahm-site-bot *::before,
    .brahm-site-bot *::after{
        animation-duration:.01ms!important;
        animation-iteration-count:1!important;
        transition-duration:.01ms!important;
        scroll-behavior:auto!important;
    }
}
