* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#eisgpt-chat-widget {
    font-family: "Roboto", sans-serif;
    position: fixed;
    bottom: 0;
    right: 0;
    width: 48%;
    background: white;
    border-radius: 0;
    box-shadow: -10px 0px 15px rgb(0 0 0 / 38%);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
   /* border-left: 2px solid #ecf8ff;
    */
    z-index: 500;
    letter-spacing: .00625em;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5rem;
}

.standalone {
    width: 100% !important;
    max-width: 65% !important;
    height: 100% !important;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0px 0px 15px rgb(0 0 0 / 18%) !important;
}

.standalone-app {
    background-color: #F2F2F2;
}

#eisgpt-chat-header {
    background: #1E3765;
    color: white;
    padding: 15px;
    display: flex;
   /* Enables Flexbox */
    align-items: center;
   /* Centers vertically */
    justify-content: space-between;
   /* Keeps title on left and button on right */
   z-index: 999;
}
#eisgpt-chat-header span {
    flex-grow: 1;
   /* Makes it take up available space */
    text-align: left;
    font-size: 1.5em;
}
#eisgpt-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
}
#eisgpt-chat-input {
    padding: 10px;
   /*border-top: 1px solid #ddd;
    */
    display: flex;
}
#eisgpt-message-input {
    flex: 1;
    padding: 5px 8px;
    border: 0;
    border-radius: 5px;
    background: #f5f5f5;
    color: #545454;
    font-size: 16px;
}
#eisgpt-send-btn {
    padding: 8px;
    background: #6D247A;
    color: white;
    border: none;
    border-radius: 5px;
    height: 40px;
    margin-left: 5px;
}
#eisgpt-send-btn:focus {
    outline-offset: 2px !important;
}
.send-active {
    background: #1D4ED8;  
}

button#eisgpt-send-btn:hover {
    background: #1D4ED8;
}

.message:first-child {
    margin-top: 15px;
}

.message {
    margin: 20px 0;
}

.user {
    text-align: right;
}
.bot {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.bot-avatar {
    flex: 0 auto;
    background: #1E3765;
    width: 35px;
    height: 35px;
    margin: 2px 5px 0 0;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3px;
    border-radius: 23px;
}

.message-content {
    display: inline-block;
    max-width: 80%;
    padding: 10px;
    border-radius: 10px;
    font-size: 16px;
}
.user .message-content {
    background: #007FA3;
    color: white;
}
.bot .message-content {
    flex: 0 auto;
    background: #F3F4F6;
    color: black;
}

.bot .message-content p:first-child {
    margin-top: 0;
}

.citation {
    font-size: 12px;
    color: #2563EB;
    display: block;
}
.bot .message-content svg {
    display: block;
    margin: auto;
}

.message-content hr {
    border: 1px solid #e8e8e8;
    margin: 20px 0;
}

/* chat tools styles */

.chat-tools {
    display: flex;
    width: 180px;
    padding: 5px 0 0 40px;
}

/*Feedback*/

.feedback-container {
    display: flex;
    gap: 2px;
}

button.thumbs-up,button.thumbs-down  {
    border: 0;
    background: none;
    cursor: pointer;
    border-radius: 3px;
    padding: .375rem;
}

button.thumbs-up:hover ,button.thumbs-down:hover  {
    background: #f3f4f6;
}

.thumbs-down.f-negative:focu, .thumbs-down.f-positive:focus {
    outline: none !important;
}

button.thumbs-up.f-positive svg {
    color: #006600 !important;
}

button.thumbs-down.f-negative svg {
    color: #d70030;
}

/* Copy button styles */

.copy-container {
    display: flex;
    margin-right: 2px;
}

.thumbs-up svg, .thumbs-down svg {
    color: #333;
}

.copy-button {
    display: flex;
    background: none;
    border: 0;
    justify-content: center;
    align-items: center;
    padding: .375rem;
    border-radius: 3px;
    cursor: pointer;
}

.copy-button:hover {
    background: #f3f4f6;
}

button.copy-button:active {
    background: #e7ecf4;
}

.copy-button svg {
    margin-top: -5px;
    color: #333;
}

/* Fade transition styles */
.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s;
}
#eisgpt-send-btn svg {
    fill: currentColor;
   /* Inherits the text color of the button */
    width: 24px;
    height: 24px;
}
.fade-enter-from, .fade-leave-to {
    opacity: 0;
}
/* Style for the close (×) and menu chat buttons in the header */
#eisgpt-close-btn {
    background: #007FA3;
    border: none;
    color: #1E3765;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 17px;
    margin-right: 10px;
}
#eisgpt-menu-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 17px;
    margin-right: 10px;
}
#eisgpt-menu-btn:hover {
    background: #1E3A8A;
}
#eisgpt-close-btn:hover {
    background: #6FC7EA;
}   
/* Chat bubble styling */
#eisgpt-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 193px;
    height: 49px;
    border-radius: 35px;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(30, 55, 101, 0.3);
    text-align: center;
    font-family: roboto, sans-serif;
    font-size: 18px;
    font-weight: bold;
    display: flex;
    flex-direction: row;
    background: linear-gradient(135deg, #1E3765 0%, #007FA3 50%, #6D247A 100%);
    background-size: 200% 200%;
    animation: gradientShift 6s ease infinite;
    border: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

#eisgpt-chat-bubble::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#eisgpt-chat-bubble:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 55, 101, 0.4);
}

#eisgpt-chat-bubble:hover::before {
    left: 100%;
}

#eisgpt-chat-bubble p {
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

#eisgpt-chat-bubble svg {
    height: 33px;
    margin-left: 5px;
    width: 33px;
    fill: #FFFFFF;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

#eisgpt-chat-bubble:focus {
    outline-offset: 2px;
    outline: solid 2px #007FA3;
}
/* Citations */ 

.inline-citation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    margin-left: 4px;
    font-size: 0.8em;
    font-weight: bold;
    text-decoration: none;
    color: #3d3d3d; 
    background-color: #e8f0fe; /* Light blue */
    border-radius: 50%;
    border: 1px solid #3d3d3d;
    text-align: center;
    line-height: 16px;
    transition: all 0.2s ease-in-out;
  }
  
  .inline-citation:hover {
    background-color: #0056b3;
    color: white;
    text-decoration: none;
  }

  /* Tooltip */
  
/* Tooltip container */
.cite {
    position: relative;
    display: inline-flex;
  }
  
  /* Tooltip text */
  .cite .tooltiptext {
    visibility: hidden;
    width: 168px;
    background-color: #ffffff;
    text-align: center;
    padding: 5px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #021627;
  
    /* Position the tooltip text */
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 0%;
    margin-left: -75px;
  
    /* Fade in tooltip */
    opacity: 0;
    transition: opacity 0.3s;
  }
  
  /* Tooltip arrow */
  .cite .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #d1d5db transparent transparent transparent;
  }
  
  /* Show the tooltip text when you mouse over the tooltip container */
  .cite:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
  }

  .tooltiptext a {
    color: #0057b3;
}

  .tooltiptext img {
    display: inline-block !important;
    top: 4px;
    position: relative;
    left: -3px;
    color: #101827;
}

/* code block */
code {
    background-color: #e7ecf4;
    color: #2f3849;
    font-family: monospace;
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 10px;
}

/* Related Questions */

.rq-title {
    color: #2f384b;
    margin: 15px 0;
}

.related-question {
    display: block;
    padding: 7px 15px;
    margin: 8px 0;
    border-radius: 27px;
    color: #2f384c;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    background: #e7ecf4;
    border: 1px solid #d6e5fc;
    transition: all 0.2s ease-in-out;
}

.related-question:hover {
    background-color: #E5F3FF; /* Light blue background on hover */
    text-decoration: none;
}

/* Chat Footer */

#eisgpt-chat-footer {
    display: flex;
    justify-content: center;
    height: 25px;
}

#eisgpt-chat-footer p {
    margin: 0;
    color: #333;
    font-size: 13px;
}

#eisgpt-chat-footer a {
    color: #2563EB;
}

/* Menu */

#eisgpt-info-menu-container {
    position: absolute;
    bottom: 0;
    right: 56px;
    width: 207px;
    height: 107px !important;
    z-index: 10000;
    animation: fadeIn 0.2s ease-out;
    top: 55px;
}

#eisgpt-info-menu {
    position: relative; /* Ensure pseudo-element positions correctly */
    height: auto;
    background-color: #fff;
    padding: 15px;
    border-radius: 6px ;
    box-shadow: 0 2px 10px rgb(0 0 0 / 21%);
    width: 100%;
    animation: slideUp 0.9s ease-out;
}

/* Add the triangle pointer */
#eisgpt-info-menu::before {
    content: "";
    position: absolute;
    top: -10px; /* Adjust based on triangle size */
    right: 20px; /* Adjust to align with your button */
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}

#eisgpt-menu-close-btn {
    position: absolute;
    right: -87px;
    background: rgb(230 230 230);
    border: none;
    color: rgb(68 68 68);
    cursor: pointer;
    font-size: 1em;
    display: flex;
    align-items: center;
    padding: 5px;
    border-radius: 17px;
    margin-right: 10px;
    height: 25px;
    width: 25px;
    top: -3px;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

#eisgpt-info-menu hr {
    width: 100%;
    border: 1px solid #eee;
}

#eisgpt-info-menu ul {
    list-style: none;
    padding: 0;
    margin: 0
}

#eisgpt-info-menu > ul > li {
    /* border: 1px solid #eee; */
    padding: 5px;
}

#eisgpt-info-menu > ul > li > a {
    color: #1E3765;
    text-decoration: none;
    font-size: 16px;
    font-weight: 600;
}

  /* Mobile */ 

@media screen and (max-width: 768px) {
    #eisgpt-chat-widget {
        width: 60%;
    }
}

@media screen and (max-width: 450px) {
    #eisgpt-chat-widget {
        width: 100%;
    }
    .standalone {
        max-width: 100% !important;
    }
}
