/*=========================================================
    SENTRIX CYBER 2.0
    GUARDIAN AI CHAT
    File : css/chat.css
=========================================================*/

/*=========================================================
                GUARDIAN SECTION
=========================================================*/

.guardian-section{

    margin-bottom:70px;

}

.guardian-window{

    position:relative;

    display:flex;

    flex-direction:column;

    height:720px;

    overflow:hidden;

    border-radius:28px;

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    backdrop-filter:blur(25px);

    box-shadow:

    0 25px 60px rgba(0,0,0,.35);

}

/*=========================================================
                HEADER
=========================================================*/

.guardian-header{

    display:flex;

    justify-content:space-between;

    align-items:center;

    padding:28px 35px;

    border-bottom:1px solid rgba(255,255,255,.08);

    background:rgba(255,255,255,.03);

}

.guardian-header h2{

    color:#ffffff;

    margin-bottom:8px;

}

.guardian-header small{

    color:#8FA3C6;

    font-size:13px;

}

.guardian-header button{

    width:48px;

    height:48px;

    border-radius:14px;

    background:rgba(255,255,255,.05);

    color:#fff;

    transition:.35s;

}

.guardian-header button:hover{

    background:var(--primary);

}

/*=========================================================
                CHAT AREA
=========================================================*/

.guardian-messages{

    flex:1;

    overflow-y:auto;

    padding:35px;

    display:flex;

    flex-direction:column;

    gap:24px;

    scroll-behavior:smooth;

}

.guardian-messages::-webkit-scrollbar{

    width:8px;

}

.guardian-messages::-webkit-scrollbar-thumb{

    background:rgba(79,124,255,.5);

    border-radius:50px;

}

/*=========================================================
                MESSAGE
=========================================================*/

.guardian-message{

    display:flex;

    flex-direction:column;

    max-width:75%;

    animation:messageIn .4s ease;

}

.guardian-message.ai{

    align-self:flex-start;

}

.guardian-message.user{

    align-self:flex-end;

}

.guardian-message h4{

    margin-bottom:10px;

    font-size:14px;

    color:#8FA3C6;

}

.guardian-message p{

    padding:18px 22px;

    border-radius:20px;

    line-height:1.8;

}

/*=========================================================
                AI MESSAGE
=========================================================*/

.guardian-message.ai p{

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

    color:#E6EDF9;

    border-top-left-radius:6px;

}

/*=========================================================
                USER MESSAGE
=========================================================*/

.guardian-message.user p{

    background:

    linear-gradient(

    135deg,

    #4F7CFF,

    #8B5CF6

    );

    color:#fff;

    border-top-right-radius:6px;

}

/*=========================================================
                AVATAR
=========================================================*/

.chat-avatar{

    width:48px;

    height:48px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    font-size:18px;

    font-weight:700;

    color:#fff;

    background:

    linear-gradient(

    135deg,

    #4F7CFF,

    #8B5CF6

    );

    margin-bottom:10px;

}

/*=========================================================
                INPUT
=========================================================*/

.guardian-input{

    display:flex;

    align-items:center;

    gap:15px;

    padding:25px;

    border-top:1px solid rgba(255,255,255,.08);

    background:rgba(255,255,255,.03);

}

.guardian-input input{

    flex:1;

    height:60px;

}

.guardian-input button{

    min-width:140px;

    height:60px;

    background:

    linear-gradient(

    135deg,

    #4F7CFF,

    #8B5CF6

    );

    color:#fff;

    border-radius:14px;

}

.guardian-input button:hover{

    transform:translateY(-3px);

}

/*=========================================================
                MESSAGE ANIMATION
=========================================================*/

@keyframes messageIn{

    from{

        opacity:0;

        transform:translateY(20px);

    }

    to{

        opacity:1;

        transform:translateY(0);

    }

}
/*=========================================================
            TYPING INDICATOR
=========================================================*/

.typing-indicator{

    display:flex;

    align-items:center;

    gap:8px;

    padding:18px 22px;

    width:80px;

    border-radius:18px;

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

}

.typing-indicator span{

    width:10px;

    height:10px;

    border-radius:50%;

    background:#4F7CFF;

    animation:typingBounce 1.2s infinite;

}

.typing-indicator span:nth-child(2){

    animation-delay:.2s;

}

.typing-indicator span:nth-child(3){

    animation-delay:.4s;

}

@keyframes typingBounce{

    0%,80%,100%{

        transform:translateY(0);

        opacity:.5;

    }

    40%{

        transform:translateY(-8px);

        opacity:1;

    }

}

/*=========================================================
                THINKING STATE
=========================================================*/

.guardian-thinking{

    position:relative;

    overflow:hidden;

}

.guardian-thinking::after{

    content:"";

    position:absolute;

    inset:0;

    transform:translateX(-100%);

    background:linear-gradient(
        90deg,
        transparent,
        rgba(255,255,255,.08),
        transparent
    );

    animation:thinking 2s infinite;

}

@keyframes thinking{

    100%{

        transform:translateX(100%);

    }

}

/*=========================================================
                CODE BLOCK
=========================================================*/

.guardian-message pre{

    margin-top:15px;

    padding:20px;

    border-radius:14px;

    overflow:auto;

    background:#0B1324;

    border:1px solid rgba(255,255,255,.08);

}

.guardian-message code{

    font-family:Consolas,monospace;

    color:#7ED3FF;

    font-size:14px;

}

/*=========================================================
                INLINE CODE
=========================================================*/

.guardian-message p code{

    padding:3px 8px;

    border-radius:6px;

    background:rgba(255,255,255,.08);

}

/*=========================================================
                ATTACHMENTS
=========================================================*/

.chat-attachment{

    display:flex;

    align-items:center;

    gap:15px;

    padding:15px;

    margin-top:15px;

    border-radius:14px;

    background:rgba(255,255,255,.05);

    border:1px solid rgba(255,255,255,.08);

}

.chat-attachment img{

    width:65px;

    height:65px;

    border-radius:10px;

    object-fit:cover;

}

/*=========================================================
                IMAGE MESSAGE
=========================================================*/

.chat-image{

    margin-top:15px;

}

.chat-image img{

    width:280px;

    border-radius:18px;

    border:1px solid rgba(255,255,255,.08);

}

/*=========================================================
                VOICE BUTTON
=========================================================*/

.voice-button{

    width:60px;

    height:60px;

    border-radius:50%;

    display:flex;

    justify-content:center;

    align-items:center;

    background:#101B30;

    color:#fff;

    transition:.35s;

}

.voice-button:hover{

    background:#4F7CFF;

    transform:scale(1.08);

}

/*=========================================================
                RECORDING
=========================================================*/

.voice-button.recording{

    background:#FF4D67;

    animation:recordPulse 1.5s infinite;

}

@keyframes recordPulse{

    0%{

        box-shadow:0 0 0 0 rgba(255,77,103,.6);

    }

    70%{

        box-shadow:0 0 0 18px rgba(255,77,103,0);

    }

    100%{

        box-shadow:0 0 0 0 rgba(255,77,103,0);

    }

}

/*=========================================================
                CHAT DATE
=========================================================*/

.chat-date{

    text-align:center;

    color:#8FA3C6;

    font-size:13px;

    margin:20px 0;

}

/*=========================================================
                RESPONSIVE
=========================================================*/

@media(max-width:992px){

.guardian-window{

height:650px;

}

.guardian-message{

max-width:90%;

}

}

@media(max-width:768px){

.guardian-header{

padding:20px;

}

.guardian-messages{

padding:20px;

}

.guardian-input{

padding:18px;

flex-wrap:wrap;

}

.guardian-input button{

width:100%;

}

.voice-button{

width:100%;

height:55px;

border-radius:14px;

}

.chat-image img{

width:100%;

}

}

@media(max-width:480px){

.guardian-window{

height:600px;

}

.guardian-message{

max-width:100%;

}

.guardian-message p{

padding:15px;

font-size:14px;

}

.guardian-header h2{

font-size:1.4rem;

}

}

/*=========================================================
                4K DISPLAY
=========================================================*/

@media(min-width:1800px){

.guardian-window{

height:900px;

}

.guardian-message p{

font-size:17px;

}

.guardian-input{

padding:30px;

}

}

/*=========================================================
                END OF FILE
=========================================================*/