/* MineralBids Atlas AI - responsive chat CSS */

.mb-atlas-root{
    position:fixed;
    right:110px;
    bottom:22px;
    z-index:99999;
    font-family:inherit;
}

.mb-atlas-root .mb-atlas-button{
    all:unset;
    box-sizing:border-box!important;
    border:1px solid rgba(255,255,255,.38)!important;
    border-radius:999px!important;
    background:linear-gradient(135deg,#196751 0%,#24785e 28%,#326a8f 62%,#5b3c8a 100%)!important;
    color:#fff!important;
    padding:11px 16px!important;
    box-shadow:0 13px 34px rgba(0,0,0,.34),0 0 18px rgba(91,60,138,.28),inset 0 1px 0 rgba(255,255,255,.25)!important;
    font-weight:800!important;
    cursor:pointer!important;
    display:inline-flex!important;
    gap:9px!important;
    align-items:center!important;
    justify-content:center!important;
    min-height:48px!important;
    opacity:1!important;
    visibility:visible!important;
    transition:transform .18s ease,box-shadow .18s ease,filter .18s ease,background .18s ease!important;
}

.mb-atlas-root .mb-atlas-button:hover{
    background:linear-gradient(135deg,#22805f 0%,#2c8d6c 28%,#4d6cc7 62%,#7246b7 100%)!important;
    color:#fff!important;
    transform:translateY(-2px);
    box-shadow:0 16px 42px rgba(0,0,0,.38),0 0 24px rgba(114,70,183,.34),inset 0 1px 0 rgba(255,255,255,.30)!important;
}

.mb-atlas-root .mb-atlas-icon{
    font-size:18px;
    line-height:1;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:22px;
    height:22px;
    flex:0 0 22px;
    color:#fff!important;
    opacity:1!important;
}

.mb-atlas-root .mb-atlas-label{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    justify-content:center;
    line-height:1.05;
    min-height:24px;
}

.mb-atlas-root .mb-atlas-main{
    font-size:14px;
    font-weight:900;
    color:#fff!important;
    letter-spacing:.01em;
}

.mb-atlas-root .mb-atlas-sub{
    font-size:10px;
    font-weight:800;
    opacity:.88!important;
    color:#fff!important;
    margin-top:2px;
}

.mb-atlas-panel{
    display:none;
    position:absolute;
    right:0;
    bottom:62px;
    width:min(390px,calc(100vw - 28px));
    height:560px;
    max-height:calc(100vh - 100px);
    background:#fff;
    border:1px solid rgba(0,0,0,.08);
    border-radius:18px;
    box-shadow:0 18px 55px rgba(0,0,0,.28);
    overflow:hidden;
}

.mb-atlas-panel.is-open{
    display:flex;
    flex-direction:column;
}

.mb-atlas-panel header{
    background:linear-gradient(135deg,#196751,#12483a);
    color:#fff;
    padding:14px 16px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.mb-atlas-panel header small{
    display:block;
    opacity:.82;
    font-size:12px;
    margin-top:2px;
}

.mb-atlas-close{
    background:transparent;
    border:0;
    color:#fff;
    font-size:26px;
    line-height:1;
    cursor:pointer;
}

.mb-atlas-messages{
    padding:15px;
    overflow:auto;
    flex:1;
    background:#f6f7f5;
}

.mb-atlas-msg{
    margin:0 0 11px;
    display:flex;
}

.mb-atlas-msg>div{
    padding:10px 12px;
    border-radius:14px;
    max-width:88%;
    font-size:14px;
    line-height:1.42;
}

.mb-atlas-msg.bot{
    justify-content:flex-start;
}

.mb-atlas-msg.bot>div{
    background:#fff;
    color:#18211e;
    border:1px solid rgba(0,0,0,.06);
}

.mb-atlas-msg.user{
    justify-content:flex-end;
}

.mb-atlas-msg.user>div{
    background:#196751;
    color:#fff;
}


.mb-atlas-msg a.mb-atlas-link{
    color:#196751!important;
    font-weight:800;
    text-decoration:underline!important;
    text-underline-offset:2px;
    overflow-wrap:anywhere;
}

.mb-atlas-msg.user a.mb-atlas-link{
    color:#fff!important;
}

.mb-atlas-sources{
    display:block;
    margin-top:9px;
    padding-top:7px;
    border-top:1px solid rgba(0,0,0,.07);
    font-size:10.5px;
    line-height:1.25;
    color:#5e6b66;
    opacity:.68;
}

.mb-atlas-sources strong{
    font-size:10.5px;
    font-weight:700;
    color:#4d5a55;
}

.mb-atlas-thinking>div{
    opacity:.75;
}


.mb-atlas-disclaimer{
    padding:8px 12px 9px;
    border-top:1px solid rgba(0,0,0,.06);
    background:#fbfbf8;
    color:#5c6762;
    font-size:10.5px;
    line-height:1.28;
    opacity:.82;
}

.mb-atlas-form{
    display:flex;
    gap:8px;
    padding:12px;
    background:#fff;
    border-top:1px solid rgba(0,0,0,.08);
}

.mb-atlas-form textarea{
    flex:1;
    resize:none;
    border:1px solid rgba(0,0,0,.16);
    border-radius:12px;
    padding:10px;
    font:inherit;
    min-height:44px;
}

.mb-atlas-form button,
.mb-atlas-register{
    border:0;
    background:#196751;
    color:#fff!important;
    border-radius:12px;
    padding:0 14px;
    font-weight:700;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.mb-atlas-register{
    margin:0 15px 15px;
    padding:10px 14px;
}

.mb-atlas-form button:hover,
.mb-atlas-register:hover{
    filter:brightness(.96);
    color:#fff!important;
}

/* Mobile: button remains bottom-left and panel fits inside screen. */
@media (max-width:600px){
    .mb-atlas-root{
        left:14px!important;
        right:auto!important;
        bottom:14px!important;
        width:auto!important;
    }

    .mb-atlas-root .mb-atlas-button{
        padding:11px 13px!important;
        max-width:calc(100vw - 24px)!important;
        margin:0!important;
    }

    .mb-atlas-root .mb-atlas-sub{
        display:none!important;
    }

    .mb-atlas-root .mb-atlas-panel,
    .mb-atlas-root .mb-atlas-panel.is-open{
        position:fixed!important;
        left:10px!important;
        right:10px!important;
        top:calc(env(safe-area-inset-top, 0px) + 10px)!important;
        bottom:calc(env(safe-area-inset-bottom, 0px) + 76px)!important;
        width:auto!important;
        height:auto!important;
        max-width:none!important;
        max-height:none!important;
        border-radius:16px!important;
        z-index:100000!important;
    }

    .mb-atlas-panel header{
        padding:12px 14px!important;
    }

    .mb-atlas-messages{
        padding:12px!important;
    }

    .mb-atlas-msg>div{
        max-width:92%!important;
        font-size:14px!important;
    }


    .mb-atlas-form{
        padding:10px!important;
        gap:7px!important;
    }

    .mb-atlas-form textarea{
        min-height:42px!important;
        max-height:90px!important;
    }
}

@media (max-width:380px){
    .mb-atlas-root .mb-atlas-main{
        font-size:13px!important;
    }

    .mb-atlas-root .mb-atlas-button{
        gap:7px!important;
        padding:10px 12px!important;
        margin:0!important;
    }
}

.mb-atlas-more{margin-top:8px;font-size:13px}.mb-atlas-more summary{cursor:pointer;font-weight:800;color:#196751}.mb-atlas-more[open] summary{margin-bottom:6px}
