/* ============================================================================
   AI CHAT MODAL & SEARCH INTERFACE
   ============================================================================
   Related IDs from index.html:
   - #searchboxmain (Bootstrap modal container)
   - #aisearch-display (output/chat display area)
   - #search-box-form (search form wrapper)
   - #aisearchmodaltext (textarea input)
   - #submit-ai-search (submit button)
   - #new-ai-topic (new chat button)
   - #btn-search (header search icon)
   - #recent-accord (recent chats list)
   - #toastbtn (privacy notice button)
   - #protectedTooltip (privacy tooltip)
   - #cloDatapro (close disclaimer button)
   - #accordionrecent (recent chats accordion)
   - #redoquestionMain (redo question container)
   - #chat-status (sr-only status announcer)
   
   Related IDs from js/chat-ai.js (injected styles):
   - #chat-ai-stream-styles (injected style tag)
   
   See js/chat-ai.js for event handlers and stream management
   ============================================================================ */

/* ============================================================================
   Common (Might exist on style.css)
   ============================================================================ */

@font-face {
    font-display: block;
    font-family: "bootstrap-icons";
    src: url("/content/dam/infosys-web/en/new-design25/fonts/bootstrap-icons.woff2") format("woff2"),
        url("/content/dam/infosys-web/en/new-design25/fonts/bootstrap-icons.woff") format("woff");
}

/* body,
html {
    font-size: 16px;
    font-weight: 400;
    font-family: "Inter", sans-serif;
    padding: 0;
    margin: 0;
} */

.text-grey-800 {
    color: #0e0a42 !important;
}

/* ============================================================================
   1. BUTTON STYLES (Shared across modal and banner)
   ============================================================================ */
.cta-btn {
    display: inline-flex;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border: 0;
    color: #fff;
    border-radius: 8px;
    background: linear-gradient(180deg, #383838 26.47%, #000 100%);
    box-shadow: 0px 15px 22px 0px rgba(118, 95, 184, 0.3);
    text-decoration: none;
    transition: all 0.5s ease;
}

.cta-btn:focus,
.cta-btn:hover {
    box-shadow: 0px 15px 22px 0px #775fb8a0;
    color: #fff;
}

.cta-link {
    color: #0e0a42;
    display: inline-flex;
    font-weight: 500;
    align-items: center;
    text-decoration: none;
    transition: all 0.5s ease;

    background: linear-gradient(90deg, #868ebd, #868ebd);
    /* background: linear-gradient(90deg, #444c79, #444c79); */
    background-size: 100% 1px;
    background-position-x: 0%;
    background-position-y: calc(100% - 1px);
    background-repeat: no-repeat;
    padding-left: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    position: relative;
}

.cta-link:hover,
.cta-link:focus {
    color: #2e53e1 !important;
    background: linear-gradient(90deg, #2e53e1, #2e53e1);
    background-size: 100% 1px;
    background-position-x: 0%;
    background-position-y: calc(100% - 1px);
    background-repeat: no-repeat;
    padding-left: 0px;
    padding-right: 0px;
    animation-name: underlineHover;
    animation-duration: 0.6s;
    animation-timing-function: ease-in-out;
}

.cta-arrow {
    transform: rotate(-45deg);
    transition: all 0.2s ease-in-out;
}

.cta-link .cta-arrow,
.cta-link .cta-video {
    position: absolute;
    right: -20px;
}

.cta-btn:hover .cta-arrow,
.cta-btn:focus .cta-arrow,
.cta-link:hover .cta-arrow,
.cta-link:focus .cta-arrow {
    animation: textarrowani 1.4s linear;
}

@keyframes textarrowani {
    0% {
        opacity: 1;
        transform: translate(0px, 0px) rotate(-45deg);
    }

    25% {
        opacity: 0;
        transform: translate(10px, -10px) rotate(-45deg);
    }

    26% {
        opacity: 0;
        transform: translate(-10px, 10px) rotate(-45deg);
    }

    55% {
        opacity: 1;
        transform: translate(0px, 0px) rotate(-45deg);
    }
}

.cta-btn-white {
    background-color: #fff !important;
    color: #000 !important;
    background: none;
}

.cta-btn-white::before {
    display: none;
}


/* ============================================================================
   2. MODAL POPUP (#searchboxmain) - Layout, animations, positioning
   ============================================================================ */

#searchboxmain .modal-dialog {
    max-width: 100%;
    margin: 0;
    height: 100%;
}

#searchboxmain .modal-content {
    border: none;
    border-radius: 0;
    height: 100%;
    overflow: hidden;
}

#searchboxmain {
    left: unset;
    font-size: 16px;
}

#searchboxmain.show {
    -webkit-animation: expandsearchBox 0.8s forwards;
    animation: expandsearchBox 0.8s forwards;
}

@keyframes expandsearchBox {
    0% {
        right: 5%;
        top: 8%;
        width: 0;
        height: 0;
        border-radius: 50px;
        z-index: 0;
    }

    20% {
        right: 3%;
        top: 8%;
        width: 140px;
        height: 40px;
        border-radius: 50px;
        z-index: 1055;
    }

    100% {
        width: 100%;
        height: 100vh;
        top: 0;
        right: 0;
        z-index: 1055;
        border-radius: 0;
    }
}

#searchboxmain .modal-body {
    opacity: 0;
    height: 100%;
    padding: 0;
    margin: 0;
}

#searchboxmain.show .modal-body.animateNow {
    -webkit-animation: searchmodalbody 0.5s forwards;
    animation: searchmodalbody 0.5s forwards;

    -webkit-animation-delay: 0.8s;
    animation-delay: 0.8s;
}

@-webkit-keyframes searchmodalbody {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

@keyframes searchmodalbody {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0px);
    }
}

/* ============================================================================
   3. MODAL LAYOUT - Grid structure (searchgridleft, searchgridright)
   ============================================================================ */

.searchgridleft {
    /* box-shadow: 3px 4px 8px 0px #0e0a421f; */
    background-color: #ffffff;
    padding: 10px;
    transform: translateX(-100%);
    height: 100%;
    width: 200px;
    transition: all 0.5s ease;
}

#searchboxmain .modal-body.animateNow .searchgridleft {
    transform: translateX(0%);
    transition: all 0.5s ease;
    /* transition-delay: 1.2s; */
}

/* ============================================================================
   4. MODAL HEADER AREAS (searchlefthead, searchrighthead)
   ============================================================================ */

.searchlefthead,
.searchrighthead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 25px;
    width: 100%;
}

.searchgridleft .cta-btn {
    width: 100%;
    padding: 14px 15px;
}

.searchgridleft .cta-btn img {
    width: 17px;
}

.searchleftgridexpand {
    border: 1px solid #bac9dd;
    box-shadow: 0px 15px 22px 0px #765fb84d;
    border-radius: 8px;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.searchleftgridexpand img {
    width: 15px;
}

.searchgridright {
    display: flex;
    align-items: center;
    flex-direction: column;
    height: 100%;
    width: calc(100% - 200px);
    transition: width 0.5s ease;
    padding: 0;
    background-color: #f0f5fd;
    /* transition-delay: 1.2s; */
}

.searchrighthead {
    margin-bottom: 0;
    height: auto;
    transform: translateY(30px);
    opacity: 0;
    padding: 10px 15px;
    background: #f0f5fd;
    box-shadow: 0px 0px 5px 0px rgba(0, 0, 0, 0.1);
}

#searchboxmain .modal-body.animateNow .searchrighthead {
    transform: translateY(0px);
    opacity: 1;
    transition: all 0.5s ease;
    /* transition-delay: 1.4s; */
}

.searchrightheadinner {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-ai-icon {
    background: linear-gradient(180deg, #998ff9 0%, #7bb4fc 100%);
    width: 24px;
    height: 24px;
    border-radius: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-ai-icon img {
    width: 14px;
}

.searchrightheadinner p {
    font-size: 12px;
    background: #1a1552;
    padding: 5px 8px;
    border-radius: 5px;
    margin: 0;
    color: #ffff;
}

.searchrighthead .cta-btn {
    line-height: 1;
    gap: 5px;
}

.searchrighthead .cta-btn i {
    font-size: 24px !important;
}

#searchboxmain .modal-body .h6-head {
    font-size: 20px;
}

.searchrightmain {
    background-color: #f0f5fd;
    border-radius: 10px;
    height: 90%;
    padding: 5px 50px 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

/* ============================================================================
   5. SEARCH OUTPUT AREA (#aisearch-display, .searchboxinputoutput)
   ============================================================================ */

.searchboxinputoutput {
    height: calc(100% - 200px);
    overflow-y: auto;
    padding: 15px 15px 30px;
    transform: translateY(30px);
    opacity: 0;
}

#searchboxmain .modal-body.animateNow .searchboxinputoutput {
    transform: translateY(0px);
    opacity: 1;
    transition: all 0.5s ease;
    /* transition-delay: 1.6s; */
}

.searchboxinputoutputhead {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    flex-wrap: wrap;
    margin: 0 0 10px;
}

.cta-btn-transparent {
    background: transparent;
    color: #444c79;
    border: 1px solid #bac9dd;
    box-shadow: 0px 5px 22px 0px #765fb84d;
    padding: 5px 10px;
}

.cta-btn-transparent:hover {
    box-shadow: 0px 5px 22px 0px #775fb8a0;
}

/* ============================================================================
   6. SCROLLBAR STYLES (#aisearch-display, #accordionrecent)
   ============================================================================ */

/* scrollbar */
.searchboxinputoutput::-webkit-scrollbar,
#accordionrecent .accordion-body::-webkit-scrollbar {
    width: 24px;
    height: 18px;
}

.searchboxinputoutput::-webkit-scrollbar-thumb,
#accordionrecent .accordion-body::-webkit-scrollbar-thumb {
    height: 26px;
    border: 10px solid rgba(0, 0, 0, 0);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -webkit-border-radius: 17px;
    background-color: rgba(0, 0, 0, 0.15);
    -webkit-box-shadow:
        inset -1px -1px 0px rgba(0, 0, 0, 0.05),
        inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}

.searchboxinputoutput::-webkit-scrollbar-thumb:hover,
#accordionrecent .accordion-body::-webkit-scrollbar-thumb:hover {
    height: 26px;
    border: 10px solid rgba(0, 0, 0, 0);
    -webkit-background-clip: padding-box;
    background-clip: padding-box;
    -webkit-border-radius: 17px;
    background-color: rgba(0, 0, 0, 0.35);
    -webkit-box-shadow:
        inset -1px -1px 0px rgba(0, 0, 0, 0.05),
        inset 1px 1px 0px rgba(0, 0, 0, 0.05);
}

.searchboxinputoutput::-webkit-scrollbar-button,
#accordionrecent .accordion-body::-webkit-scrollbar-button {
    width: 0;
    height: 0;
    display: none;
}

.searchboxinputoutput::-webkit-scrollbar-corner,
#accordionrecent .accordion-body::-webkit-scrollbar-corner {
    background-color: transparent;
}

#searchboxmain .modal-body .searxboxform {
    height: 200px;
    transform: translateY(30px);
    opacity: 0;
}

#searchboxmain .modal-body.animateNow .searxboxform {
    transform: translateY(0px);
    opacity: 1;
    transition: all 0.5s ease;
    /* transition-delay: 1.8s; */
}

/* ============================================================================
   7. SEARCH FORM & INPUT (#search-box-form, #aisearchmodaltext)
   ============================================================================ */

#searchboxmain .modal-body .search__form {
    margin-top: 10px;
}

.search-form-inner {
    position: relative;
    padding: 10px 20px 20px 10px;
    width: 95%;
    margin: 0 auto;
    border: 2px solid #d1dceb;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0px 0px 18px 0px #765fb840;
}

.search-form-inner .btn-search-mic {
    background: #ffffff;
    color: #ffffff;
    border-radius: 100% !important;
    width: 78px;
    height: 78px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    position: absolute;
    top: -65px;
    left: 0;
    right: 0;
    margin: auto;
    z-index: 1;
    box-shadow: 0px 20px 40px -10px #765fb8;
    transition: all 0.5s ease;
}

.search-form-inner .btn-search-mic:hover::after {
    box-shadow: 0px 20px 50px -10px #765fb8;
}

.btn-search-mic.listening::before {
    animation: listening 1.3s infinite;
}

.btn-search-mic::before {
    content: "";
    position: absolute;
    width: inherit;
    height: inherit;
    border-radius: inherit;
    background-color: inherit;
    z-index: -1;
}

.btn-search-mic.listening::before {
    background-color: red;
}

@keyframes listening {
    from {
        opacity: 0.25;
    }

    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

.search-form-inner .btn-search-mic img {
    width: 25px;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.search-form-inner .btn-search-mic:after {
    content: "";
    width: 92%;
    height: 92%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    background:
        radial-gradient(49.23% 47.73% at 37.5% 40.34%,
            #88c1fd 0%,
            #7697f9 43.75%,
            #3663ff 79.33%,
            #2e62f5 100%),
        radial-gradient(27.02% 36.93% at 28.41% 52.84%,
            #83c0fd 0%,
            rgba(135, 192, 252, 0) 63.91%);
    border-radius: 100%;
    transition: all 0.5s ease;
}

.search-form-inner .btn-search-mic.listening::after {
    background:
        radial-gradient(49.23% 47.73% at 37.5% 40.34%,
            rgb(253 175 0) 0%,
            rgb(255 90 15) 43.75%,
            rgb(246 44 44) 79.33%,
            rgb(249 2 2) 100%),
        radial-gradient(27.02% 36.93% at 28.41% 52.84%,
            rgb(87 0 0) 0%,
            rgba(135, 192, 252, 0) 63.91%);
}

.ai-search-main textarea.form-control {
    background: transparent;
    border: none;
    resize: none;
    font-size: 16px;
}

.home-page-banner .ai-search-main textarea.form-control {
    height: 100px;
    border: 1px solid #e2e7ed;
}

.ai-search-main .cta-btn {
    border-radius: 8px !important;
}

.ai-search-main label {
    font-family: "Geist", sans-serif;
    font-weight: 400;
    color: #444c79;
    font-size: 16px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 5px;
    transition: transform 0.5s ease;
}

.sparkle {
    inline-size: 22px;
}

.sparkle path {
    transform-box: fill-box;
    transform-origin: center;
    fill: #bac9dd;
    stroke: #bac9dd;
    animation-delay: calc((0.5 * 1.5) + (var(--delay) * 1s));
    animation-duration: 1.5s;
}

.ai-search-main .form-control:focus~label path {
    animation-name: sparkleAni;
    animation-iteration-count: infinite;
}

@keyframes sparkleAni {
    0% {
        stroke: var(--fill);
        fill: var(--fill);
    }

    35%,
    65% {
        scale: var(--scale);
    }
}

.sparkle path:nth-of-type(1) {
    --scale: 0.5;
    --delay: 0.3;
    --fill: #0271b1;
}

.sparkle path:nth-of-type(2) {
    --scale: 1.5;
    --delay: 0.5;
    --fill: rgb(10, 224, 237);
}

.sparkle path:nth-of-type(3) {
    --scale: 2.5;
    --delay: 0.7;
    --fill: #8aa1c1;
}

ul.ai-search-recomondations {
    list-style-type: none;
    display: flex;
    gap: 10px;
    margin: 10px 0 0;
    padding: 0;
}

ul.ai-search-recomondations li a {
    border: 2px solid #d1dceb;
    background: transparent;
    border-radius: 5px;
    padding: 5px;
    font-size: 14px;
    display: inline-block;
    color: #000000;
    text-decoration: none;
    transition: all 0.5s ease;
}

ul.ai-search-recomondations li a:hover {
    background-color: #d1dceb;
}


#searchboxmain .modal-body .search-form-inner {
    width: 100%;
}

#searchboxmain .modal-body .btn-search-mic {
    position: relative;
    width: 40px;
    height: 40px;
    top: unset;
    left: unset;
    right: unset;
    padding: 12px;
    margin: 0;
}

#searchboxmain .modal-body .btn-search-mic:after {
    width: 100%;
    height: 100%;
}

#searchboxmain .modal-body .btn-search-mic img {
    width: 15px;
}

.searchboxinputoutputgrid {
    width: 100%;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* ============================================================================
   9. MESSAGE DISPLAY (.sbinput, .sboutput, .sbinputinner, .sboutputinner)
   ============================================================================ */

.sbinput,
.sboutput {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    width: 100%;
    /* margin-bottom: 10px; */
}

.sboutput {
    justify-content: flex-start;
    scroll-margin-top: 100px;
    margin-bottom: 20px;
}

.sbinputinner {
    background: #e0e7fe;
    border-radius: 8px;
    padding: 8px 10px;
    max-width: 75%;
    margin: 0 0 20px;
}

.sbinputinner p {
    margin-bottom: 0;
    color: #0e0a42;
}

.sboutputinner {
    max-width: 75%;
    margin: 0 0 20px;
}

.searchgridleft.expandIt {
    width: 60px;
    transition: all 0.5s ease;
}

.searchgridleft.expandIt~.searchgridright {
    width: calc(100% - 60px);
}

.searchgridleft .searchlefthead h5 {
    display: block;
}

.searchgridleft.expandIt .searchlefthead h5 {
    display: none;
}

.searchgridleft.expandIt .cta-btn {
    width: auto;
}

.searchgridleft .cta-btn span {
    display: block;
}

.searchgridleft.expandIt .cta-btn span {
    display: none;
}

.searchgridleft .searchleftgridexpand img {
    transform: rotate(0deg);
    transition: all 0.5s ease;
}

.searchgridleft.expandIt .searchleftgridexpand img {
    transform: rotate(180deg);
    transition: all 0.5s ease;
}

/* ============================================================================
   8. RECENT CHATS ACCORDION (#accordionrecent, #recent-accord)
   ============================================================================ */

#accordionrecent {
    margin: 20px 0;
    border: 0;
    display: block;
}

.searchgridleft.expandIt #accordionrecent {
    display: none;
}

#accordionrecent button {
    background: transparent;
    padding: 10px 0;
    color: #40536d;
    border-bottom: 0.5px solid #c1d0fd;
    font-size: 16px;
}

#accordionrecent button:focus {
    outline: 2px solid #2e53e1;
    box-shadow: none;
}

#accordionrecent .accordion-button::after {
    background-color: #e9eef7;
    padding: 10px;
    border-radius: 50%;
    background-size: 15px;
    width: 25px;
    height: 25px;
    background-position: center;
}

#accordionrecent .accordion-body {
    padding: 0 10px 0 0;
    margin: 0;
    overflow-y: auto;
    height: 50vh;
}

#accordionrecent .accordion-body ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

#accordionrecent .accordion-body ul li {
    color: #0e0a42;
    margin: 15px 0 0;
}

#accordionrecent .accordion-body ul li a {
    color: #0e0a42;
    text-decoration: none;
}

#accordionrecent .accordion-body ul li a:hover {
    text-decoration: underline;
}

.truncate-1 {
    -webkit-line-clamp: 1;
    line-clamp: 1;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

ul.ai-search-recomondations {
    flex-wrap: wrap;
}

/* ============================================================================
   10. LOADING & AI SPINNER (.loading-res, sparkle animation)
   ============================================================================ */

.loading-res {
    display: inline-block;
    margin-right: 15px;
    float: left;
}

.loading-res .sparkle {
    inline-size: 32px;
}

.loading-res.active .sparkle path {
    -webkit-animation-name: sparkleAni;
    animation-name: sparkleAni;
    animation-iteration-count: infinite;
}

.loading-res .sparkle path:nth-of-type(1) {
    fill: #0271b1;
    stroke: #0271b1;
}

.loading-res .sparkle path:nth-of-type(2) {
    fill: rgb(10, 224, 237);
    stroke: rgb(10, 224, 237);
}

.loading-res .sparkle path:nth-of-type(3) {
    fill: #8aa1c1;
    stroke: #8aa1c1;
}

#aisearchmodaltext {
    height: 100px;
    border: 1px solid #e2e7ed;
}

.btn-search-mic:focus,
.btn-search-mic:active {
    outline: 2px solid #2e53e1 !important;
}

.btn-ai-submit {
    position: relative;
    width: 40px;
    height: 40px;
    background: #000;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 100% !important;
    box-shadow: none;
    transition: all 0.5s ease;
}

.btn-new-topic {
    background: #000000;
}

.searchgridleft .cta-btn img {
    width: 15px;
}

.btn-ai-submit .bi {
    font-size: 16px;
    color: #ffffff;
}

.btn-ai-submit[disabled] {
    opacity: 0.5;
}

.btn-ai-submit:hover,
.btn-ai-submit:active,
.btn-ai-submit:focus-visible {
    background: #000000 !important;
    color: #ffffff !important;
    box-shadow: 0px 20px 40px -10px #765fb8 !important;
    outline: 2px solid #2e53e1;
}

.btn-ai-submit:disabled {
    background: #000;
    color: #ffffff;
    cursor: not-allowed;
}

.searchgridleft .cta-btn {
    width: 100%;
    padding: 12px;
    height: 40px;
}

.searchgridleft .cta-btn span {
    white-space: nowrap;
    overflow: hidden;
}

.btn-ai-submit[disabled] {
    opacity: 0.3;
}

.ai-search-main {
    display: flex;
    align-items: flex-start;
    flex-direction: row-reverse;
    gap: 0;
}

.ai-search-main label {
    padding: 6px 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

ul.ai-souce-links-list {
    margin: 0;
    padding: 0 0 0 15px;
    list-style-type: disc;
}

ul.ai-souce-links-list li {
    margin-bottom: 8px;
}

.sboutputinner ul li a {
    display: inline-block;
}

ul.ai-souce-links-list li a {
    display: inline;
    color: #0d6efd;
    text-decoration: underline;
}

.sboutputinner {
    margin: 0;
}

.sbinputinner {
    background: #e0e7fe;
    border-radius: 15px;
    padding: 12px 16px;
    max-width: 75%;
    margin: 0 0 20px;
    background-image: linear-gradient(270deg, #d0ccff 0%, #baeafa 100%);
    font-weight: 600;
}

.sboutput {
    float: right;
    width: calc(100% - 50px);
}

.messageappearani {
    transform-origin: calc(100% + 0.75em) 100%;
    -webkit-animation: message-appear 0.3s cubic-bezier(0.65, 0, 0.35, 1);
    animation: message-appear 0.3s cubic-bezier(0.65, 0, 0.35, 1);
}

@keyframes message-appear {
    0% {
        opacity: 0;
        transform: scale(0);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.sboutput:last-child {
    margin-bottom: 0;
}

.cta-redoquestion {
    box-shadow: none !important;
    background: #cbdefb !important;
}

.searchboxinputoutput {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    padding: 15px 15px 5px;
}

#searchboxmain .modal-body .searxboxform {
    height: auto;
}

.sboutputinner h1 {
    font-size: clamp(28px, 5vw, 32px);
}

.sboutputinner h2 {
    font-size: clamp(24px, 5vw, 28px);
}

.sboutputinner h3 {
    font-size: clamp(22px, 5vw, 24px);
}

.sboutputinner h4 {
    font-size: clamp(20px, 5vw, 22px);
}

.sboutputinner h5,
.sboutputinner h6 {
    font-size: 20px;
}

.sboutputinner ul li {
    font-size: 16px;
}

.sboutputinner table {
    margin-bottom: 20px;
}

.sboutputinner tbody,
.sboutputinner td,
.sboutputinner tfoot,
.sboutputinner th,
.sboutputinner thead,
.sboutputinner tr {
    border-width: 1px;
    padding: 10px;
}

.redofadeOut {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease;
}

/* ============================================================================
   11. REDO QUESTION (#redoquestionMain)
   ============================================================================ */

#redoquestionMain {
    z-index: 1;
}

/* ============================================================================
   12. LOADING STATES (.loading-res.active, stage loader text)
   ============================================================================ */

.loading-res.active {
    position: relative;
}

.loading-res.active:after {
    content: "Generating Response";
    color: #8aa1c1;
    position: absolute;
    left: 40px;
    top: 4px;
    bottom: 0;
    margin: auto;
    text-wrap: auto;
    width: 350px;
    font-size: 16px;
}

.loading-res.thinking:after {
    content: "...";
    font-size: 32px;
    line-height: 1;
    top: -10px;
}

.loading-res.analyzing:after {
    content: "Thinking";
}

.loading-res.generating:after {
    content: "Generating Response";
}

/* ============================================================================
   13. ERROR MESSAGES & FORM STATE (.chat-error, form positioning)
   ============================================================================ */

.chat-error {
    position: absolute;
    top: -40px;
    left: 0;
    transform: translateY(20px);
    z-index: -1;
    opacity: 0;
    transition: all 0.5s ease;
}

.chat-error p {
    margin: 0;
    backdrop-filter: blur(6px);
    box-shadow: -1px 5px 10.8px 0px #0000001a;
    border-radius: 5px;
    background: #b1001a;
    color: #ffffff;
    padding: 3px 8px;
}

.chat-error.active {
    z-index: 9;
    opacity: 1;
    transform: translateY(0);
}

#searchboxmain .modal-body .search__form {
    position: relative;
}

#searchboxmain .modal-body.animateNow .searchgridleft {
    z-index: 2;
}

#searchboxmain .modal-body.animateNow .searchrighthead {
    z-index: 0;
}

.chat-close-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
}

/* ============================================================================
   14. CLOSE BUTTON & PRIVACY TOOLTIP (#toastbtn, #protectedTooltip)
   ============================================================================ */

#toastbtn,
#toastbtnbnr {
    width: 35px;
    height: 35px;
    padding: 0;
    border: 0;
    background: transparent;
}

#toastbtn:focus,
#toastbtnbnr:focus {
    outline: 2px solid #2e53e1;
}

#toastbtn svg,
#toastbtnbnr svg {
    width: 30px;
}

#toastbtn svg .clas-active,
#toastbtnbnr svg .clas-active {
    opacity: 0;
    transition: all 0.5s ease;
}

#toastbtn:hover svg .clas-active,
#toastbtnbnr:hover svg .clas-active {
    opacity: 1;
}

#toastbtn svg .lock,
#toastbtnbnr svg .lock {
    fill: #19b233;
    transition: all 0.5s ease;
}

#toastbtn:hover svg .lock,
#toastbtnbnr:hover svg .lock {
    fill: #ffffff;
}

#protectedTooltip,
#protectedTooltipbnr {
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    position: absolute;
    background-color: #ffffff;
    color: #000000;
    text-align: left;
    bottom: 60px;
    right: 0;
    transform: scale(0) translate(30%, 100%);
    width: 600px;
    padding: 25px;
    box-shadow: rgba(118, 95, 184, 0.25) 0px 15px 20px 0px;
    border-radius: 16px;
    border: 1px solid rgb(13, 110, 253);
}

#protectedTooltip.active,
#protectedTooltipbnr.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translate(0, 0);
}

.caution-tag {
    font-size: 15px;
    line-height: 1.2;
    font-style: italic;
}

.search-form-inner .btn-search-mic {
    transition-delay: 0s !important;
}

.ai-search-btns {
    display: flex;
    align-items: center;
    position: relative;
    gap: 20px;
    justify-content: flex-end;
    margin: 10px 0 0;
    z-index: 1;
}

.ai-search-btns .cta-btn .bi-paperclip {
    transform: rotate(-45deg);
}

#protectedTooltip ul,
#protectedTooltipbnr ul {
    padding-left: 15px;
    list-style-type: disc;
}

#protectedTooltipbnr ul li,
#protectedTooltip ul li {
    font-size: 14px;
    font-style: italic;
    margin: 0 0 10px;
    line-height: 1.4;
}

.protected-icons {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 20px;
}

.protected-icons img {
    width: 30px;
}

.close-datapro {
    color: #000000;
    font-size: 30px;
    line-height: 1;
    opacity: 0.7;
    transition: all 0.5s ease;
}

a.close-datapro:hover {
    opacity: 1;
}

/* ============================================================================
   15. UTILITY & ACCESSIBILITY CLASSES
   ============================================================================ */


/* Active only SSE Activated  */

.loading-res {
    margin-bottom: 5px;
    display: inline-flex;
    align-items: center;
}

.loading-res.active:after {
    content: '';
}

/* Active only SSE Activated END */

@media screen and (max-width: 992px) {

    .ai-search-btns .cta-btn {
        gap: 5px;
        padding: 8px 10px;
        font-size: 14px;
    }

    /* ----------------------
    # AI Search Modal popup
    ---------------------------*/
    .sbinputinner {
        max-width: 95%;
    }

    .sboutputinner {
        max-width: 95%;
    }

    #protectedTooltipbnr,
    #protectedTooltip {
        width: 300px;
        padding: 15px;
    }

    #protectedTooltip {
        right: -15px;
    }

    #protectedTooltipbnr ul,
    #protectedTooltip ul {
        height: 300px;
        overflow: auto;
        padding-right: 15px;
    }

    .searchrightmain {
        padding: 10px 10px 100px;
    }
}

@media screen and (max-width: 767px) {
    .ai-search-btns {
        /* justify-content: space-between; */
        gap: 15px;
    }

    .ai-search-btns .cta-btn {
        font-size: 18px;
    }

    .ai-search-btns .cta-btn span {
        display: none;
    }

    .caution-tag {
        font-size: 12px;
        margin-top: 5px !important;
    }

    #searchboxmain .modal-body .search-form-inner {
        padding: 10px 0;
    }

    .search-form-inner .btn-search-mic {
        width: 58px;
        height: 58px;
        top: -58px;
    }

    .search-form-inner {
        padding: 10px;
    }

    /* ----------------------
    # AI Search Modal popup
    ---------------------------*/

    #searchboxmain .modal-body {
        position: relative;
        padding: 0;
    }

    #searchboxmain.show .modal-body.animateNow {
        animation: none;
        opacity: 1;
        transition: opacity 0.5s ease;
        transition-delay: 0.8s;
    }

    .searchgridleft {
        position: absolute;
        background: #ffffff;
        width: 95%;
        left: 0;
        top: 0;
        z-index: 1;
    }

    .searchgridleft.expandIt {
        width: 50px;
        padding: 15px 0 0;
    }

    .searchrighthead {
        padding: 18px 10px 15px 80px;
        height: 75px;
        background: #ffffff;
        box-shadow: 3px 4px 8px 0px #0e0a421f;
    }

    .searchgridright,
    .searchgridleft.expandIt~.searchgridright {
        width: calc(100% - 50px);
        margin-left: 50px;
        padding: 0;
    }

    .searchrightmain {
        padding: 10px 10px 50px 10px;
        height: calc(100vh - 145px);
    }

    .searchrighthead .cta-btn {
        padding: 10px;
        line-height: 0;
    }

    .searchboxinputoutput {
        padding: 5px;
    }

    .searchboxinputoutputhead .cta-btn-transparent {
        padding: 12px 15px;
    }

    .searchboxinputoutputhead .cta-btn-transparent span,
    .searchrighthead .cta-btn span {
        display: none;
    }

    #accordionrecent .accordion-body {
        height: 350px;
    }

    .searchgridleft.expandIt .cta-btn {
        margin: 0 0 0 5px;
        width: 40px;
        height: 40px;
    }

    .searchleftgridexpand {
        padding: 0;
        margin: 0 0 0 5px;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Chat AI New  */
    #aisearchmodaltext {
        height: 100px;
    }

    .ai-search-btns .cta-btn span {
        display: block;
    }

    .searchgridleft {
        padding: 15px;
    }

    .loading-res .sparkle {
        inline-size: 22px;
    }

    .sbinputinner {
        max-width: 100%;
    }

    .sboutputinner {
        max-width: 100%;
    }

    .loading-res {
        display: inline-block;
        margin-right: 0;
        float: none;
        padding: 5px;
    }

    .sboutput {
        float: none;
        width: 100%;
        padding: 0 0 0 5px;
    }

    .sboutputinner ul {
        padding: 0 0 0 16px;
    }
}

/* ============================================================================
   16. RESPONSIVE DESIGN (Mobile, tablet, desktop adjustments)
   ============================================================================ */

@media screen and (max-width: 600px) {
    .searchrightmain {
        height: calc(100vh - 85px);
    }
}