/* ==========================================================
   AI Assistant
   CSS Version : 3.0
   Part : 1
========================================================== */


/* ===============================
   Global Reset
================================ */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}


html,
body{

    width:100%;
    height:100%;

    font-family:
    "Inter",
    "Segoe UI",
    Arial,
    sans-serif;

    background:#f3f6fb;

}


/* ===============================
   Chat Wrapper
================================ */

.chat-wrapper{

    width:100%;

    max-width:900px;

    height:100vh;

    margin:auto;

    display:flex;

    flex-direction:column;

    background:#ffffff;

    overflow:hidden;

    position:relative;

}


/* ===============================
   Header
================================ */

.chat-header{

    height:70px;

    padding:12px 18px;

    display:flex;

    align-items:center;

    justify-content:space-between;


    background:

    linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );


    color:#ffffff;

    flex-shrink:0;

    box-shadow:

    0 4px 15px rgba(0,0,0,.15);

}



/* Header Left */

.header-left{

    display:flex;

    align-items:center;

    gap:12px;

}



.logo{

    width:45px;

    height:45px;

    border-radius:50%;

    overflow:hidden;

    background:#ffffff;

    display:flex;

    align-items:center;

    justify-content:center;

}



.logo img{

    width:100%;

    height:100%;

    object-fit:cover;

}



.header-info h4{

    margin:0;

    font-size:18px;

    font-weight:600;

    color:#fff;

}



.status{

    display:flex;

    align-items:center;

    gap:6px;

    font-size:13px;

    opacity:.9;

}



.status-dot{

    width:9px;

    height:9px;

    background:#22c55e;

    border-radius:50%;

    display:inline-block;


    box-shadow:

    0 0 8px #22c55e;

}



/* ===============================
 Header Buttons
================================ */

.header-right{

    display:flex;

    gap:8px;

}



.header-btn{

    width:38px;

    height:38px;


    border-radius:50%;


    border:none;


    display:flex;

    align-items:center;

    justify-content:center;


    background:

    rgba(255,255,255,.18);


    color:#fff;


    cursor:pointer;


    transition:.3s;

}



.header-btn:hover{

    background:#4b47472e;

    color:#2563eb;

    transform:translateY(-2px);

}




/* ===============================
 Chat Body
================================ */

.chat-body{

    flex:1;

    padding:20px;

    overflow-y:auto;

    overscroll-behavior-y:contain;

    -webkit-overflow-scrolling:touch;

    touch-action:pan-y;

    background:

    linear-gradient(
        180deg,
        #f8fafc,
        #eef2ff
    );

}



/* Scrollbar */

.chat-body::-webkit-scrollbar{

    width:7px;

}


.chat-body::-webkit-scrollbar-track{

    background:transparent;

}


.chat-body::-webkit-scrollbar-thumb{

    background:#cbd5e1;

    border-radius:20px;

}



/* ===============================
 Avatar Common
================================ */

.avatar{

    width:42px;

    height:42px;


    min-width:42px;


    border-radius:50%;


    overflow:hidden;


    display:flex;

    align-items:center;

    justify-content:center;


    background:#ffffff;


    box-shadow:

    0 3px 10px rgba(0,0,0,.12);

}



.avatar img{

    width:100%;

    height:100%;

    object-fit:cover;

}



/* ===============================
 Message Base
================================ */

.message{

    max-width:75%;

    padding:14px 16px;

    border-radius:18px;

    font-size:15px;

    line-height:1.6;

    box-shadow:

    0 3px 12px rgba(0,0,0,.08);

}



/* Message Header */

.message-header{

    display:flex;

    justify-content:space-between;

    gap:20px;

    margin-bottom:8px;

    font-size:13px;

}



.time{

    color:#64748b;

    font-size:11px;

}



/* ===============================
 Desktop
================================ */

@media(min-width:992px){

    .chat-wrapper{

        margin-top:5px;

        margin-bottom:5px;

        height:calc(100vh - 10px);

        border-radius:20px;

        box-shadow:

        0 10px 40px rgba(0,0,0,.15);

    }

}

/* ==========================================================
   AI Assistant
   CSS Version : 3.0
   Part : 2
========================================================== */


/* ===============================
   BOT MESSAGE
================================ */

.bot-message{

    display:flex;

    align-items:flex-start;

    gap:12px;

    margin-bottom:18px;

    animation:

    fadeIn .3s ease;

}


.bot-message .message{

    background:#ffffff;

    color:#1e293b;

    border-top-left-radius:5px;

}



/* ===============================
   USER MESSAGE
================================ */

.user-message{

    display:flex;

    justify-content:flex-end;

    align-items:flex-start;

    gap:12px;

    margin-bottom:18px;

    animation:

    fadeIn .3s ease;

}


.user-message .message{

    background:

    linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );


    color:#ffffff;


    border-top-right-radius:5px;

}




/* ===============================
   Message Animation
================================ */

@keyframes fadeIn{


    from{

        opacity:0;

        transform:

        translateY(15px);

    }


    to{

        opacity:1;

        transform:

        translateY(0);

    }

}



/* ===============================
   Message Content
================================ */


.message-text ul,
.message-text ol{

    padding-left:22px;

    margin:7px 0 5px;

}


.message-text li{

    margin-bottom:4px;

    padding-left:2px;

}



/* Links */

.message a{

    color:#2563eb;

    text-decoration:none;

    font-weight:500;

}


.user-message .message a{

    color:#ffffff;

    text-decoration:underline;

}

.message-text li::marker{
    color:#2563eb;
    font-weight:700;
}

.message-meta{
    margin-top:5px;
    color:#64748b;
    font-size:11px;
    line-height:1.3;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}

.message-actions{display:inline-flex;align-items:center;gap:3px;margin-left:auto}
.message-action-btn{width:24px;height:24px;padding:0;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:transparent;color:#64748b;font-size:11px;cursor:pointer;transition:background .15s,color .15s,transform .15s}
.message-action-btn:hover,.message-action-btn:focus-visible{background:#e8efff;color:#2563eb;outline:none;transform:translateY(-1px)}
.message-action-btn.is-reading{background:#fee2e2;color:#dc2626}
.message-action-btn.is-copied{background:#dcfce7;color:#15803d}
.dark-mode .message-action-btn{color:#a8b3c7}
.dark-mode .message-action-btn:hover,.dark-mode .message-action-btn:focus-visible{background:#26344d;color:#8eb0ff}

.user-message .message-meta{
    color:rgba(255,255,255,.75);
}

.message-text .chat-link,
.message-text .chat-email,
.message-text .chat-phone{
    overflow-wrap:anywhere;
}

.message-text .chat-directions-link{
    display:inline-flex;
    align-items:center;
    gap:5px;
    margin:2px 0;
    padding:5px 9px;
    border-radius:6px;
    color:#fff;
    background:#2563eb;
    font-size:12px;
    line-height:1.2;
    font-weight:600;
    text-decoration:none;
}

.message-text .chat-directions-link:hover{
    color:#fff;
    background:#1d4ed8;
}

.chat-route-map{
    margin-top:8px;
    background:#eef2ff;
}

.message-text .chat-phone{
    display:inline-flex;
    align-items:center;
    gap:5px;
}

.chat-media{
    position:relative;
    width:100%;
    max-width:560px;
    margin:10px 0 4px;
    overflow:hidden;
    border:1px solid #dbe3ef;
    border-radius:12px;
    background:#0f172a;
}

.chat-media-expand{
    position:absolute;
    top:8px;
    right:8px;
    z-index:3;
    width:34px;
    height:34px;
    padding:0;
    border:1px solid rgba(255,255,255,.5);
    border-radius:50%;
    color:#fff;
    background:rgba(15,23,42,.78);
    box-shadow:0 4px 14px rgba(0,0,0,.22);
}

.chat-document-card{
    display:flex;
    align-items:center;
    gap:10px;
    width:min(100%,520px);
    margin:10px 0 4px;
    padding:12px 14px;
    border:1px solid #dbe3ef;
    border-radius:12px;
    color:#1e3a8a;
    background:#f8fafc;
    text-align:left;
}

.chat-document-card span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.chat-document-card .fa-file-lines{font-size:22px;color:#ef4444}

.bot-message:has(.chat-media) .message{
    width:75%;
}

.chat-media iframe{
    display:block;
    width:100%;
    height:300px;
    border:0;
}

.chat-video-embed iframe{
    aspect-ratio:16 / 9;
    height:auto;
}

.chat-media video{
    display:block;
    width:100%;
    max-height:420px;
}

.chat-image-button{
    display:block;
    max-width:100%;
    margin:10px 0 4px;
    padding:0;
    overflow:hidden;
    border:0;
    border-radius:12px;
    background:#e2e8f0;
    cursor:zoom-in;
}

.chat-image-preview{
    display:block;
    max-width:100%;
    max-height:320px;
    object-fit:contain;
}

.chat-media-modal .modal-dialog{max-width:min(960px,calc(100vw - 28px))}
.chat-media-modal .modal-content{height:min(760px,86vh);overflow:hidden;border:0;border-radius:16px}
.chat-media-modal .modal-header{flex:0 0 auto;padding:12px 16px}
.chat-media-modal .modal-body{position:relative;display:flex;align-items:center;justify-content:center;min-height:0;padding:12px 58px;background:#0f172a}
.chat-media-viewer{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:0;overflow:hidden}
.chat-media-viewer img,.chat-media-viewer video{display:block;max-width:100%;max-height:100%;object-fit:contain}
.chat-media-viewer iframe{width:100%;height:100%;border:0;background:#fff}
.chat-media-nav{position:absolute;top:50%;z-index:4;width:40px;height:48px;transform:translateY(-50%);border:0;border-radius:10px;color:#fff;background:rgba(30,41,59,.82)}
.chat-media-prev{left:10px}.chat-media-next{right:10px}
.chat-media-modal .modal-footer{flex:0 0 auto;justify-content:space-between;padding:10px 16px}
.chat-media-counter{font-weight:600;color:#64748b}
.chat-media-actions{display:flex;align-items:center;gap:6px}
.chat-media-action-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 9px;font-size:12px;line-height:1.2;border-radius:6px}

@media (max-width: 600px){
    .chat-media iframe{height:220px;}
    .chat-video-embed iframe{height:auto;}
    .bot-message:has(.chat-media) .message{
        width:calc(100% - 52px);
        max-width:calc(100% - 52px);
        padding:12px;
    }
    .chat-media-modal .modal-dialog{max-width:calc(100vw - 12px);margin:6px auto}
    .chat-media-modal .modal-content{height:calc(100dvh - 12px);border-radius:12px}
    .chat-media-modal .modal-body{padding:8px 42px}
    .chat-media-nav{width:34px;height:44px}
    .chat-media-prev{left:4px}.chat-media-next{right:4px}
}



/* ===============================
   Chat Footer
================================ */

.chat-footer{

    padding:12px 15px;

    background:#ffffff;

    border-top:

    1px solid #e2e8f0;

    flex-shrink:0;

}



/* Input Wrapper */

.chat-input-wrapper{

    display:flex;

    align-items:flex-end;

    gap:8px;

}



/* ===============================
   Textarea
================================ */

#question{

    flex:1;

    min-height:46px;

    max-height:130px;

    resize:none;

    overflow-y:hidden;

    border-radius:25px;

    padding:

    12px 18px;

    border:

    1px solid #cbd5e1;


    font-size:15px;


    outline:none;


    box-shadow:none;

}

#question.is-multiline{
    border-radius:18px;
    overflow-y:auto;
    scrollbar-width:thin;
    scrollbar-color:#94a3b8 transparent;
}

#question:not(.is-multiline){
    overflow-y:hidden !important;
    scrollbar-width:none;
}

#question:not(.is-multiline)::-webkit-scrollbar{
    display:none;
}

#question::-webkit-scrollbar{width:5px}
#question::-webkit-scrollbar-track{background:transparent}
#question::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:10px}



#question:focus{

    border-color:#2563eb;

    box-shadow:

    0 0 0 3px rgba(37,99,235,.15);

}



/* ===============================
   Tool Buttons
================================ */

.tool-btn{


    width:45px;

    height:45px;


    border-radius:50%;


    border:none;


    background:#f1f5f9;


    color:#475569;


    display:flex;


    align-items:center;


    justify-content:center;


    cursor:pointer;


    transition:.3s;

}



.tool-btn:hover{


    background:#2563eb;


    color:#ffffff;

}



/* Microphone Active */

.tool-btn.recording{


    background:#ef4444;


    color:white;


    animation:pulse 1s infinite;

}




@keyframes pulse{


    0%{

        box-shadow:

        0 0 0 0 rgba(239,68,68,.5);

    }


    70%{

        box-shadow:

        0 0 0 15px rgba(239,68,68,0);

    }


    100%{

        box-shadow:0 0 0 0 rgba(239,68,68,0);

    }

}



/* ===============================
   Send Button
================================ */


.send-btn{


    width:48px;


    height:48px;


    border-radius:50%;


    border:none;


    background:

    linear-gradient(
        135deg,
        #2563eb,
        #4f46e5
    );


    color:white;


    display:flex;


    align-items:center;


    justify-content:center;


    cursor:pointer;


    transition:.3s;


}



.send-btn:hover{


    transform:

    translateY(-3px);


    box-shadow:

    0 5px 15px rgba(37,99,235,.4);

}



.send-btn:disabled{


    opacity:.5;

    cursor:not-allowed;

}



/* ===============================
 Typing Animation
================================ */


.typing-area{


    display:flex;


    align-items:center;


    gap:12px;


    padding:

    0 20px 12px;

    background-size:cover;

    background-position:center bottom;

    background-repeat:no-repeat;


}


.typing-box{


    background:#ffffff;


    padding:

    12px 18px;


    border-radius:20px;


    display:flex;


    gap:5px;


}



.typing-box span{


    width:8px;


    height:8px;


    background:#64748b;


    border-radius:50%;


    animation:

    typing 1.4s infinite;

}



.typing-box span:nth-child(2){

    animation-delay:.2s;

}


.typing-box span:nth-child(3){

    animation-delay:.4s;

}



@keyframes typing{


    0%,60%,100%{

        transform:translateY(0);

    }


    30%{

        transform:translateY(-8px);

    }

}



/* ===============================
   Loading Overlay
================================ */


.loading-overlay{


    position:absolute;


    inset:0;


    background:

    rgba(255,255,255,.7);


    display:flex;


    align-items:center;


    justify-content:center;


    z-index:999;

}



/* ===============================
   Code Block
================================ */


pre{


    background:#0f172a;


    color:#e2e8f0;


    padding:15px;


    border-radius:10px;


    overflow:auto;


}


code{


    font-family:

    "Courier New",
    monospace;


}



/* Copy Button */

.copy-code{


    float:right;

}

/* ==========================================================
   AI Assistant
   CSS Version : 3.0
   Part : 3
==========================================================*/


/*==================================
        SETTINGS MODAL
==================================*/

.modal-content{

    border:none;

    border-radius:20px;

    overflow:hidden;

    box-shadow:0 20px 50px rgba(0,0,0,.18);

}

.modal-header{

    background:linear-gradient(135deg,#2563eb,#4f46e5);

    color:#fff;

    border:none;

}

.modal-title{

    font-weight:600;

}

.modal-footer{

    border:none;

}


/*==================================
        FORM
==================================*/

.form-control,
.form-select{

    border-radius:12px;

    border:1px solid #dbe2ea;

    padding:12px 15px;

    box-shadow:none;

}

.form-control:focus,
.form-select:focus{

    border-color:#2563eb;

    box-shadow:0 0 0 4px rgba(37,99,235,.12);

}


/*==================================
        BUTTONS
==================================*/

.btn-primary{

    background:#2563eb;

    border:none;

}

.btn-primary:hover{

    background:#1d4ed8;

}

.btn-secondary{

    border:none;

}



/*==================================
        IMAGE
==================================*/

.message img{

    max-width:100%;

    border-radius:12px;

    margin-top:8px;

}



/*==================================
        TABLE
==================================*/

.message table{

    width:100%;

    border-collapse:collapse;

    margin-top:10px;

}

.message table td,
.message table th{

    border:1px solid #ddd;

    padding:8px;

}

.message table th{

    background:#f8fafc;

}



/*==================================
        DARK MODE
==================================*/

body.dark-mode{

    background:#0f172a;

}

body.dark-mode .chat-wrapper{

    background:#111827;

}

body.dark-mode .chat-body{

    background:#0f172a;

}

body.dark-mode .chat-footer{

    background:#111827;

    border-top:1px solid #374151;

}

body.dark-mode #question{

    background:#1f2937;

    color:#fff;

    border-color:#374151;

}

body.dark-mode #question::placeholder{

    color:#94a3b8;

}

body.dark-mode .bot-message .message{

    background:#1f2937;

    color:#f8fafc;

}

body.dark-mode .user-message .message{

    background:#2563eb;

    color:#fff;

}

body.dark-mode .typing-box{

    background:#1f2937;

}

body.dark-mode .typing-box span{

    background:#fff;

}

body.dark-mode .tool-btn{

    background:#1f2937;

    color:#fff;

}

body.dark-mode .tool-btn:hover{

    background:#2563eb;

}

body.dark-mode pre{

    background:#020617;

}

body.dark-mode code{

    color:#fff;

}

body.dark-mode .loading-overlay{

    background:rgba(15,23,42,.75);

}



/*==================================
        MOBILE
==================================*/

@media(max-width:768px){

.chat-wrapper{

    width:100%;

    height:100vh;

    border-radius:0;

}

.chat-header{

    height:64px;

    padding:10px;

}

.header-info h4{

    font-size:16px;

}

.header-btn{

    width:34px;

    height:34px;

}

.logo{

    width:40px;

    height:40px;

}

.chat-body{

    padding:12px;

}

.message{

    max-width:88%;

    font-size:14px;

}

.chat-footer{

    padding:10px;

}

.chat-input-wrapper{

    gap:6px;

}

#question{

    font-size:16px;

    min-height:44px;

}

.tool-btn{

    width:42px;

    height:42px;

}

.send-btn{

    width:46px;

    height:46px;

}

}


/*==================================
        SMALL MOBILE
==================================*/

@media(max-width:480px){

.header-info h4{

    font-size:15px;

}

.status{

    font-size:11px;

}

.message{

    max-width:92%;

}

.tool-btn{

    width:40px;

    height:40px;

}

.send-btn{

    width:42px;

    height:42px;

}

}


/*==================================
        iPHONE SAFE AREA
==================================*/

@supports(padding:max(0px)){

.chat-footer{

    padding-bottom:

    max(12px,env(safe-area-inset-bottom));

}

.chat-header{

    padding-top:

    max(10px,env(safe-area-inset-top));

}

}


/*==================================
        HOVER EFFECT
==================================*/

.message{

    transition:.25s;

}

.message:hover{

    transform:translateY(-2px);

    box-shadow:0 10px 25px rgba(0,0,0,.10);

}


/*==================================
        SCROLL TO TOP
==================================*/

.chat-body{

    scroll-behavior:smooth;

}


/*==================================
        SELECTION
==================================*/

::selection{

    background:#2563eb;

    color:#fff;

}

/* The selected launcher/button color is also the chatbot's accent color. */
.chat-header,
.user-message .message,
.send-btn,
.modal-header{
    background:var(--chat-theme-color) !important;
    color:var(--chat-theme-text) !important;
}

.chat-header *,
.user-message .message,
.user-message .message a,
.user-message .time,
.user-message .message-meta,
.user-message .message-action-btn{
    color:var(--chat-theme-text) !important;
}

.user-message .time,
.user-message .message-meta,
.user-message .message-action-btn{
    opacity:.82;
}

.header-btn:hover,
.header-btn:focus-visible,
.message-action-btn:hover,
.message-action-btn:focus-visible{
    color:var(--chat-theme-color) !important;
}

.message-text .chat-directions-link,
.tool-btn:hover,
.btn-primary,
.btn-primary:hover{
    background:var(--chat-theme-color) !important;
    color:var(--chat-theme-text) !important;
}

#question:focus,
.form-control:focus,
.form-select:focus{
    border-color:var(--chat-theme-color) !important;
    box-shadow:0 0 0 3px rgba(var(--chat-theme-rgb), .15) !important;
}

.send-btn:hover{
    box-shadow:0 5px 15px rgba(var(--chat-theme-rgb), .4) !important;
}

::selection{
    background:var(--chat-theme-color) !important;
}


/*==================================
        LINKS
==================================*/

.message a{

    word-break:break-word;

}


/*==================================
        PRINT
==================================*/

@media print{

.chat-header,
.chat-footer,
.typing-area{

    display:none !important;

}

.chat-wrapper{

    height:auto;

}

}


/*==================================
        END
==================================*/
.universal-modal .modal-content{border:0;border-radius:18px;box-shadow:0 18px 55px rgba(22,35,70,.25);overflow:hidden}.universal-modal .modal-header{border:0;padding:22px 22px 8px;gap:12px}.universal-modal .modal-body{padding:12px 22px 18px;color:#475569;line-height:1.6}.universal-modal .modal-body p{margin:0;white-space:pre-line}.universal-modal .modal-footer{border:0;background:#f8fafc;padding:14px 22px}.universal-modal-icon{width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#e8efff;color:#3158e8;font-size:19px;flex:0 0 42px}.universal-modal[data-type="success"] .universal-modal-icon{background:#e8f8ef;color:#168653}.universal-modal[data-type="warning"] .universal-modal-icon{background:#fff4db;color:#b77900}.universal-modal[data-type="error"] .universal-modal-icon{background:#ffe8ea;color:#c73545}.dark-mode .universal-modal .modal-content,.dark-mode .universal-modal .modal-footer{background:#172033;color:#e8eefb}.dark-mode .universal-modal .modal-body{color:#cbd5e1}
