﻿
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: #f2f4f8;
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 100vh;*/
}

.chat-container {
    width: 100%;
    height: 550px;
    background-color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: #4a90e2;
    color: white;   
    font-size: 18px;
    font-weight: bold;
    text-align: center;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    padding-left: 30px;
    border-top: 1px solid #eee;
    background-color: #f9f9f9;
}

    .chat-input-area input {
        flex: 1;
        padding: 10px;
        border-radius: 20px;
        border: 1px solid #ccc;
        outline: none;
        margin-right: 10px;
    }

#userInput {
    max-width: -webkit-fill-available;
    width: 91%;
    border-radius: 15px;
    padding: 5px;
    resize: none;
}


.message {
    margin: 10px 0;
    max-width: 900px;
    padding: 10px 15px;
    border-radius: 20px;
    clear: both;
    color: black;
    font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace !important;
}

.user-message {
    background: linear-gradient(to right, #d0f0fd, #b3e5fc);
    color: #083b5b;
    align-self: flex-end;
    margin-left: auto !important;
    padding: 12px 16px;
    border-radius: 18px 18px 4px 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin: 8px 0;
    word-wrap: break-word;
    width: 100%;
}

.bot-message {
    background-color: #f1f8ff;
    border-left: 4px solid #2196f3;
    color: #1a1a1a;
    padding: 12px 16px;
    border-radius: 18px 18px 18px 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
    margin: 8px 0;
    word-wrap: break-word;
    transition: background 0.3s ease;
}


.input-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    font-family: ui-monospace,SFMono-Regular,SF Mono,Menlo,Consolas,Liberation Mono,monospace !important;
}

input[type="text"] {
    width: 400px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.bot-message h1, .bot-message h2, .bot-message h3 {
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.bot-message p, .bot-message ul {
    margin: 6px 0;
}

.bot-message ul {
    padding-left: 20px;
    list-style-type: disc;
}

.bot-message strong {
    font-weight: bold;
}

.bot-message em {
    font-style: italic;
}

.timestamp {
    display: block;
    /*font-size: 0.75rem;*/
    font-size: x-small;
    color: black;
    margin-top: 4px;
    text-align: right;
}

#sendButton {
    background: linear-gradient(to right, #4facfe, #00f2fe);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: background 0.3s ease, transform 0.2s ease;
}

    #sendButton:hover {
        background: linear-gradient(to right, #43e97b, #38f9d7);
        transform: translateY(-1px);
    }

    #sendButton i {
        font-size: 14px;
    }

.copy-btn {
    margin-top: 5px;
    font-size: 12px;
    padding: 4px 8px;
    background-color: #eee;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

    .copy-btn:hover {
        background-color: #ccc;
    }

/* CSS */


#chat-icon {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 32px;
    cursor: pointer;
    z-index: 1001;
}

#chat-container-wrapper {
    position: fixed;
    bottom: 70px;
    right: 80px; /* distance left from the icon */
    display: none; /* initially hidden */
    z-index: 1000;
}

.chat-container {
    width: 430px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.chat-header {
    background-color: #007bff;
    color: white; 
    font-weight: bold;
}

.chat-messages {
    height: 200px;
    overflow-y: auto;
    padding: 10px;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    gap: 10px;
}

    .chat-input-area input {
        flex: 1;
        padding: 5px;
    }

    .chat-input-area button {
        padding: 5px 10px;
    }

#chat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    height: 125PX;
    border: 2px solid;
    border-radius: 56%;
}

/* Animation Start*/
#chat-icon {
    background-color: white;
    border-radius: 56%;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1001;
    animation: pulse-icon 2s infinite;
    transition: transform 0.3s ease;
}

    #chat-icon img {
        object-fit: contain;
        border-radius: 56%;
    }

@keyframes pulse-icon {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.5);
    }

    70% {
        transform: scale(1.08);
        box-shadow: 0 0 0 12px rgba(0, 123, 255, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
    }
}
/* Animation End*/

#chat-container-wrapper {
    position: fixed;
    bottom: 80px;
    right: 90px;
    display: none;
    z-index: 1000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.chat-container {
    width: 420px;
    height: 520px;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    background-color: #007bff;
    color: #ffffff;   
    font-weight: 600;
    font-size: 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.chat-messages {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #333;
}

.chat-input-area {
    display: flex;
    padding: 10px;
    gap: 10px;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

    .chat-input-area input[type="text"] {
        flex: 1;
        padding: 8px 10px;
        border: 1px solid #ccc;
        border-radius: 6px;
        font-size: 14px;
        outline: none;
    }

    .chat-input-area button {
        background-color: #007bff;
        color: white;
        border: none;
        padding: 8px 14px;
        font-size: 14px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 6px;
        transition: background-color 0.3s ease;
        max-width: 13%;
        min-width: 78px;
        background-repeat: no-repeat;
        background-size: contain;
        width: -webkit-fill-available;
    }

        .chat-input-area button:hover {
            background-color: #0056b3;
        }

.chat-header {
    position: relative;
    /*    background-color: #007bff;
    color: #ffffff;*/
    background-color: #fff;
    color: #007bff;   
    font-weight: 600;
    font-size: 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}


.chat-header img {
    object-fit: contain;
    height: 37px;
    border-radius: 20%;
}

.edit-icon {
    cursor: pointer;
    margin-left: 8px;
    color: #888;
    font-size: 14px;
}

    .edit-icon:hover {
        color: #000;
    }



.suggestion-list {
    list-style: none;
    margin: 0;
    padding: 5px;
    border: 1px solid #ccc;
    background: white;
    max-height: 150px;
    overflow-y: auto;
    position: absolute;
    bottom: 100px;
    width: 90%;
    display: none;
    z-index: 1000;
    padding-left: 10px;
    border-radius: 15px;
}

    .suggestion-list li {
        padding: 5px;
        cursor: pointer;
    }

        .suggestion-list li:hover {
            background-color: #f0f0f0;
            border-radius: 15px;
        }



.message-row {
    display: flex;
    align-items: flex-start;
    /*gap: 10px;*/
}

.bot-icon {
    width: 30px;
    height: 30px;
    margin-top: 14px;
}

.message.bot-message {
    /*    background-color: #f1f1f1;

*/ border-radius: 10px;
    padding: 10px;
    background-color: white;
    position: relative;
    /*    max-width: 400px;
*/ font-family: sans-serif;
    width: 100%;
}

.bot-content {
    margin-bottom: 8px;
}


#scrollToBottomBtn {
    position: absolute;
    bottom: 101px;
    right: 50%;
    background-color: #007bff;
    color: white;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    display: none; /* hidden by default */
    z-index: 10;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    border:none;
    /*border: 2px solid #007bff;*/
}


/* adding expand css */

/* Expanded style */
#chat-container-wrapper.expanded {
    width: 50%;
    height: 80%;
    position: fixed;
    bottom: 70px;
    right: 88px;
    z-index: 1000;
}

    #chat-container-wrapper.expanded .chat-container {
        width: -webkit-fill-available;
        height: -webkit-fill-available;
    }

.icon copy-icon {
    height: 20px;
    width: 21px;
}

/* Expand button styling */
.expand-btn {
   /* position: absolute;*/
    /* top: 8px;
    right: 40px;*/
    background: none;
    border: none;
    color: #007bff;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    height: 42px;
    width: 44px;
    transition: width 0.3s ease, height 0.3s ease;
    right: 10px;
    top: 18px;
    background-size: 30px 29px;
    background-repeat: no-repeat;
}

/*#typingindicator {*/
#typing-indicator {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 15px;
    background-color: white;
    border-radius: 20px;
    /*    max-width: fit-content;
*/ margin: 10px 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.typing-dots {
    display: flex;
    gap: 6px;
    align-items: center;
    /*    justify-content: center;
*/ height: 20px;
}

    .typing-dots span {
        width: 12px;
        height: 12px;
        background-color: #333;
        border-radius: 50%;
        display: inline-block;
        animation: bounce 1.2s infinite ease-in-out;
    }

        .typing-dots span:nth-child(1) {
            animation-delay: 0s;
        }

        .typing-dots span:nth-child(2) {
            animation-delay: 0.2s;
        }

        .typing-dots span:nth-child(3) {
            animation-delay: 0.4s;
        }

        .typing-dots span:nth-child(4) {
            animation-delay: 0.6s;
        }

        .typing-dots span:nth-child(5) {
            animation-delay: 0.8s;
        }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.3;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}




/* Modal backdrop */
/* Modal content with separate header/body */
.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0; /* Remove padding to separate header/body */
    border-radius: 8px;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

/* Fixed modal header */
.modal-header {
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Scrollable modal body */
.modal-body {
    padding: 20px !important;
    overflow-y: auto;
    height: 100%;
}

/* Ensure body scrolls within max-height */
.modal-content {
    overflow: hidden;
}

/* Adjust modal-info styles inside body */
.modal-info h2, .modal-info h3, .modal-info h4 {
    margin-top: 15px;
    color: #333;
}

.modal-info ul {
    list-style-type: none;
    padding-left: 1em;
}

    .modal-info ul li::before {
        content: "• ";
        color: #007ACC;
        font-weight: bold;
        margin-right: 6px;
    }

.modal-info p {
    margin: 10px 0;
    color: #555;
}

/* Close button */
.close-modal {
    color: #000;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

    .close-modal:hover {
        color: #000;
    }

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

    .modal-body::-webkit-scrollbar-thumb:hover {
        background-color: #999;
    }

#btnPrompts {
    width: 36px;
    height: 36px;
    background-image: url('@Url.Content("~/Content/imgs/icon_image/infobutton.png")');
    background-size: cover; /* or use 'contain' if image fits better that way */
    background-repeat: no-repeat;
    background-position: center;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: inline-block;
}

.chat-container {
    width: 420px;
    height: 520px;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: #ffffff;
    color: #007bff;
   /* padding: 12px 40px 12px 16px;*/
    font-weight: 600;
    font-size: 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    position: relative;
}

    .chat-header button {
        border: none;
        cursor: pointer;
    }

.chat-close-btn {
    /*position: absolute;*/
    left: 23px;
    top: 0px;
    font-size: xx-large;
    cursor: pointer;
    color: #007bff;
    background-color: white;
    transition: color 0.2s ease;
}

    .chat-close-btn:hover {
        color: #007bff;
    }


.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    color: #007bff;
    padding: 10px 16px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Left side (info button) */
.header-left button {
    width: 36px;
    height: 36px;
    background-image: url('/Content/imgs/icon_image/infobutton.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-radius: 50%;
    cursor: pointer;
}

/* Center part (icon + title) */
.header-center {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

    .header-center img {
        height: 32px;
        width: 32px;
        object-fit: contain;
        border-radius: 50%;
    }

/* Right side (expand + close buttons) */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.expand-btn,
.chat-close-btn {
    background: none;
    border: none;   
    color: #007bff;
    cursor: pointer;
    width: 36px;
    height: 36px;
    background-repeat: no-repeat;
    background-size: contain;
}



.chat-header {
    height:72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    color: #007bff;
    padding: 8px 12px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-center {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 16px;
    color: #007bff;
}

/* Icon buttons */
.chat-header button {
    background: none;
    border: none;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#btnPrompts {
    background-image: url('/Content/imgs/icon_image/infobutton.png');
/*    background-size: 24px 24px;*/
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 25%;
}

/* Optional AI icon styling */

/* Expand Button */
#expandBtn {
    background-image: url('/Content/imgs/icon_image/expand.png'); /* replace with actual path */
    background-size: 24px 24px;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 8px;
}

/* Close Button */
.chat-close-btn {
    font-size: xx-large;
    color: #007bff;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}


#aiIconBtn {
    background-image: url('/Content/imgs/icon_image/iconforaimessage.png');
    background-size: cover; /* or contain */
    background-repeat: no-repeat;
    background-position: center;
    height: 52px;
    width: 52px;
    border: none;
    padding: 0;
    display: inline-block;
}


    #aiIconBtn img {
        height: 52px;
        width: 52px;
        object-fit: contain;
        border-radius: 50%;
    }

.prompts-btn {
    /*position: absolute;*/
    bottom: 10px;
    left: 10px;
    padding: 5px 12px;
    font-size: 14px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

    .prompts-btn:hover {
        background-color: #e0e0e0;
    }

.sample-menu {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 10px;
    width: calc(100% - 20px);
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 9999;
}

.sample-list {
    list-style: none;
    padding: 10px;
    margin: 0;
}

    .sample-list li {
        padding: 8px 12px;
        border-bottom: 1px solid #eee;
        cursor: pointer;
        font-size: 14px;
    }

        .sample-list li:hover {
            background-color: #f9f9f9;
        }

#btnsubordinate {
   /* background-image: url('@Url.Content("~/Content/imgs/icon_image/employees.png")');*/
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    width: 36px;
    height:36px;
    border: none;
    background-color: transparent;
    cursor: pointer;
}

#chatWindow {
    position: relative; /* Makes .loadingContainerMsg position relative to chat window */
}

.loadingContainerMsg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    background-color: white;
    width: 120px;
    height: 60px;
    text-align: center;
    line-height: 60px;
    border: 1px solid black;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.bot-message ol {
    list-style: decimal;
    padding-left: 22px;
    margin: 6px 0;
}

.bot-message ul {
    list-style: disc;
    padding-left: 22px;
    margin: 6px 0;
}

    /* nested lists indent more */
    .bot-message ol ol,
    .bot-message ol ul,
    .bot-message ul ul,
    .bot-message ul ol {
        margin-top: 6px;
        padding-left: 22px;
    }


