/* ==========================================================
   PORTFOLIO COPILOT
========================================================== */

#assistant{
    position:fixed;
    right:28px;
    bottom:28px;
    z-index:999;
}

/* Floating Button */

#assistant-toggle{

    width:72px;
    height:72px;

    border:none;

    border-radius:50%;

    cursor:pointer;

    display:flex;
    align-items:center;
    justify-content:center;

    background:linear-gradient(180deg,#131a2b,#0c1120);

    border:1px solid rgba(255,255,255,.08);

    color:#fff;

    transition:.35s ease;

    box-shadow:
    0 12px 35px rgba(0,0,0,.35),
    0 0 25px rgba(79,125,255,.12);

}

#assistant-toggle:hover{

    transform:translateY(-6px) scale(1.04);

    box-shadow:
    0 20px 45px rgba(0,0,0,.45),
    0 0 35px rgba(79,125,255,.20);

}

#assistant-toggle svg{

    width:28px;
    height:28px;

}

/* ==========================================================
   CHAT WINDOW
========================================================== */

#assistant-window{

    position:absolute;

    right:0;

    bottom:92px;

    width:420px;

    height:570px;

    display:none;

    flex-direction:column;

    overflow:hidden;

    border-radius:24px;

    border:1px solid rgba(255,255,255,.08);

    background:linear-gradient(
        180deg,
        #171d2c,
        #101624
    );

    backdrop-filter:blur(30px);

    box-shadow:
    0 35px 80px rgba(0,0,0,.45);

}

#assistant-window.open{

    display:flex;

}

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

.assistant-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:22px;

    border-bottom:1px solid rgba(255,255,255,.06);

}

.assistant-profile{

    display:flex;

    align-items:center;

    gap:16px;

}

.assistant-avatar{

    width:46px;
    height:46px;

    border-radius:14px;

    display:flex;

    justify-content:center;

    align-items:center;

    background:rgba(79,125,255,.12);

    color:#4F7DFF;

}

.assistant-avatar svg{

    width:22px;
    height:22px;

}

.assistant-profile h3{

    margin:0;

    font-size:1.05rem;

    font-weight:600;

}

.assistant-profile p{

    margin-top:4px;

    font-size:.82rem;

    color:#8892a8;

}

#assistant-close{

    border:none;

    background:none;

    color:#c6cedf;

    font-size:1.35rem;

    cursor:pointer;

    transition:.25s;

}

#assistant-close:hover{

    color:#fff;

    transform:rotate(90deg);

}

/* ==========================================================
   CHAT AREA
========================================================== */

#assistant-messages{

    flex:1;

    overflow-y:auto;

    padding:22px;

    display:flex;

    flex-direction:column;

    gap:18px;

}

/* Scrollbar */

#assistant-messages::-webkit-scrollbar{

    width:6px;

}

#assistant-messages::-webkit-scrollbar-thumb{

    background:#2b3448;

    border-radius:20px;

}

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

.bot-message{

    max-width:85%;

    background:#1e2637;

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

    border-radius:18px;

    padding:18px;

    line-height:1.75;

    color:#e9edf7;

}

.user-message{

    margin-left:auto;

    max-width:80%;

    background:#4F7DFF;

    color:#fff;

    border-radius:18px;

    padding:16px 18px;

}

.typing-message{

    display:flex;

    align-items:center;

    gap:6px;

}

.typing-message span{

    width:8px;

    height:8px;

    border-radius:50%;

    background:#7EA3FF;

    animation:typing 1.2s infinite;

}

.typing-message span:nth-child(2){

    animation-delay:.2s;

}

.typing-message span:nth-child(3){

    animation-delay:.4s;

}

@keyframes typing{

    0%,80%,100%{

        transform:scale(.6);

        opacity:.4;

    }

    40%{

        transform:scale(1);

        opacity:1;

    }

}

/* ==========================================================
   QUICK PROMPT BUTTONS (topics + questions)
========================================================== */

.quick-prompts{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

}

.prompt-btn{

    flex:1 1 auto;

    min-width:fit-content;

    padding:10px 16px;

    border-radius:999px;

    border:1px solid rgba(79,125,255,.25);

    background:rgba(79,125,255,.08);

    color:#cdd9ff;

    font-size:.85rem;

    font-weight:500;

    cursor:pointer;

    transition:.25s ease;

}

.prompt-btn:hover{

    background:rgba(79,125,255,.18);

    border-color:rgba(79,125,255,.5);

    color:#fff;

    transform:translateY(-2px);

}

.prompt-btn-back{

    background:transparent;

    border-color:rgba(255,255,255,.12);

    color:#8892a8;

}

.prompt-btn-back:hover{

    background:rgba(255,255,255,.06);

    border-color:rgba(255,255,255,.25);

    color:#e9edf7;

}

/* ==========================================================
   RICH ANSWER CONTENT (inside .bot-message)
========================================================== */

.bot-message h4{

    margin:0 0 10px;

    font-size:1rem;

    font-weight:600;

    color:#fff;

}

.bot-message p{

    margin:0 0 10px;

}

.bot-message p:last-child{

    margin-bottom:0;

}

.bot-message ul{

    margin:0 0 10px;

    padding-left:20px;

}

.bot-message li{

    margin-bottom:6px;

}

.bot-message a{

    color:#7EA3FF;

    text-decoration:none;

}

.bot-message a:hover{

    text-decoration:underline;

}

.assistant-actions{

    display:flex;

    flex-wrap:wrap;

    gap:10px;

    margin-top:12px;

}

.assistant-actions a{

    display:inline-flex;

    align-items:center;

    padding:8px 16px;

    border-radius:999px;

    background:rgba(79,125,255,.12);

    border:1px solid rgba(79,125,255,.3);

    color:#7EA3FF;

    font-size:.82rem;

    font-weight:600;

}

.assistant-actions a:hover{

    background:rgba(79,125,255,.2);

    text-decoration:none;

}

.typing-message{

    display:flex;

    align-items:center;

    gap:6px;

}

.typing-message span{

    width:8px;

    height:8px;

    border-radius:50%;

    background:#7EA3FF;

    animation:typing 1.2s infinite;

}

.typing-message span:nth-child(2){

    animation-delay:.2s;

}

.typing-message span:nth-child(3){

    animation-delay:.4s;

}

@keyframes typing{

    0%,80%,100%{

        transform:scale(.6);

        opacity:.4;

    }

    40%{

        transform:scale(1);

        opacity:1;

    }

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

#assistant-form{

     display:flex;

    align-items:center;

    gap:12px;

    padding:16px;

    border-top:1px solid var(--border);

}

#assistant-input{

    flex:1;

    height:56px;

    padding:0 22px;

    border:none;

    border-radius:999px;

    background:#0d1322;

    color:#fff;

    font-size:15px;

}

#assistant-input::placeholder{

    color:#6f7892;

}

#assistant-form button{

    width:56px;

    height:56px;

    display:flex;

    align-items:center;

    justify-content:center;

    border:none;

    border-radius:18px;

    background:rgba(79,125,255,.08);

    border:1px solid rgba(79,125,255,.18);

    color:#7EA3FF;

    cursor:pointer;

    transition:.3s ease;

}

#assistant-form button svg{

    width:20px;

    height:20px;

}

#assistant-form button:hover{

    transform:translateY(-2px);

    background:rgba(79,125,255,.12);

    border-color:rgba(79,125,255,.45);

    box-shadow:

        0 0 18px rgba(79,125,255,.18);


}

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

@media (max-width: 480px) {

    #assistant{

        right:16px;

        bottom:16px;

    }

    #assistant-window{

        width:calc(100vw - 32px);

        height:70vh;

        max-height:600px;

        right:0;

        bottom:80px;

    }

}