﻿:root {
    --ai-z-dialog: 99999;
    --ai-z-overlay: 100000; /* ensure feedback popup is always on top */
    --ai-bg: #fff;
    --ai-text: #111827;
    --ai-border: #e5e7eb;
    --ai-shadow: rgba(0, 0, 0, 0.25);
    --ai-brand: #3f51b5;
    --ai-brand-light: #eef2ff;
    --ai-brand-dark: #2f3fa0;
    --ai-muted: #6b7280;
    --ai-radius-sm: 6px;
    --ai-radius-md: 10px;
    --ai-radius-lg: 14px;
    --ai-font-sm: 13px;
    --ai-font-md: 14px;
    --ai-font-lg: 16px;
    --ai-speed-fast: 120ms ease;
    --ai-speed-mid: 200ms ease;
}

/* ---------- Prevent scroll when modal open ---------- */
.ai-feedback-open {
    overflow: hidden !important;
}

/* ---------- Overlay ---------- */
.ai-feedback-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--ai-z-overlay);
    background: rgba(17, 24, 39, 0.45); /* gray overlay */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn var(--ai-speed-mid);
}

/* ---------- Modal ---------- */
.ai-feedback-modal {
    width: min(520px, 92vw);
    max-height: 80vh;
    overflow-y: auto;
    background: var(--ai-bg);
    color: var(--ai-text);
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-lg);
    box-shadow: 0 20px 40px var(--ai-shadow);
    padding: 20px 24px;
    animation: slideUp var(--ai-speed-mid);
}

.ai-feedback-header {
    font-weight: 700;
    font-size: var(--ai-font-lg);
    margin-bottom: 12px;
    color: var(--ai-text);
}

/* ---------- Reason Buttons ---------- */
.ai-feedback-reasons {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.ai-feedback-reason-btn {
    background: var(--ai-brand-light);
    color: var(--ai-brand-dark);
    border: 1px solid transparent;
    border-radius: var(--ai-radius-md);
    padding: 10px 12px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all var(--ai-speed-fast);
}

    .ai-feedback-reason-btn:hover {
        background: #e0e7ff;
    }

    .ai-feedback-reason-btn.selected {
        background: #dbe4ff;
        border-color: var(--ai-brand);
    }

/* ---------- Extra Comments ---------- */
.ai-feedback-extra {
    margin-top: 10px;
}

    .ai-feedback-extra.hidden {
        display: none;
    }

.ai-feedback-extra-label {
    display: block;
    font-size: var(--ai-font-sm);
    color: var(--ai-muted);
    margin-bottom: 6px;
}

.ai-feedback-extra-input {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    padding: 8px;
    border: 1px solid var(--ai-border);
    border-radius: var(--ai-radius-sm);
    font-size: var(--ai-font-md);
}

    .ai-feedback-extra-input:focus {
        border-color: var(--ai-brand);
        outline: none;
        box-shadow: 0 0 0 3px rgba(63, 81, 181, 0.15);
    }

/* ---------- Actions ---------- */
.ai-feedback-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.ai-feedback-cancel,
.ai-feedback-submit {
    border-radius: var(--ai-radius-sm);
    padding: 9px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: var(--ai-font-md);
}

.ai-feedback-cancel {
    background: #fff;
    border: 1px solid var(--ai-border);
}

    .ai-feedback-cancel:hover {
        background: #f9fafb;
    }

.ai-feedback-submit {
    background: var(--ai-brand);
    color: #fff;
    border: 1px solid var(--ai-brand);
}

    .ai-feedback-submit:hover {
        background: var(--ai-brand-dark);
    }

    .ai-feedback-submit:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* ---------- Quick Feedback Bar ---------- */
.ai-feedback-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ai-feedback-label {
    font-size: var(--ai-font-md);
    color: var(--ai-muted);
}

.ai-feedback-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--ai-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    cursor: pointer;
    transition: transform var(--ai-speed-fast);
}

    .ai-feedback-btn:hover {
        transform: scale(1.1);
        border-color: var(--ai-brand);
    }

    .ai-feedback-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* ---------- Voice Indicator ---------- */
.ai-voice-indicator {
    position: absolute;
    right: 80px;
    top: -22px;
    background: #fae3a3;
    color: #7a5b00;
    border: 1px solid #f3c861;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    display: none;
}

/* ---------- Animations ---------- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(15px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Make sure the main dialog can host an absolute child */
#aiDialog {
    position: relative;
    
}

/* Slide-out panel */
.ai-feedback-sheet {
    position: absolute;
    top: 0;
    right: 0;
    width: min(360px, 90vw);
    height: 100%;
    transform: translateX(100%); /* hidden by default */
    transition: transform 250ms ease;
    z-index: 9999; /* above dialog contents */
}

    .ai-feedback-sheet.open {
        transform: translateX(0);
    }

.ai-feedback-sheet__inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    background: #fff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -8px 0 24px rgba(0,0,0,.08);
    padding: 16px;
}

.ai-feedback-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.ai-feedback-close {
    font-size: 22px;
    line-height: 1;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Reasons grid/buttons */
.ai-feedback-reasons {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.ai-feedback-reason-btn {
    padding: 10px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
}

    .ai-feedback-reason-btn.selected {
        border-color: #0a66ff;
        background: #eef3ff;
        color: #0a66ff;
    }

.ai-feedback-extra.hidden {
    display: none;
}

.ai-feedback-actions {
    margin-top: auto;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

    .ai-feedback-actions .ai-feedback-submit {
        background: #0a66ff;
        color: #fff;
        border: 0;
        border-radius: 8px;
        padding: 10px 14px;
    }

    .ai-feedback-actions .ai-feedback-cancel {
        background: #f3f4f6;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        padding: 10px 14px;
    }

/* Quick bar: make selected thumb blue and “locked” */
.ai-feedback-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.ai-feedback-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #374151; /* normal icon color */
    cursor: pointer;
}

    .ai-feedback-btn.selected {
        color: #0a66ff; /* turns SVG blue via currentColor */
        border-color: #0a66ff;
        background: #eef3ff;
    }

    .ai-feedback-btn.locked {
        pointer-events: none;
    }
/* prevent double clicks */
.ai-feedback-label {
    color: #4b5563;
    font-size: 0.9rem;
}

/* The grid item must be allowed to shrink normally */

#root {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

* {
  font-family: Roboto, "Segoe UI", "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.funds-fade-in {
  animation-duration: .5s;
  animation-name: fade-in;
}

@keyframes fade-in {
  0% {
    opacity: 0%
  }

  100% {
    opacity: 100%
  }
}

.ai-search-form-modal {
  border: none;
  border-radius: 24px;
  /*max-width: 800px;*/
  margin: 0 auto;
  /*width: clamp(400px, 700px, 700px);*/
  top: 8vh;
  /* devices that don't support dvh fallback */
  top: 15dvh;
  background-color: transparent;
  padding: 0px;
  align-self: start;
}

.ai-search-form-modal::backdrop {
  background-color: rgb(200 200 200 / 50%);
  backdrop-filter: blur(1px);
}

.ai-search-form-modal[open] {
  display: flex;
  gap: 1rem;
  overflow: visible;
  box-shadow: 0px 0px 50px 30px hsla(197, 35%, 71%, 0.7);
}

.ai-search-form-modal:has(.follow-up-modal) .ai-search-form-container {
  /* opacity: .5; */
}

@media(max-width:900px) {
  .ai-search-form-modal {
    top: 6dvh;
  }
}

form:has(.ai-searchbox) {
  /*width: 100%;*/
}

.ai-search-form-container {
  display: flex;
  flex-direction: column;
  border-width: 2px;
  border-style: solid;
  border-color: #ffffff;
  border-radius: 24px;
  max-width: 800px;
  margin: 0 auto;
  width: clamp(400px, 700px, 700px);
  overflow-x: hidden;
  top: 30px;
  background-color: #ffffff;
  /*padding: 1rem;*/
  box-shadow: 0 2px 0px hsla(0, 0%, 73%, 0.5);
}

.ai-search-form-container::backdrop {
  background-color: rgba(0, 0, 0, 0.33);
}

.ai-search-form-container[open] {}

form:has(.ai-searchbox) {
  /*width: 100%;*/
}

.ai-search-form-wrap {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr auto;
  background-color: rgba(187, 220, 241, 1);
  padding: 1rem;
}

.follow-up-content .ai-search-form-wrap {
  padding: 0px;
  margin-left: 1rem;
  margin-top: 2rem;
  background: transparent;
}

.ai-search-form {
  display: flex;
  flex-direction: column;
}

.ai-searchbox {
  flex: 1;
  --search-form-font-size: 1.125rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  white-space: nowrap;
  font-size: var(--search-form-font-size);
  padding-top: 0.25em;
  padding-right: 1em;
  padding-bottom: 0.25em;
  padding-left: 2em;
  border-radius: 8px;
  background-color: hsl(225 95% 93% / 1);
  background-color: #fff;
  color: #031f73;
  /*background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M61.0007 28.9366C61.6407 28.9366 61.963 28.5618 62.1253 27.9721C63.7847 19.0258 63.6796 18.8109 73.0007 17.0441C73.6407 16.9366 74.0179 16.5641 74.0179 15.9195C74.0179 15.2772 73.643 14.9023 72.9985 14.7949C63.7322 12.9206 63.9996 12.7058 62.1253 3.86463C61.9653 3.2772 61.643 2.90234 61.0007 2.90234C60.3585 2.90234 60.0362 3.2772 59.8739 3.86463C57.9996 12.7058 58.3196 12.9183 49.0007 14.7949C48.411 14.9001 47.9813 15.2749 47.9813 15.9195C47.9813 16.5618 48.411 16.9366 48.9985 17.0441C58.3219 18.9183 58.2145 19.0258 59.8739 27.9721C60.0339 28.5618 60.3585 28.9366 61.0007 28.9366ZM35.0716 65.7938C36.0887 65.7938 36.7859 65.1515 36.8933 64.1869C38.8202 49.8829 39.3025 49.8829 54.0887 47.0441C55.0533 46.8841 55.7505 46.2395 55.7505 45.2223C55.7505 44.2578 55.0533 43.5629 54.0887 43.4006C39.3025 41.3663 38.7676 40.8841 36.8933 26.3126C36.7859 25.3481 36.0887 24.6509 35.0716 24.6509C34.107 24.6509 33.4099 25.3481 33.3025 26.3652C31.5356 40.7218 30.7859 40.6692 16.107 43.4006C15.1425 43.6155 14.4453 44.2578 14.4453 45.2223C14.4453 46.2943 15.1425 46.8841 16.3196 47.0441C30.8933 49.4006 31.5356 49.7755 33.3025 64.0795C33.4099 65.1515 34.107 65.7938 35.0716 65.7938ZM71.3916 125.099C72.7859 125.099 73.803 124.079 74.0705 122.633C77.8739 93.2772 81.9996 88.8292 111.035 85.6155C112.534 85.4555 113.554 84.3309 113.554 82.9366C113.554 81.5423 112.534 80.4726 111.035 80.2578C81.9996 77.0441 77.8739 72.5983 74.0705 43.2406C73.803 41.7938 72.7859 40.8292 71.3916 40.8292C69.9973 40.8292 68.9825 41.7938 68.7676 43.2406C64.9642 72.5983 60.7859 77.0441 31.803 80.2578C30.2487 80.4726 29.2316 81.5446 29.2316 82.9366C29.2316 84.3309 30.2487 85.4555 31.803 85.6155C60.731 89.4189 64.7493 93.3298 68.7676 122.633C68.9825 124.079 69.9996 125.099 71.3916 125.099Z' fill='%23fecb00'/%3E%3C/svg%3E");*/
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M104 72C104.01 73.6309 103.514 75.2249 102.581 76.5626C101.648 77.9003 100.324 78.916 98.7898 79.47L72.9998 89L63.4998 114.81C62.9372 116.338 61.9194 117.657 60.5836 118.589C59.2478 119.521 57.6584 120.02 56.0298 120.02C54.4012 120.02 52.8118 119.521 51.476 118.589C50.1402 117.657 49.1224 116.338 48.5598 114.81L38.9998 89L13.1898 79.5C11.6615 78.9374 10.3425 77.9196 9.41075 76.5838C8.47904 75.248 7.97949 73.6586 7.97949 72.03C7.97949 70.4014 8.47904 68.812 9.41075 67.4762C10.3425 66.1404 11.6615 65.1226 13.1898 64.56L38.9998 55L48.4998 29.19C49.0624 27.6616 50.0802 26.3426 51.416 25.4109C52.7518 24.4792 54.3412 23.9797 55.9698 23.9797C57.5984 23.9797 59.1878 24.4792 60.5236 25.4109C61.8594 26.3426 62.8772 27.6616 63.4398 29.19L72.9998 55L98.8098 64.5C100.345 65.059 101.669 66.0807 102.598 67.4241C103.528 68.7675 104.018 70.3664 104 72ZM75.9998 24H83.9998V32C83.9998 33.0609 84.4212 34.0783 85.1714 34.8284C85.9215 35.5786 86.939 36 87.9998 36C89.0607 36 90.0781 35.5786 90.8282 34.8284C91.5784 34.0783 91.9998 33.0609 91.9998 32V24H99.9998C101.061 24 102.078 23.5786 102.828 22.8284C103.578 22.0783 104 21.0609 104 20C104 18.9391 103.578 17.9217 102.828 17.1716C102.078 16.4214 101.061 16 99.9998 16H91.9998V8C91.9998 6.93913 91.5784 5.92172 90.8282 5.17157C90.0781 4.42143 89.0607 4 87.9998 4C86.939 4 85.9215 4.42143 85.1714 5.17157C84.4212 5.92172 83.9998 6.93913 83.9998 8V16H75.9998C74.939 16 73.9215 16.4214 73.1714 17.1716C72.4212 17.9217 71.9998 18.9391 71.9998 20C71.9998 21.0609 72.4212 22.0783 73.1714 22.8284C73.9215 23.5786 74.939 24 75.9998 24ZM120 40H116V36C116 34.9391 115.578 33.9217 114.828 33.1716C114.078 32.4214 113.061 32 112 32C110.939 32 109.922 32.4214 109.171 33.1716C108.421 33.9217 108 34.9391 108 36V40H104C102.939 40 101.922 40.4214 101.171 41.1716C100.421 41.9217 99.9998 42.9391 99.9998 44C99.9998 45.0609 100.421 46.0783 101.171 46.8284C101.922 47.5786 102.939 48 104 48H108V52C108 53.0609 108.421 54.0783 109.171 54.8284C109.922 55.5786 110.939 56 112 56C113.061 56 114.078 55.5786 114.828 54.8284C115.578 54.0783 116 53.0609 116 52V48H120C121.061 48 122.078 47.5786 122.828 46.8284C123.578 46.0783 124 45.0609 124 44C124 42.9391 123.578 41.9217 122.828 41.1716C122.078 40.4214 121.061 40 120 40Z' fill='%23031F73'/%3E%3C/svg%3E");
  background-position-x: 0.5rem;
  background-position-y: center;
  background-size: calc(var(--search-form-font-size) / 0.75);
  background-repeat: no-repeat;
  transition: all 200ms ease-in-out;
  border-width: 1px;
  border-style: solid;
  border-color: #bbb;
}

.ai-search-form .ai-searchbox {
  border-bottom: 4px solid rgba(119, 119, 119, 0.35) !important;
  font-weight: 400;
  background-image: none;
  padding-left: 1rem;
  transition: all .2s ease-in-out;
  outline-width: 2px;
  outline-style: solid;
  outline-color: transparent;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(100, 100, 100, 33%);
}

.ai-search-form .ai-searchbox:hover {
  background-color: #eff9ff;
  outline-color: rgba(119, 119, 119, 0.35);
}

.ai-search-form .ai-searchbox:focus-visible {
  outline-color: #031f73;
}

.demo-funds-top-nav .ai-searchbox {
  --search-form-font-size: 0.875rem;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  padding-left: 2.5em;
  background-position-x: 0.5rem;
  background-size: 1.5rem;
  color: #666666;
  cursor: text;
}

/* Select Your Fund Buttons START */
.ai-select-fund-header {
  display: block !important;
  margin-bottom: 0.5rem !important;
}

.ai-select-fund-button-container:has(button) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  grid-auto-rows: 1fr;
  gap: 0.5rem;
  max-width: 800px;
}

/*
.ai-select-fund-message ul:has(button) {
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 0;
  margin: 0;
  max-width: 800px;
}
*/

/*
.ai-select-fund-message ul li:has(button) {
  list-style: none;
  padding: 0;
  margin: 0;
}
*/

.ai-select-fund-button-container button {
  align-items: center;
  background-color: rgba(255, 255, 255, 1);
  border: 2px solid rgba(3, 31, 115, 1);
  border-radius: .5rem;
  color: rgba(3, 31, 115, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  width: 100%;
  transition: all .2s ease-in-out;
  position: relative;
  z-index: 2;
  padding: 3px;
  cursor: pointer;
}

.ai-select-fund-button-container button p {
  font-weight: 700;
}

/*
.ai-select-fund-message ul li button {
  align-items: center;
  background-color: rgba(255, 255, 255, 1);
  border: 3px solid rgba(3, 31, 115, 1);
  color: rgba(3, 31, 115, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  width: 100%;
  transition: all .2s ease-in-out;
  position: relative;
  z-index: 2;
}
*/

.ai-select-fund-button-container button.gny {
  color: rgba(110, 40, 62, 1);
  border-color: rgba(110, 40, 62, 1);
}

/*
.ai-select-fund-message ul li button.gny {
  color: rgba(110, 40, 62, 1);
  border-color: rgba(110, 40, 62, 1);
}
*/

.ai-select-fund-button-container button.homecare {
  color: rgba(85, 118, 48, 1);
  border-color: rgba(85, 118, 48, 1);
}

/*
.ai-select-fund-message ul li button.homecare {
  color: rgba(85, 118, 48, 1);
  border-color: rgba(85, 118, 48, 1);
}
*/

.ai-select-fund-button-container button.gnj {
  color: rgba(110, 40, 62, 1);
  border-color: transparent;
  background-color: transparent;
}

/*
.ai-select-fund-message ul li button.gnj {
  color: rgba(110, 40, 62, 1);
}
*/

.ai-select-fund-button-container button.rochester {
  border-color: transparent;
  background-color: transparent;
}

.ai-select-fund-button-container button.lpn {
  color: rgba(79, 45, 127, 1);
  border-color: transparent;
  background-color: transparent;
}

/*
.ai-select-fund-message ul li button.lpn {
  color: rgba(79, 45, 127, 1);
}
*/

@media(max-width:900px) {
  .ai-select-fund-button-container:has(button) {
    grid-template-columns: repeat(2, 1fr);
  }
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button:hover {
  color: rgba(255, 255, 255, 1);
  background-color: rgba(3, 31, 115, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.gny:hover {
  background-color: rgba(110, 40, 62, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.homecare:hover {
  background-color: rgba(85, 118, 48, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.gnj:hover {
  background-color: rgba(110, 40, 62, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.lpn:hover {
  background-color: rgba(79, 45, 127, 1);
}

.ai-select-fund-message .ai-select-fund-button-container button p,
.ai-select-fund-message .ai-select-fund-button-container button span {
  font-size: .85rem;
  margin: 0;
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button {
  cursor: unset;
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button:not(.selected) {
  /*background: #eee;*/
  /*color: #999;*/
  background-color: transparent;
  opacity: 0.33;
  filter: grayscale(0.33);
  pointer-events: none;
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button.selected {
  color: #e1e1e1;
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button.nbf.selected,
.ai-select-fund-message.disabled .ai-select-fund-button-container button.rochester.selected {
  background: rgba(3, 31, 115, 1);
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button.gnj.selected,
.ai-select-fund-message.disabled .ai-select-fund-button-container button.gny.selected {
  background: rgba(110, 40, 62, 1);
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button.homecare.selected {
  background: rgba(85, 118, 48, 1);
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button.lpn.selected {
  background: rgba(79, 45, 127, 1);
}

/* Select Your Fund Buttons END */

.ai-response {
  padding: 1rem;
  /*background-color: rgba(0,0,0,0.33);*/
  background-color: #f4f6fb;
  color: #333333;
  font-size: 1.25rem;
  line-height: 1.5;
  border-radius: 1rem;
  /*max-width: 1000px;*/
  margin-inline: auto;
  margin-top: 1rem;
}

.ai-response ul:has(button) {
  display: flex;
  gap: .5rem;
  padding: 0;
  margin: 0;
}

.ai-response ul li:has(button) {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ai-response ul li button {
  border: 1px solid #333333;
}

.ai-response ul li button:hover {
  box-shadow: 0px 0px 3px 0px #999999;
}

.funds-ai-modal {
  border: none;
  border-radius: 1rem;
}

.funds-ai-modal::backdrop {
  backdrop-filter: blur(0.5rem) !important;
  background-color: rgba(0, 0, 0, 0.33) !important;
}

.funds-ai-modal-trigger {
  --search-widget-font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  white-space: nowrap;
  font-size: var(--search-widget-font-size);
  padding-top: 0.5em;
  padding-right: 1em;
  padding-bottom: 0.5em;
  padding-left: 1em;
  border-radius: 100px;
  background-color: hsl(225 95% 93% / 1);
  background-color: #fff;
  color: #031f73;
  background-repeat: no-repeat;
  transition: all 200ms ease-in-out;
  cursor: pointer;
  position: relative;
  border: none;
}

.funds-ai-modal-trigger:hover {
  box-shadow: 0px 0.25em #fecb00;
  background-color: hsl(225 95% 93% / 1);
}

.funds-ai-modal-trigger::before {
  display: block;
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M61.0007 28.9366C61.6407 28.9366 61.963 28.5618 62.1253 27.9721C63.7847 19.0258 63.6796 18.8109 73.0007 17.0441C73.6407 16.9366 74.0179 16.5641 74.0179 15.9195C74.0179 15.2772 73.643 14.9023 72.9985 14.7949C63.7322 12.9206 63.9996 12.7058 62.1253 3.86463C61.9653 3.2772 61.643 2.90234 61.0007 2.90234C60.3585 2.90234 60.0362 3.2772 59.8739 0.86463C57.9996 12.7058 58.3196 12.9183 49.0007 14.7949C48.411 14.9001 47.9813 15.2749 47.9813 15.9195C47.9813 16.5618 48.411 16.9366 48.9985 17.0441C58.3219 18.9183 58.2145 19.0258 59.8739 27.9721C60.0339 28.5618 60.3585 28.9366 61.0007 28.9366ZM35.0716 65.7938C36.0887 65.7938 36.7859 65.1515 36.8933 64.1869C38.8202 49.8829 39.3025 49.8829 54.0887 47.0441C55.0533 46.8841 55.7505 46.2395 55.7505 45.2223C55.7505 44.2578 55.0533 43.5629 54.0887 43.4006C39.3025 41.3663 38.7676 40.8841 36.8933 26.3126C36.7859 25.3481 36.0887 24.6509 35.0716 24.6509C34.107 24.6509 33.4099 25.3481 33.3025 26.3652C31.5356 40.7218 30.7859 40.6692 16.107 43.4006C15.1425 43.6155 14.4453 44.2578 14.4453 45.2223C14.4453 46.2943 15.1425 46.8841 16.3196 47.0441C30.8933 49.4006 31.5356 49.7755 33.3025 64.0795C33.4099 65.1515 34.107 65.7938 35.0716 65.7938ZM71.3916 125.099C72.7859 125.099 73.803 124.079 74.0705 122.633C77.8739 93.2772 81.9996 88.8292 111.035 85.6155C112.534 85.4555 113.554 84.3309 113.554 82.9366C113.554 81.5423 112.534 80.4726 111.035 80.2578C81.9996 77.0441 77.8739 72.5983 74.0705 43.2406C73.803 41.7938 72.7859 40.8292 71.3916 40.8292C69.9973 40.8292 68.9825 41.7938 68.7676 43.2406C64.9642 72.5983 60.7859 77.0441 31.803 80.2578C30.2487 80.4726 29.2316 81.5446 29.2316 82.9366C29.2316 84.3309 30.2487 85.4555 31.803 85.6155C60.731 89.4189 64.7493 93.3298 68.7676 122.633C68.9825 124.079 69.9996 125.099 71.3916 125.099Z' fill='%23fecb00'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  width: 1em;
  aspect-ratio: 1;
}

.funds-ai-modal-trigger::after {
  display: block;
  content: '';
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M20 108L50 78M112 52C112 56.7276 111.069 61.4089 109.26 65.7766C107.45 70.1443 104.799 74.1129 101.456 77.4558C98.1129 80.7988 94.1443 83.4505 89.7766 85.2597C85.4089 87.0688 80.7276 88 76 88C71.2724 88 66.5911 87.0688 62.2234 85.2597C57.8557 83.4505 53.8871 80.7988 50.5442 77.4558C47.2012 74.1129 44.5495 70.1443 42.7403 65.7766C40.9312 61.4089 40 56.7276 40 52C40 42.4522 43.7928 33.2955 50.5442 26.5442C57.2955 19.7928 66.4522 16 76 16C85.5478 16 94.7045 19.7928 101.456 26.5442C108.207 33.2955 112 42.4522 112 52Z' stroke='%23031F73' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  width: 1em;
  aspect-ratio: 1;
}

.ai-response ul {
  text-align: left;
}

.ai-response p {
  text-align: left;
  margin-top: 0px;
}

.ai-response--search-results-container {
  display: none;
  overflow-y: scroll;
  height: 400px;
  margin-top: 1rem;
  /*margin-top: 2rem;*/
  margin-left: 1rem;
  margin-right: 1rem;
}

.ai-response--search-results {
  display: grid;
  /*gap: 0.5rem;*/
}

.ai-response--search-results-header {
  text-align: left;
  padding-left: 1rem;
  color: #333333;
}

.ai-response--search-results-card {
  display: flex;
  flex-direction: column;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  overflow: hidden;
  /* background-color: #fff; */
  /* box-shadow: -1px 2px 6px 1px rgba(0, 0, 0, .25); */
  /* border: 1px solid #bbb; */
  /* border-radius: .5rem; */
  text-align: left;
  transition: all 200ms ease-in-out;
}

.ai-response--search-results-card:hover {
  background-color: #FFF6CC;
}

.ai-response--search-results-card-link {
  font-size: 0.75rem;
  color: #031f7380;
}

.ai-response--search-results-card-link {
  font-size: 0.75rem;
  color: #031f7380;
  overflow: hidden;
  white-space: nowrap;
  width: 99%;
  /* needs to be less than 100% to force the elipsis to show. */
  text-overflow: ellipsis;
}

.ai-response--search-results-card-link:hover {
  color: #031f73;
  text-decoration: underline;
}

.ai-response--search-results-card-title {
  font-size: var(--funds-font-size-md);
  margin-top: 0px;
  margin-bottom: 0.25em;
  /*color: #fecb00;*/
  color: #031f73 !important;
  line-height: 1.2;
}

.ai-response--search-results-card-title-link {
  color: inherit;
  font-weight: 400;
  font-size: 1.15rem;
}

.ai-response--search-results-card-title-link:hover {
  color: #031f73;
  text-decoration: underline;
}

.ai-response--search-results-card-snippet {
  margin-bottom: 0px;
  margin-top: 0px;
  color: #555555;
  line-height: 1.2;
  font-size: .875rem;
}

.temporary-search-results-test {
  color: black;
  text-align: center;
}

@media(max-width: 900px) {
  .ai-response--search-results-container {
    height: 35vh;
    height: 35dvh;
  }

  .ai-response--search-results-card-title {
    font-size: var(--funds-font-size-base);
  }
}

/* ChatBox START */
.ai-chatbox-container {
  background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%);
  position: relative;
}

.ai-chatbox {
  background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%);
  border-top-left-radius: 0px;
  border-top-right-radius: 0px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  max-height: 50dvh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  margin-top: 46.8px
    /* nudge the top by the height of the user's message */
}

.ai-chatbox:not(:has(.ai-message)) {
  /* align-items: center; */
  justify-content: center;
  margin-top: 0px;
}

.ai-chatbox-header {
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  position: absolute;
  padding: 1rem;
  /* height: 40px; */
  width: 100%;
  /* border: 1px solid black; */
  border-top-right-radius: 24px;
  border-top-left-radius: 24px;
  z-index: 99999;
  background: linear-gradient(to bottom, rgba(217, 235, 247, 1), 90%, rgba(255, 255, 255, 0));
}

.ai-chatbox-header svg {
  color: #031f73;
  height: 24px;
  width: 24px;
}

.ai-chatbox-header button {
  align-items: center;
  background: none;
  border: none;
  color: #999999;
  cursor: pointer;
  display: flex;
  font-size: 0.875rem;
  gap: 5px;
  height: fit-content;
  /*margin-right: 15px;*/
  padding: 0;
}

.ai-chatbox-header button span:not(.x-icon) {
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}

.ai-chatbox-header button .x-icon {
  font-weight: 400;
  font-size: 20px;
  margin-bottom: 3px;
}

/* .ai-chatbox-header:after {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255, 1) 90%);
  width: 100%;
  height: 4em;
} */

/* fade-out that doesn't fully work */
/* .ai-chatbox:after {
  content:'';
  height:15px;
  position:absolute;
  left:0;
  right: 0;
  bottom:0;
  z-index: 9999!important;
  background-image: linear-gradient(0deg,#ddd 0%,transparent);
} */

.ai-chatbox .ai-message {
  /*border-radius: 1rem;*/
  position: relative;
  text-align: start;
  text-wrap: pretty;
}

.ai-chatbox .ai-message p {
  display: inline;
  margin: 0 0 .5rem 0;
}

.ai-chatbox .ai-message p:last-of-type {
  margin-bottom: 0;
}

.ai-chatbox .ai-message.user {
  display: flex;
  justify-content: flex-end;
  margin-block-start: 1rem;
  margin-inline-start: 6rem;
  margin-block-end: 1rem;
  margin-inline-end: 1rem;
  padding: 0px;
  background-color: transparent;
  border-top-left-radius: 2rem;
  border-top-right-radius: 2rem;
}

.ai-chatbox .ai-message.user:first-child {
  padding-top: 0px;
}

.ai-chatbox .ai-message a {
  color: #031f73;
}

@media(max-width:900px) {
  .ai-chatbox {
    min-height: 20vh;
    min-height: 20dvh;
    max-height: 70dvh;
  }

  .ai-chatbox .ai-message.user {
    margin-inline-start: 3rem;
  }

  .ai-chatbox .ai-message p {
    font-size: 1rem;
  }
}

.user-message-container {
  background-color: #248bf5;
  color: #ffffff;
  padding: 0.5rem 1rem;
  border-width: 1px;
  border-style: solid;
  border-color: #ffffff;
  border-radius: 0.75rem 0.75rem 0.25rem;
}

.user-message-container p {
  margin-bottom: 0;
}

.ai-chatbox .ai-message.model {
  margin-inline-start: 1rem;
  margin-inline-end: 6rem;
  margin-block-start: 1rem;
  margin-block-end: 1rem;
  color: #000000;
  padding: 1rem;
  background-color: #edf3f8;
  background-image: linear-gradient(180deg, #FFFFFF 85.41%, #F1F1F1 100%);
  border-top-right-radius: 1rem;
  border-bottom-right-radius: 1rem;
  border-bottom-left-radius: 0.25rem;
  border-top-left-radius: 1rem;
  font-size: 1rem;
  position: relative;
  /*align-self: flex-start;*/
}

.ai-chatbox .ai-message.model::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 1.1rem 1.1rem 1.1rem .25rem;
  z-index: -1;
  background-image: linear-gradient(114.27deg, #85B44E 28.45%, rgba(3, 31, 115, 0.5) 74.71%);
}

.ai-chatbox .ai-message.model.loading::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  z-index: -1;
  background-image: linear-gradient(114.27deg, #85B44E 28.45%, rgba(3, 31, 115, 0.5) 74.71%);
}

@media(max-width:900px) {
  .ai-chatbox .ai-message.model {
    margin-inline-end: 2rem;
  }
}

.ai-chatbox .ai-message.model.ai-select-fund-message {
  background-image: none;
  background-color: transparent;
  padding: 0px;
  margin: 1rem;
}

.ai-chatbox .ai-message.model.ai-select-fund-message::after {
  content: none;
}

.ai-chatbox .ai-message.model.ai-select-fund-message .ai-select-fund-header {
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.ai-chatbox .ai-message.loading {
  font-size: 0.875rem;
  color: #333333;
  background-color: #ffffff;
  background-image: none;
  border-radius: 1rem;
  align-self: start;
  padding: 0.5rem 1.5rem;
}

.ai-system-instruction-box {
  /* flex: 1; */
  --search-form-font-size: 1.25rem;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-size: var(--search-form-font-size);
  padding-top: 1em;
  padding-right: 2em;
  padding-bottom: 1em;
  padding-left: 2em;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background-color: #333333;
  color: #f1f1f1;
  background-repeat: no-repeat;
  transition: all 200ms ease-in-out;
  border-width: 1px;
  border-style: solid;
  border-color: #bbb;
  min-height: 200px;
  max-height: 400px;
  /* this is fine*/
  resize: vertical;
}

.ai-system-instruction-box::placeholder {
  color: #999999;
}

.ai-search-form-modal:has(.follow-up-modal) .ai-chatbox-header {
  background-color: rgba(0, 0, 0, .5);
  background: none;
}

.ai-search-form-modal:has(.follow-up-modal) .ai-chatbox-header button {
  color: #000000;
}

.follow-up-modal {
  align-items: center;
  backdrop-filter: blur(3px);
  background-color: rgba(0, 0, 0, .5);
  border-radius: 24px;
  display: flex;
  height: 100%;
  justify-content: center;
  /* padding: 2rem; */
  position: absolute;
  width: 100%;
  z-index: 9999;
}

.follow-up-content {
  /* background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%); */
  border: 2px solid #ffffff;
  border-radius: 10px;
  padding: 1rem;
  width: 90%;
  position: relative;
  z-index: 1;
  background-color: hsla(203, 66%, 84%, 1);
}

.follow-up-content::before {
  content: '';
  position: absolute;
  display: block;
  top: calc(var(--funds-line-height-base) * 1.25em);
  bottom: calc(var(--funds-line-height-base) * 1.25em);
  width: 1px;
  padding-left: 1rem;
  border-left: 2px solid #ffffff;
  border-top: 2px solid #fff;
  border-bottom: 2px solid #fff;
  border-top-left-radius: 1rem;
  border-bottom-left-radius: 1rem;
  z-index: -1;
}

.ai-question-button {
  display: none;
  align-self: center;
  align-items: center;
  padding: 0.5rem 1rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 400;
  color: #999999;
  cursor: pointer;
  gap: .25rem;
  transition: all .2s ease-in-out;
  /* margin-top: 1rem; */
  /* margin-right: 1rem; */
  /* margin-left: 1rem; */
  /*position: sticky;*/
  /*bottom: 0;*/
  line-height: var(--funds-line-height-base);
}

.ai-question-button svg {
  font-size: 16px;
}

.ai-question-button.follow-up svg {
  transform: rotate(270deg)
}

.ai-question-button:hover {
  background-color: #f1f1f1;
}

.ai-system-instruction-list-container {
  padding: 1rem;
  background-color: #ffffff;
  border-radius: 24px;
  align-self: start;
}

.ai-system-instruction-list-container .ai-system-instruction-list {
  list-style-position: inside;
  margin: 0px;
  padding-left: 0px;
}

.ai-system-instruction-list-container .ai-system-instruction-list-item {
  font-size: 1rem;
  background-color: #edf3f8;
  border-radius: 0.25rem;
  padding: 0.5rem;
  line-height: 1.33;
}

.ai-system-instruction-list-container .ai-system-instruction-list-item:nth-child(even) {
  background-color: #dddddd;
}

.ai-system-instruction-list-container .ai-system-instruction-list-item+.ai-system-instruction-list-item {
  margin-top: 0.25rem;
}

.pulse1 {
  animation: pulse .5s infinite ease-in-out alternate;
}

.pulse2 {
  animation: pulse .5s infinite ease-in-out alternate;
  animation-delay: .2s;
}

.pulse3 {
  animation: pulse .5s infinite ease-in-out alternate;
  animation-delay: .4s;
}

@keyframes pulse {
  from {
    transform: scale(0.8);
  }

  to {
    transform: scale(1.7);
  }
}

@media (max-width: 700px) {
  .ai-search-form-container dialog {
    width: clamp(90vw, 95vw, 95vw);
    max-height: 80vh;
    max-height: 80dvh;
    top: 120px;
  }
}

/* ChatBox END */

.ai-message.model:not(.ai-select-fund-message):not(:has(li))>*:not(.ai-message-citation-container) {
  display: inline;
}

.ai-message.model:not(.ai-select-fund-message) li>div {
  display: flex;
}

.ai-message.model:not(.ai-select-fund-message) svg {
  cursor: pointer;
  padding-top: 0.25rem;
}

.ai-message.model:not(.ai-select-fund-message) li div,
.ai-message.model:not(.ai-select-fund-message) li div p {
  display: inline;
  font-size: 18px;
}

/* citation styles START */
.ai-message-citation-container,
.ai-search-results-container {
  /* display: block !important; */
  position: relative;
}

.ai-message-citation-container::before {
  content: '';
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to left, #ffffff 1%, transparent 10%);
  z-index: 1;
  pointer-events: none;
}

.ai-search-results-container::before {
  content: '';
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(to top left, rgb(255 255 255) 1%, rgba(255, 255, 255, 0) 5%),
    linear-gradient(to bottom left, rgb(255 255 255) 1%, rgb(255 255 255 / 0%) 5%),
    linear-gradient(to left, rgb(255 255 255) 3%, rgba(255, 255, 255, 0) 10%),
    linear-gradient(to left, rgb(252 252 252) 1%, rgb(255 255 255 / 0%) 5%);
  z-index: 1;
  pointer-events: none;
}


.ai-message-citations,
.ai-search-results {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.5rem;
  flex-wrap: nowrap;
  margin-top: 1rem;
  margin-bottom: .5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-right: 1rem;
  width: 100%;
  transition: all 0.3s ease-in-out;
  transition-behavior: allow-discrete;
}

.ai-search-results .ai-message-citation {
  height: auto;
}

.ai-message-citations::-webkit-scrollbar,
.ai-search-results::-webkit-scrollbar {
  display: none !important;
}

.ai-search-results {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.ai-search-results {
  display: flex !important;
  gap: .5rem;
}

.ai-message-citations.active {
  display: flex !important;
  opacity: 1;
  visibility: visible;
}

.ai-message-citation,
.ai-source-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #ffffff;
  padding: .5rem .65rem;
  border-radius: 0.5rem;
  border-width: 1px;
  border-style: solid;
  border-color: #bbbbbb;
  position: relative;
  box-sizing: border-box;
  /*height: fit-content;*/
  min-height: 100%;
  max-width: 200px;
  min-width: 200px;
}

.ai-message-citation,
.ai-message-citation * {
  color: #333333;
  text-decoration: none;
}

.ai-message-citation .ai-message-citation-link,
.ai-source-card .ai-card__item-url {
  font-size: 0.75rem !important;
  color: #031f7380;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.ai-message-citation .ai-message-citation-title,
.ai-source-card .ai-card__item-title {
  margin-top: 0px;
  margin-bottom: 0.25em;
  font-size: 0.75rem;
  overflow: hidden;
  text-overflow: ellipsis;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
}

.ai-message-citation .ai-message-citation-text {
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  display: -webkit-box;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.75rem;
  text-decoration: none !important;
  line-height: 1rem;
}

.ai-message-citation .ai-message-citation-link-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

.ai-message-citation-toggle {
  background-color: #afd0ff;
  border-radius: 50%;
  margin: 0 .25rem;
  padding: 0 .15rem;
  transition: all .15s ease-in-out;
}

.ai-message-citation-toggle:hover {
  background-color: #94afdc;
}

/* citation styles END */

.ai-previous-question {
  align-items: center;
  background-color: rgb(36, 139, 245);
  border: 1px solid #ffffff;
  border-radius: 10px;
  color: #ffffff;
  display: flex;
  gap: .25rem;
  padding: 0px 0.5rem;
}

.ai-previous-question svg {
  color: #999999;
  font-size: 1.5rem;
}

.ai-previous-question p {
  margin: 0;
}

.follow-up-modal .ai-previous-question {
  padding: .5rem 1rem;
  margin-left: 1rem;
  width: fit-content;
}

/* table styles START */
.ai-chatbox .ai-message.model:has(div > table) {
  padding-left: 1rem;
  padding-right: 1rem;
}

.funds-disclaimer {
  margin-block-start: 1rem;
  margin-block-end: 1rem;
  padding: 0 8rem;
  font-size: .75rem;
  color: #777;
  text-wrap: pretty;
  margin-top: 50px !important;
  line-height: 1.2;
}

.ai-chatbox:has(.ai-message) .funds-disclaimer {
  display: none;
}

@media(max-width:900px) {
  .funds-disclaimer {
    padding: 0 2rem;
  }
}

.ai-message div:has(> table) {
  /*padding: 1rem;*/
  border-radius: .75rem;
  display: block !important;
  overflow-x: auto;
}

.ai-message table {
  --table-border-color: #bbbbbb;
  --table-bg-color: #ffffff;
  background-color: var(--table-bg-color);
  margin: 0px !important;
  line-height: 1.33;
}

.ai-message table * {
  font-size: 0.875rem;
}

.ai-message table thead {
  white-space: nowrap;
}

.ai-message table thead tr {}

.ai-message table thead tr th {
  padding: 0.5rem 1rem;
}

.ai-message table thead tr td {
  /*text-align: center;*/
  border: none !important;
}

.ai-message table thead tr td * {
  margin: 0px;
  padding: 0px;
}

.ai-message table tbody {}

.ai-message table tbody tr {}

.ai-message table tbody tr td {
  padding: 0.5rem 1rem;
}

@media(max-width:900px) {
  .ai-message div:has(> table) {
    padding: 0px !important;
    overflow-x: auto;
  }

  .ai-message table {
    display: block;
    border: none !important;
    background-color: transparent;
  }

  .ai-message table thead {
    display: none;
  }

  .ai-message table tbody {
    display: block !important;
    /*margin: 1rem !important;*/
  }

  .ai-message table tr {
    display: block !important;
    padding: 1rem !important;
    background-color: #ffffff;
    border: 1px solid #bbbbbb !important;
    border-radius: 8px;
    font-size: 1rem;
  }

  .ai-message table tr+tr {
    margin-top: 1rem !important;
  }

  .ai-message table tr td {
    width: 100% !important;
    display: block !important;
    text-align: left !important;
    padding: 0px !important;
    font-size: 1rem;
    line-height: 1.2em;
    border: none;
  }

  .ai-message table tbody tr td+td {
    margin-top: 0.5rem !important;
  }

  .ai-message table tbody tr td:nth-child(1)::before {
    content: '';
    display: inline;
  }

  .ai-message table tbody tr td:nth-child(2)::before {
    content: '';
    display: inline;
  }

  .ai-message table tbody tr td:nth-child(3)::before {
    content: '';
    display: block !important;
    white-space: pre-wrap;
    margin-bottom: 0.5em;
    line-height: 1.25em;
    margin: -0.5em -0.5em 0.5em -0.5em;
    padding: 0.5em;
    background-color: #dddddd;
    text-align: center;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
  }

  .ai-message table tbody tr td:nth-child(3)::first-line {
    font-weight: 700 !important;
  }

  .ai-message table tbody tr td:nth-child(3) {
    display: block !important;
    line-height: 1.5em;
    padding: 0.5em !important;
    background-color: #f1f1f1;
    border-radius: 4px;
    font-size: 0.875rem;
  }

  .ai-message table tr td p {
    font-size: 0.875rem;
    line-height: 1.5em;
  }

  .ai-message table tr td p strong,
  .ai-message table tr td strong {
    display: block !important;
  }

  .ai-message table tr td div a {
    width: 100%;
    text-align: center;
  }
}

@media(min-width:901px) {
  .ai-message table {
    font-size: 1rem;
    text-align: left;
    border-collapse: separate;
    border-spacing: 0px 0px;
    border-width: 1px;
    border-style: solid;
    border-color: var(--table-border-color);
    border-radius: 1rem;
    /*white-space: nowrap;*/
  }

  .ai-message table tbody tr td {
    border-top-width: 1px;
    border-top-style: solid;
    border-top-color: var(--table-border-color);
  }
}

/* table styles END */

/* voice prompt styles START */
.ai-voice-prompt-container {}

button.ai-voice-prompt-button {}

.ai-voice-prompt-button {
  --active-color: #fecb00;
  /*--active-color: #fa304c;*/
  /*--active-color: #85b44e;*/
  background-color: #ffffff;
  border-top: 0px;
  border-right: 0px;
  border-bottom: 4px solid rgba(119, 119, 119, 0.35) !important;
  border-left: 0px;
  padding-top: 0.25em;
  padding-right: 0.5rem;
  padding-bottom: 0.25em;
  padding-left: 0.5rem;
  border-radius: 0.5rem;
  /*aspect-ratio: 1;*/
  font-size: var(--search-form-font-size);
  line-height: 1.5;
  border-width: 1px;
  border-style: solid;
  border-color: rgb(100, 100, 100, 33%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 200ms ease-in-out;
  position: relative;
  /*min-width: 100px;*/
}

.ai-search-form-wrap:has(.ai-previous-question) .ai-voice-prompt-button {
  align-self: end;
}

.ai-voice-prompt-button:hover:not(.active) {
  background-color: #ffedba;
}

.ai-voice-prompt-button.active {
  background-color: var(--active-color);
}

.ai-voice-prompt-button-icon {
  color: rgba(85, 85, 85, 1);
  font-size: 1.5rem;
  line-height: 0;
  position: relative;
  z-index: 1;
}

.ai-voice-prompt-button-label {
  color: #031f73;
  font-size: 0.875rem;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.ai-voice-prompt-button-recording-animation {
  line-height: 0;
  position: relative;
  z-index: 1;
}

@media(min-width:431px) {
  .ai-chatbox {
    scrollbar-width: none;
    /* hides scrollbar visually on desktop, but keeps functionality */
  }
}

.ripple {
  outline-width: 0.5rem;
  outline-style: solid;
  outline-color: var(--active-color);
  border-radius: 0.5rem;
  position: absolute;
  top: 0px;
  left: 0px;
  bottom: 0px;
  right: 0px;
  animation: ripple infinite 2s;
}

@-webkit-keyframes ripple {
  0% {
    transform: scale(1);
    opacity: 1;
  }

  100% {
    transform: scale(1.25);
    opacity: 0;
  }
}

/* voice prompt styles END */





/* fallback animation for loading dots */
.model.ai-message.loading {
  display: flex;
  gap: .25rem;
  padding: .5rem 1rem;
}

.pulse1,
.pulse2,
.pulse3 {
  animation: pulse 1.2s infinite;
  display: inline-block;
}

.pulse2 {
  animation-delay: .2s;
}

.pulse3 {
  animation-delay: .4s;
}

@keyframes pulse {

  0%,
  80%,
  100% {
    opacity: .2
  }

  40% {
    opacity: 1
  }
}

/* --- Disclaimer look to match screenshot --- */
.ai-message.model.disclaimer .ai-message-bubble {
  background: transparent;
  /* keep the panel's gradient behind it */
  box-shadow: none;
}

.ai-answer-warning {
  font-style: italic;
  line-height: 1.55;
  color: #6B7280;
  /* subtle gray */
  font-size: 18px !important;
  /* scales up on large screens */
  max-width: 760px;
  /* centered block like the screenshot */
  margin: 120px auto;
  /* vertical breathing room */
  text-align: left;
  padding: 0 8px;
}

/* --- Mic button styling to match the rounded square icon on the right --- */
.ai-voice-prompt-container {
  display: flex;
  align-items: center;
  margin-left: 0px;
  /* space between input and mic button */
}

.ai-voice-prompt-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 8px !important;
  /* rounded-square */
  border: 1px solid #D6DBE1;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 10px 22px rgba(0, 0, 0, .10);
  cursor: pointer;
  transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

.ai-voice-prompt-button:hover {
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 14px 30px rgba(0, 0, 0, .12);
  border-color: #C7CED6;
}

.ai-voice-prompt-button:active {
  transform: translateY(1px);
}

.ai-voice-prompt-button-icon {
  width: 1rem;
  height: 1rem;
  display: block;
}

/* When recording, give a visual cue (your JS adds/removes .active) */
.ai-voice-prompt-button.active {
  border-color: #3B82F6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .15), 0 12px 28px rgba(59, 130, 246, .22);
}

/* FINAL disclaimer override (small + subtle + centered) */
html body .ai-search-form-modal .ai-chatbox-container .ai-message.model.disclaimer .ai-message-bubble p.ai-answer-warning {
  font-size: 18px !important;
  /* small like the screenshot */
  line-height: 1.5 !important;
  color: #6b7280 !important;
  /* subtle gray */
  font-style: italic !important;
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  max-width: 720px !important;
  /* narrow column */
  margin: 110px auto 0 !important;
  /* centered with top space */
  padding: 0 8px !important;
  text-align: left !important;
  /* prevent any parent scaling tricks */
  transform: none !important;
}

html body .ai-search-form-modal .ai-chatbox-container .ai-message.model.disclaimer .ai-message-bubble {
  background: transparent !important;
  box-shadow: none !important;
}

/* Ensure star is visible above header contents */
.ai-chatbox-container {
  position: relative;
}

.ai-chatbox-badge {
  position: absolute;
  top: 18px;
  left: 22px;
  z-index: 10;
  /* higher than header */
  pointer-events: none;
}

.ai-chatbox-badge-icon {
  width: 28px;
  height: 28px;
  color: navy;
  opacity: .9;
  /*filter: drop-shadow(0 1px 0 rgba(255,255,255,.7));*/
}

/* Safety: keep fund pill hidden by default; JS will unhide when a fund exists */
.ai-chatbox-header #fund-pill[hidden] {
  display: none !important;
}

#aiInput.ai-searchbox {
  border-radius: 0.5rem !important;
  border-bottom: 4px solid rgba(100, 100, 100, 0.33) !important;
}
/* =========================================================
   FEEDBACK POPUP: header/footer always visible, body scrolls
   ========================================================= */

/* Make the sheet a real fixed-height container with NO outer scrolling */
#aiFeedbackSheet.ai-feedback-sheet-centered {
    width: min(520px, 92vw);
    max-height: min(78vh, 560px);
    height: auto;
    overflow: hidden !important; /* prevent outer scrollbar */
    border-radius: 16px;
}

/* Inner becomes a 3-row layout: header | body | footer */
#aiFeedbackSheet .ai-feedback-sheet__inner {
    height: 100%;
    max-height: min(78vh, 560px);
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
}

/* Header stays fixed */
#aiFeedbackSheet .ai-feedback-sheet__header {
    flex: 0 0 auto;
}

/* ✅ ONLY this section scrolls when content is tall */
#aiFeedbackSheet .ai-feedback-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 16px;
    -webkit-overflow-scrolling: touch;
    min-height: 0; /* IMPORTANT for flex scroll containers */
}

/* Footer stays visible */
#aiFeedbackSheet .ai-feedback-actions {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    background: #fff;
    z-index: 10;
    border-top: 1px solid #eee;
    padding: 12px 16px;
}

/* Keep the reasons nicely spaced inside the body */
#aiFeedbackSheet .ai-feedback-reasons {
    display: grid;
    gap: 8px;
    margin: 0;
}

/* Make textarea behave nicely without causing layout jump */
#aiFeedbackSheet .ai-feedback-extra {
    margin-top: 12px;
}

#aiFeedbackSheet .ai-feedback-extra-input {
    width: 100%;
    min-height: 96px;
    max-height: 220px;
    resize: vertical;
    box-sizing: border-box;
}

/* Small screens: use a bit more vertical space */
@media (max-width: 480px) {
    #aiFeedbackSheet.ai-feedback-sheet-centered {
        max-height: 86vh;
    }

    #aiFeedbackSheet .ai-feedback-sheet__inner {
        max-height: 86vh;
    }
}
/*new css*/
#root {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

* {
    font-family: Roboto, "Segoe UI", "Helvetica Neue", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.funds-fade-in {
    animation-duration: .5s;
    animation-name: fade-in;
}

@keyframes fade-in {
    0% {
        opacity: 0%
    }

    100% {
        opacity: 100%
    }
}

.ai-search-form-modal {
    border: none;
    border-radius: 24px;
    /*max-width: 800px;*/
    margin: 0 auto;
    /*width: clamp(400px, 700px, 700px);*/
    top: 8vh;
    /* devices that don't support dvh fallback */
    top: 15dvh;
    background-color: transparent;
    padding: 0px;
    align-self: start;
}

    .ai-search-form-modal::backdrop {
        background-color: rgb(200 200 200 / 50%);
        backdrop-filter: blur(1px);
    }

    .ai-search-form-modal[open] {
        display: flex;
        gap: 1rem;
        overflow: visible;
        box-shadow: 0px 0px 50px 30px hsla(197, 35%, 71%, 0.7);
    }

    .ai-search-form-modal:has(.follow-up-modal) .ai-search-form-container {
        /* opacity: .5; */
    }

@media(max-width:900px) {
    .ai-search-form-modal {
        top: 6dvh;
    }
}

form:has(.ai-searchbox) {
    /*width: 100%;*/
}

.ai-search-form-container {
    display: flex;
    flex-direction: column;
    border-width: 2px;
    border-style: solid;
    border-color: #ffffff;
    border-radius: 24px;
    max-width: 800px;
    margin: 0 auto;
    width: clamp(400px, 700px, 700px);
    overflow-x: hidden;
    top: 30px;
    background-color: #ffffff;
    /*padding: 1rem;*/
    box-shadow: 0 2px 0px hsla(0, 0%, 73%, 0.5);
}

    .ai-search-form-container::before {
        content: '×';
        display: flex;
        align-items: center;
        justify-content: center;
        height: 2rem;
        width: 2rem;
        font-size: 1.25rem;
        box-sizing: border-box;
        position: absolute;
        z-index: 100000;
        top: -2.5rem;
        right: 0;
        border: 2px solid #ffffff;
        background-color: #f1f1f1;
        border-radius: 1rem;
        aspect-ratio: 1;
        line-height: 0;
    }

@media(min-width:901px) {
    .ai-search-form-container::before {
        top: 0;
        right: -2.5rem;
    }
}

.ai-search-form-container::backdrop {
    background-color: rgba(0, 0, 0, 0.33);
}

.ai-search-form-container[open] {
}

form:has(.ai-searchbox) {
    /*width: 100%;*/
}

.ai-search-form-wrap {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: 1fr auto;
    background-color: rgba(187, 220, 241, 1);
    padding: 1rem;
}

.follow-up-content .ai-search-form-wrap {
    padding: 0px;
    margin-left: 1rem;
    margin-top: 2rem;
    background: transparent;
}

.ai-search-form {
    display: flex;
    flex-direction: column;
}

@media(max-width:900px) {
    .ai-search-form-wrap {
        padding: 0.5rem;
        gap: 0.5rem !important;
    }
}

.ai-searchbox {
    flex: 1;
    --search-form-font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    white-space: nowrap;
    font-size: var(--search-form-font-size);
    padding-top: 0.25em;
    padding-right: 1em;
    padding-bottom: 0.25em;
    padding-left: 2em;
    border-radius: 8px;
    background-color: hsl(225 95% 93% / 1);
    background-color: #fff;
    color: #031f73;
    /*background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M61.0007 28.9366C61.6407 28.9366 61.963 28.5618 62.1253 27.9721C63.7847 19.0258 63.6796 18.8109 73.0007 17.0441C73.6407 16.9366 74.0179 16.5641 74.0179 15.9195C74.0179 15.2772 73.643 14.9023 72.9985 14.7949C63.7322 12.9206 63.9996 12.7058 62.1253 3.86463C61.9653 3.2772 61.643 2.90234 61.0007 2.90234C60.3585 2.90234 60.0362 3.2772 59.8739 3.86463C57.9996 12.7058 58.3196 12.9183 49.0007 14.7949C48.411 14.9001 47.9813 15.2749 47.9813 15.9195C47.9813 16.5618 48.411 16.9366 48.9985 17.0441C58.3219 18.9183 58.2145 19.0258 59.8739 27.9721C60.0339 28.5618 60.3585 28.9366 61.0007 28.9366ZM35.0716 65.7938C36.0887 65.7938 36.7859 65.1515 36.8933 64.1869C38.8202 49.8829 39.3025 49.8829 54.0887 47.0441C55.0533 46.8841 55.7505 46.2395 55.7505 45.2223C55.7505 44.2578 55.0533 43.5629 54.0887 43.4006C39.3025 41.3663 38.7676 40.8841 36.8933 26.3126C36.7859 25.3481 36.0887 24.6509 35.0716 24.6509C34.107 24.6509 33.4099 25.3481 33.3025 26.3652C31.5356 40.7218 30.7859 40.6692 16.107 43.4006C15.1425 43.6155 14.4453 44.2578 14.4453 45.2223C14.4453 46.2943 15.1425 46.8841 16.3196 47.0441C30.8933 49.4006 31.5356 49.7755 33.3025 64.0795C33.4099 65.1515 34.107 65.7938 35.0716 65.7938ZM71.3916 125.099C72.7859 125.099 73.803 124.079 74.0705 122.633C77.8739 93.2772 81.9996 88.8292 111.035 85.6155C112.534 85.4555 113.554 84.3309 113.554 82.9366C113.554 81.5423 112.534 80.4726 111.035 80.2578C81.9996 77.0441 77.8739 72.5983 74.0705 43.2406C73.803 41.7938 72.7859 40.8292 71.3916 40.8292C69.9973 40.8292 68.9825 41.7938 68.7676 43.2406C64.9642 72.5983 60.7859 77.0441 31.803 80.2578C30.2487 80.4726 29.2316 81.5446 29.2316 82.9366C29.2316 84.3309 30.2487 85.4555 31.803 85.6155C60.731 89.4189 64.7493 93.3298 68.7676 122.633C68.9825 124.079 69.9996 125.099 71.3916 125.099Z' fill='%23fecb00'/%3E%3C/svg%3E");*/
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M104 72C104.01 73.6309 103.514 75.2249 102.581 76.5626C101.648 77.9003 100.324 78.916 98.7898 79.47L72.9998 89L63.4998 114.81C62.9372 116.338 61.9194 117.657 60.5836 118.589C59.2478 119.521 57.6584 120.02 56.0298 120.02C54.4012 120.02 52.8118 119.521 51.476 118.589C50.1402 117.657 49.1224 116.338 48.5598 114.81L38.9998 89L13.1898 79.5C11.6615 78.9374 10.3425 77.9196 9.41075 76.5838C8.47904 75.248 7.97949 73.6586 7.97949 72.03C7.97949 70.4014 8.47904 68.812 9.41075 67.4762C10.3425 66.1404 11.6615 65.1226 13.1898 64.56L38.9998 55L48.4998 29.19C49.0624 27.6616 50.0802 26.3426 51.416 25.4109C52.7518 24.4792 54.3412 23.9797 55.9698 23.9797C57.5984 23.9797 59.1878 24.4792 60.5236 25.4109C61.8594 26.3426 62.8772 27.6616 63.4398 29.19L72.9998 55L98.8098 64.5C100.345 65.059 101.669 66.0807 102.598 67.4241C103.528 68.7675 104.018 70.3664 104 72ZM75.9998 24H83.9998V32C83.9998 33.0609 84.4212 34.0783 85.1714 34.8284C85.9215 35.5786 86.939 36 87.9998 36C89.0607 36 90.0781 35.5786 90.8282 34.8284C91.5784 34.0783 91.9998 33.0609 91.9998 32V24H99.9998C101.061 24 102.078 23.5786 102.828 22.8284C103.578 22.0783 104 21.0609 104 20C104 18.9391 103.578 17.9217 102.828 17.1716C102.078 16.4214 101.061 16 99.9998 16H91.9998V8C91.9998 6.93913 91.5784 5.92172 90.8282 5.17157C90.0781 4.42143 89.0607 4 87.9998 4C86.939 4 85.9215 4.42143 85.1714 5.17157C84.4212 5.92172 83.9998 6.93913 83.9998 8V16H75.9998C74.939 16 73.9215 16.4214 73.1714 17.1716C72.4212 17.9217 71.9998 18.9391 71.9998 20C71.9998 21.0609 72.4212 22.0783 73.1714 22.8284C73.9215 23.5786 74.939 24 75.9998 24ZM120 40H116V36C116 34.9391 115.578 33.9217 114.828 33.1716C114.078 32.4214 113.061 32 112 32C110.939 32 109.922 32.4214 109.171 33.1716C108.421 33.9217 108 34.9391 108 36V40H104C102.939 40 101.922 40.4214 101.171 41.1716C100.421 41.9217 99.9998 42.9391 99.9998 44C99.9998 45.0609 100.421 46.0783 101.171 46.8284C101.922 47.5786 102.939 48 104 48H108V52C108 53.0609 108.421 54.0783 109.171 54.8284C109.922 55.5786 110.939 56 112 56C113.061 56 114.078 55.5786 114.828 54.8284C115.578 54.0783 116 53.0609 116 52V48H120C121.061 48 122.078 47.5786 122.828 46.8284C123.578 46.0783 124 45.0609 124 44C124 42.9391 123.578 41.9217 122.828 41.1716C122.078 40.4214 121.061 40 120 40Z' fill='%23031F73'/%3E%3C/svg%3E");
    background-position-x: 0.5rem;
    background-position-y: center;
    background-size: calc(var(--search-form-font-size) / 0.75);
    background-repeat: no-repeat;
    transition: all 200ms ease-in-out;
    border-width: 1px;
    border-style: solid;
    border-color: #bbb;
}

.ai-search-form .ai-searchbox {
    border-bottom: 4px solid rgba(119, 119, 119, 0.35) !important;
    font-weight: 400;
    background-image: none;
    padding-left: 1rem;
    transition: all .2s ease-in-out;
    outline-width: 2px;
    outline-style: solid;
    outline-color: transparent;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(100, 100, 100, 33%);
}

    .ai-search-form .ai-searchbox:hover {
        background-color: #eff9ff;
        outline-color: rgba(119, 119, 119, 0.35);
    }

    .ai-search-form .ai-searchbox:focus-visible {
        outline-color: #031f73;
    }

.demo-funds-top-nav .ai-searchbox {
    --search-form-font-size: 0.875rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    padding-left: 2.5em;
    background-position-x: 0.5rem;
    background-size: 1.5rem;
    color: #666666;
    cursor: text;
}

/* Select Your Fund Buttons START */
.ai-select-fund-header {
    display: block !important;
    margin-bottom: 0.5rem !important;
}

.ai-select-fund-button-container:has(button) {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-auto-rows: 1fr;
    gap: 0.5rem;
    max-width: 800px;
}

/*
.ai-select-fund-message ul:has(button) {
  display: grid;
  gap: .5rem;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  padding: 0;
  margin: 0;
  max-width: 800px;
}
*/

/*
.ai-select-fund-message ul li:has(button) {
  list-style: none;
  padding: 0;
  margin: 0;
}
*/

.ai-select-fund-button-container button {
    align-items: center;
    background-color: rgba(255, 255, 255, 1);
    border: 2px solid rgba(3, 31, 115, 1);
    border-radius: .5rem;
    color: rgba(3, 31, 115, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    width: 100%;
    transition: all .2s ease-in-out;
    position: relative;
    z-index: 2;
    padding: 3px;
    cursor: pointer;
}

    .ai-select-fund-button-container button p {
        font-weight: 700;
    }

    /*
.ai-select-fund-message ul li button {
  align-items: center;
  background-color: rgba(255, 255, 255, 1);
  border: 3px solid rgba(3, 31, 115, 1);
  color: rgba(3, 31, 115, 1);
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: center;
  width: 100%;
  transition: all .2s ease-in-out;
  position: relative;
  z-index: 2;
}
*/

    .ai-select-fund-button-container button.gny {
        color: rgba(110, 40, 62, 1);
        border-color: rgba(110, 40, 62, 1);
    }

    /*
.ai-select-fund-message ul li button.gny {
  color: rgba(110, 40, 62, 1);
  border-color: rgba(110, 40, 62, 1);
}
*/

    .ai-select-fund-button-container button.homecare {
        color: rgba(85, 118, 48, 1);
        border-color: rgba(85, 118, 48, 1);
    }

    /*
.ai-select-fund-message ul li button.homecare {
  color: rgba(85, 118, 48, 1);
  border-color: rgba(85, 118, 48, 1);
}
*/

    .ai-select-fund-button-container button.gnj {
        color: rgba(110, 40, 62, 1);
        border-color: transparent;
        background-color: transparent;
    }

    /*
.ai-select-fund-message ul li button.gnj {
  color: rgba(110, 40, 62, 1);
}
*/

    .ai-select-fund-button-container button.rochester {
        border-color: transparent;
        background-color: transparent;
    }

    .ai-select-fund-button-container button.lpn {
        color: rgba(79, 45, 127, 1);
        border-color: transparent;
        background-color: transparent;
    }

/*
.ai-select-fund-message ul li button.lpn {
  color: rgba(79, 45, 127, 1);
}
*/

@media(max-width:900px) {
    .ai-select-fund-button-container:has(button) {
        grid-template-columns: repeat(2, 1fr);
    }
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button:hover {
    color: rgba(255, 255, 255, 1);
    background-color: rgba(3, 31, 115, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.gny:hover {
    background-color: rgba(110, 40, 62, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.homecare:hover {
    background-color: rgba(85, 118, 48, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.gnj:hover {
    background-color: rgba(110, 40, 62, 1);
}

.ai-select-fund-message:not(.disabled) .ai-select-fund-button-container button.lpn:hover {
    background-color: rgba(79, 45, 127, 1);
}

.ai-select-fund-message .ai-select-fund-button-container button p,
.ai-select-fund-message .ai-select-fund-button-container button span {
    font-size: .85rem;
    margin: 0;
}

.ai-select-fund-message.disabled .ai-select-fund-button-container button {
    cursor: unset;
}

    .ai-select-fund-message.disabled .ai-select-fund-button-container button:not(.selected) {
        /*background: #eee;*/
        /*color: #999;*/
        background-color: transparent;
        opacity: 0.33;
        filter: grayscale(0.33);
        pointer-events: none;
    }

    .ai-select-fund-message.disabled .ai-select-fund-button-container button.selected {
        color: #e1e1e1;
    }

    .ai-select-fund-message.disabled .ai-select-fund-button-container button.nbf.selected,
    .ai-select-fund-message.disabled .ai-select-fund-button-container button.rochester.selected {
        background: rgba(3, 31, 115, 1);
    }

    .ai-select-fund-message.disabled .ai-select-fund-button-container button.gnj.selected,
    .ai-select-fund-message.disabled .ai-select-fund-button-container button.gny.selected {
        background: rgba(110, 40, 62, 1);
    }

    .ai-select-fund-message.disabled .ai-select-fund-button-container button.homecare.selected {
        background: rgba(85, 118, 48, 1);
    }

    .ai-select-fund-message.disabled .ai-select-fund-button-container button.lpn.selected {
        background: rgba(79, 45, 127, 1);
    }

/* Select Your Fund Buttons END */

.ai-response {
    padding: 1rem;
    /*background-color: rgba(0,0,0,0.33);*/
    background-color: #f4f6fb;
    color: #333333;
    font-size: 1.25rem;
    line-height: 1.5;
    border-radius: 1rem;
    /*max-width: 1000px;*/
    margin-inline: auto;
    margin-top: 1rem;
}

    .ai-response ul:has(button) {
        display: flex;
        gap: .5rem;
        padding: 0;
        margin: 0;
    }

    .ai-response ul li:has(button) {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .ai-response ul li button {
        border: 1px solid #333333;
    }

        .ai-response ul li button:hover {
            box-shadow: 0px 0px 3px 0px #999999;
        }

.funds-ai-modal {
    border: none;
    border-radius: 1rem;
}

    .funds-ai-modal::backdrop {
        backdrop-filter: blur(0.5rem) !important;
        background-color: rgba(0, 0, 0, 0.33) !important;
    }

.funds-ai-modal-trigger {
    --search-widget-font-size: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    white-space: nowrap;
    font-size: var(--search-widget-font-size);
    padding-top: 0.5em;
    padding-right: 1em;
    padding-bottom: 0.5em;
    padding-left: 1em;
    border-radius: 100px;
    background-color: hsl(225 95% 93% / 1);
    background-color: #fff;
    color: #031f73;
    background-repeat: no-repeat;
    transition: all 200ms ease-in-out;
    cursor: pointer;
    position: relative;
    border: none;
}

    .funds-ai-modal-trigger:hover {
        box-shadow: 0px 0.25em #fecb00;
        background-color: hsl(225 95% 93% / 1);
    }

    .funds-ai-modal-trigger::before {
        display: block;
        content: '';
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M61.0007 28.9366C61.6407 28.9366 61.963 28.5618 62.1253 27.9721C63.7847 19.0258 63.6796 18.8109 73.0007 17.0441C73.6407 16.9366 74.0179 16.5641 74.0179 15.9195C74.0179 15.2772 73.643 14.9023 72.9985 14.7949C63.7322 12.9206 63.9996 12.7058 62.1253 3.86463C61.9653 3.2772 61.643 2.90234 61.0007 2.90234C60.3585 2.90234 60.0362 3.2772 59.8739 0.86463C57.9996 12.7058 58.3196 12.9183 49.0007 14.7949C48.411 14.9001 47.9813 15.2749 47.9813 15.9195C47.9813 16.5618 48.411 16.9366 48.9985 17.0441C58.3219 18.9183 58.2145 19.0258 59.8739 27.9721C60.0339 28.5618 60.3585 28.9366 61.0007 28.9366ZM35.0716 65.7938C36.0887 65.7938 36.7859 65.1515 36.8933 64.1869C38.8202 49.8829 39.3025 49.8829 54.0887 47.0441C55.0533 46.8841 55.7505 46.2395 55.7505 45.2223C55.7505 44.2578 55.0533 43.5629 54.0887 43.4006C39.3025 41.3663 38.7676 40.8841 36.8933 26.3126C36.7859 25.3481 36.0887 24.6509 35.0716 24.6509C34.107 24.6509 33.4099 25.3481 33.3025 26.3652C31.5356 40.7218 30.7859 40.6692 16.107 43.4006C15.1425 43.6155 14.4453 44.2578 14.4453 45.2223C14.4453 46.2943 15.1425 46.8841 16.3196 47.0441C30.8933 49.4006 31.5356 49.7755 33.3025 64.0795C33.4099 65.1515 34.107 65.7938 35.0716 65.7938ZM71.3916 125.099C72.7859 125.099 73.803 124.079 74.0705 122.633C77.8739 93.2772 81.9996 88.8292 111.035 85.6155C112.534 85.4555 113.554 84.3309 113.554 82.9366C113.554 81.5423 112.534 80.4726 111.035 80.2578C81.9996 77.0441 77.8739 72.5983 74.0705 43.2406C73.803 41.7938 72.7859 40.8292 71.3916 40.8292C69.9973 40.8292 68.9825 41.7938 68.7676 43.2406C64.9642 72.5983 60.7859 77.0441 31.803 80.2578C30.2487 80.4726 29.2316 81.5446 29.2316 82.9366C29.2316 84.3309 30.2487 85.4555 31.803 85.6155C60.731 89.4189 64.7493 93.3298 68.7676 122.633C68.9825 124.079 69.9996 125.099 71.3916 125.099Z' fill='%23fecb00'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        width: 1em;
        aspect-ratio: 1;
    }

    .funds-ai-modal-trigger::after {
        display: block;
        content: '';
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128' viewBox='0 0 128 128' fill='none'%3E%3Cpath d='M20 108L50 78M112 52C112 56.7276 111.069 61.4089 109.26 65.7766C107.45 70.1443 104.799 74.1129 101.456 77.4558C98.1129 80.7988 94.1443 83.4505 89.7766 85.2597C85.4089 87.0688 80.7276 88 76 88C71.2724 88 66.5911 87.0688 62.2234 85.2597C57.8557 83.4505 53.8871 80.7988 50.5442 77.4558C47.2012 74.1129 44.5495 70.1443 42.7403 65.7766C40.9312 61.4089 40 56.7276 40 52C40 42.4522 43.7928 33.2955 50.5442 26.5442C57.2955 19.7928 66.4522 16 76 16C85.5478 16 94.7045 19.7928 101.456 26.5442C108.207 33.2955 112 42.4522 112 52Z' stroke='%23031F73' stroke-width='8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        width: 1em;
        aspect-ratio: 1;
    }

.ai-response ul {
    text-align: left;
}

.ai-response p {
    text-align: left;
    margin-top: 0px;
}

.ai-response--search-results-container {
    display: none;
    overflow-y: scroll;
    height: 400px;
    margin-top: 1rem;
    /*margin-top: 2rem;*/
    margin-left: 1rem;
    margin-right: 1rem;
}

.ai-response--search-results {
    display: grid;
    /*gap: 0.5rem;*/
}

.ai-response--search-results-header {
    text-align: left;
    padding-left: 1rem;
    color: #333333;
}

.ai-response--search-results-card {
    display: flex;
    flex-direction: column;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    overflow: hidden;
    /* background-color: #fff; */
    /* box-shadow: -1px 2px 6px 1px rgba(0, 0, 0, .25); */
    /* border: 1px solid #bbb; */
    /* border-radius: .5rem; */
    text-align: left;
    transition: all 200ms ease-in-out;
}

    .ai-response--search-results-card:hover {
        background-color: #FFF6CC;
    }

.ai-response--search-results-card-link {
    font-size: 0.75rem;
    color: #031f7380;
}

.ai-response--search-results-card-link {
    font-size: 0.75rem;
    color: #031f7380;
    overflow: hidden;
    white-space: nowrap;
    width: 99%;
    /* needs to be less than 100% to force the elipsis to show. */
    text-overflow: ellipsis;
}

    .ai-response--search-results-card-link:hover {
        color: #031f73;
        text-decoration: underline;
    }

.ai-response--search-results-card-title {
    font-size: var(--funds-font-size-md);
    margin-top: 0px;
    margin-bottom: 0.25em;
    /*color: #fecb00;*/
    color: #031f73 !important;
    line-height: 1.2;
}

.ai-response--search-results-card-title-link {
    color: inherit;
    font-weight: 400;
    font-size: 1.15rem;
}

    .ai-response--search-results-card-title-link:hover {
        color: #031f73;
        text-decoration: underline;
    }

.ai-response--search-results-card-snippet {
    margin-bottom: 0px;
    margin-top: 0px;
    color: #555555;
    line-height: 1.2;
    font-size: .875rem;
}

.temporary-search-results-test {
    color: black;
    text-align: center;
}

@media(max-width: 900px) {
    .ai-response--search-results-container {
        height: 35vh;
        height: 35dvh;
    }

    .ai-response--search-results-card-title {
        font-size: var(--funds-font-size-base);
    }
}

/* ChatBox START */
.ai-chatbox-container {
    background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%);
    position: relative;
}

.ai-chatbox {
    background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%);
    border-top-left-radius: 0px;
    border-top-right-radius: 0px;
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    max-height: 50dvh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    margin-top: 46.8px
    /* nudge the top by the height of the user's message */
}

    .ai-chatbox:not(:has(.ai-message)) {
        /* align-items: center; */
        justify-content: center;
        margin-top: 0px;
    }

.ai-chatbox-header {
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    position: absolute;
    padding: 1rem;
    /* height: 40px; */
    width: 100%;
    /* border: 1px solid black; */
    border-top-right-radius: 24px;
    border-top-left-radius: 24px;
    z-index: 99999;
    background: linear-gradient(to bottom, rgba(217, 235, 247, 1), 90%, rgba(255, 255, 255, 0));
}

    .ai-chatbox-header svg {
        color: #031f73;
        height: 24px;
        width: 24px;
    }

    .ai-chatbox-header button {
        align-items: center;
        background: none;
        border: none;
        color: #999999;
        cursor: pointer;
        display: flex;
        font-size: 0.875rem;
        gap: 5px;
        height: fit-content;
        /*margin-right: 15px;*/
        padding: 0;
    }

        .ai-chatbox-header button span:not(.x-icon) {
            text-decoration: underline dotted;
            text-underline-offset: 3px;
        }

        .ai-chatbox-header button .x-icon {
            font-weight: 400;
            font-size: 20px;
            margin-bottom: 3px;
        }

/* .ai-chatbox-header:after {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: 0;
  pointer-events: none;
  background-image: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255, 1) 90%);
  width: 100%;
  height: 4em;
} */

/* fade-out that doesn't fully work */
/* .ai-chatbox:after {
  content:'';
  height:15px;
  position:absolute;
  left:0;
  right: 0;
  bottom:0;
  z-index: 9999!important;
  background-image: linear-gradient(0deg,#ddd 0%,transparent);
} */

.ai-chatbox .ai-message {
    /*border-radius: 1rem;*/
    position: relative;
    text-align: start;
    text-wrap: pretty;
}

    .ai-chatbox .ai-message p {
        display: inline;
        margin: 0 0 .5rem 0;
    }

        .ai-chatbox .ai-message p:last-of-type {
            margin-bottom: 0;
        }

    .ai-chatbox .ai-message.user {
        display: flex;
        justify-content: flex-end;
        margin-block-start: 1rem;
        margin-inline-start: 6rem;
        margin-block-end: 1rem;
        margin-inline-end: 1rem;
        padding: 0px;
        background-color: transparent;
        border-top-left-radius: 2rem;
        border-top-right-radius: 2rem;
    }

        .ai-chatbox .ai-message.user:first-child {
            padding-top: 0px;
        }

    .ai-chatbox .ai-message a {
        color: #031f73;
    }

@media(max-width:900px) {
    .ai-chatbox {
        min-height: 20vh;
        min-height: 20dvh;
        max-height: 65dvh;
    }

        .ai-chatbox .ai-message.user {
            margin-inline-start: 1rem;
            margin-inline-end: 0.5rem;
            margin-block-start: 0.5rem;
            margin-block-end: 0.5rem;
        }

        .ai-chatbox .ai-message p {
            font-size: 1rem;
        }
}

.user-message-container {
    background-color: #248bf5;
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-width: 1px;
    border-style: solid;
    border-color: #ffffff;
    border-radius: 0.75rem 0.75rem 0.25rem;
}

    .user-message-container p {
        margin-bottom: 0;
    }

.ai-chatbox .ai-message.model {
    margin-inline-start: 1rem;
    margin-inline-end: 6rem;
    margin-block-start: 1rem;
    margin-block-end: 1rem;
    color: #000000;
    padding: 1rem;
    background-color: #edf3f8;
    background-image: linear-gradient(180deg, #FFFFFF 85.41%, #F1F1F1 100%);
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
    border-bottom-left-radius: 0.25rem;
    border-top-left-radius: 1rem;
    font-size: 1rem;
    position: relative;
    /*align-self: flex-start;*/
}

    .ai-chatbox .ai-message.model::after {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: 1.1rem 1.1rem 1.1rem .25rem;
        z-index: -1;
        background-image: linear-gradient(114.27deg, #85B44E 28.45%, rgba(3, 31, 115, 0.5) 74.71%);
    }

    .ai-chatbox .ai-message.model.loading::after {
        content: '';
        position: absolute;
        inset: -2px;
        border-radius: inherit;
        z-index: -1;
        background-image: linear-gradient(114.27deg, #85B44E 28.45%, rgba(3, 31, 115, 0.5) 74.71%);
    }

@media(max-width:900px) {
    .ai-chatbox .ai-message.model {
        margin-inline-start: 0.5rem;
        margin-inline-end: 1rem;
        margin-block-start: 0.5rem;
        margin-block-end: 0.5rem;
    }
}

.ai-chatbox .ai-message.model.ai-select-fund-message {
    background-image: none;
    background-color: transparent;
    padding: 0px;
    margin: 1rem;
}

    .ai-chatbox .ai-message.model.ai-select-fund-message::after {
        content: none;
    }

    .ai-chatbox .ai-message.model.ai-select-fund-message .ai-select-fund-header {
        font-weight: 700;
        margin-bottom: 1.5rem;
    }

.ai-chatbox .ai-message.loading {
    font-size: 0.875rem;
    color: #333333;
    background-color: #ffffff;
    background-image: none;
    border-radius: 1rem;
    align-self: start;
    padding: 0.5rem 1.5rem;
}

.ai-system-instruction-box {
    /* flex: 1; */
    --search-form-font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    font-size: var(--search-form-font-size);
    padding-top: 1em;
    padding-right: 2em;
    padding-bottom: 1em;
    padding-left: 2em;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    background-color: #333333;
    color: #f1f1f1;
    background-repeat: no-repeat;
    transition: all 200ms ease-in-out;
    border-width: 1px;
    border-style: solid;
    border-color: #bbb;
    min-height: 200px;
    max-height: 400px;
    /* this is fine*/
    resize: vertical;
}

    .ai-system-instruction-box::placeholder {
        color: #999999;
    }

.ai-search-form-modal:has(.follow-up-modal) .ai-chatbox-header {
    background-color: rgba(0, 0, 0, .5);
    background: none;
}

    .ai-search-form-modal:has(.follow-up-modal) .ai-chatbox-header button {
        color: #000000;
    }

.follow-up-modal {
    align-items: center;
    backdrop-filter: blur(3px);
    background-color: rgba(0, 0, 0, .5);
    border-radius: 24px;
    display: flex;
    height: 100%;
    justify-content: center;
    /* padding: 2rem; */
    position: absolute;
    width: 100%;
    z-index: 9999;
}

.follow-up-content {
    /* background: linear-gradient(180deg, #D9EBF7 78.19%, #A9D6F1 100%); */
    border: 2px solid #ffffff;
    border-radius: 10px;
    padding: 1rem;
    width: 90%;
    position: relative;
    z-index: 1;
    background-color: hsla(203, 66%, 84%, 1);
}

    .follow-up-content::before {
        content: '';
        position: absolute;
        display: block;
        top: calc(var(--funds-line-height-base) * 1.25em);
        bottom: calc(var(--funds-line-height-base) * 1.25em);
        width: 1px;
        padding-left: 1rem;
        border-left: 2px solid #ffffff;
        border-top: 2px solid #fff;
        border-bottom: 2px solid #fff;
        border-top-left-radius: 1rem;
        border-bottom-left-radius: 1rem;
        z-index: -1;
    }

.ai-question-button {
    display: none;
    align-self: center;
    align-items: center;
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    font-size: 0.875rem;
    font-weight: 400;
    color: #999999;
    cursor: pointer;
    gap: .25rem;
    transition: all .2s ease-in-out;
    /* margin-top: 1rem; */
    /* margin-right: 1rem; */
    /* margin-left: 1rem; */
    /*position: sticky;*/
    /*bottom: 0;*/
    line-height: var(--funds-line-height-base);
}

    .ai-question-button svg {
        font-size: 16px;
    }

    .ai-question-button.follow-up svg {
        transform: rotate(270deg)
    }

    .ai-question-button:hover {
        background-color: #f1f1f1;
    }

.ai-system-instruction-list-container {
    padding: 1rem;
    background-color: #ffffff;
    border-radius: 24px;
    align-self: start;
}

    .ai-system-instruction-list-container .ai-system-instruction-list {
        list-style-position: inside;
        margin: 0px;
        padding-left: 0px;
    }

    .ai-system-instruction-list-container .ai-system-instruction-list-item {
        font-size: 1rem;
        background-color: #edf3f8;
        border-radius: 0.25rem;
        padding: 0.5rem;
        line-height: 1.33;
    }

        .ai-system-instruction-list-container .ai-system-instruction-list-item:nth-child(even) {
            background-color: #dddddd;
        }

        .ai-system-instruction-list-container .ai-system-instruction-list-item + .ai-system-instruction-list-item {
            margin-top: 0.25rem;
        }

.pulse1 {
    animation: pulse .5s infinite ease-in-out alternate;
}

.pulse2 {
    animation: pulse .5s infinite ease-in-out alternate;
    animation-delay: .2s;
}

.pulse3 {
    animation: pulse .5s infinite ease-in-out alternate;
    animation-delay: .4s;
}

@keyframes pulse {
    from {
        transform: scale(0.8);
    }

    to {
        transform: scale(1.7);
    }
}

@media (max-width: 700px) {
    .ai-search-form-container dialog {
        width: clamp(90vw, 95vw, 95vw);
        max-height: 80vh;
        max-height: 80dvh;
        top: 120px;
    }
}

/* ChatBox END */

.ai-message.model:not(.ai-select-fund-message):not(:has(li)) > *:not(.ai-message-citation-container) {
    display: inline;
}

.ai-message.model:not(.ai-select-fund-message) li > div {
    display: flex;
}

.ai-message.model:not(.ai-select-fund-message) svg {
    cursor: pointer;
    padding-top: 0.25rem;
}

.ai-message.model:not(.ai-select-fund-message) li div,
.ai-message.model:not(.ai-select-fund-message) li div p {
    display: inline;
    font-size: 18px;
}

/* citation styles START */
.ai-message-citation-container,
.ai-search-results-container {
    /* display: block !important; */
    position: relative;
}

    .ai-message-citation-container::before {
        content: '';
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to left, #ffffff 1%, transparent 10%);
        z-index: 1;
        pointer-events: none;
    }

    .ai-search-results-container::before {
        content: '';
        position: absolute;
        top: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top left, rgb(255 255 255) 1%, rgba(255, 255, 255, 0) 5%), linear-gradient(to bottom left, rgb(255 255 255) 1%, rgb(255 255 255 / 0%) 5%), linear-gradient(to left, rgb(255 255 255) 3%, rgba(255, 255, 255, 0) 10%), linear-gradient(to left, rgb(252 252 252) 1%, rgb(255 255 255 / 0%) 5%);
        z-index: 1;
        pointer-events: none;
    }


.ai-message-citations,
.ai-search-results {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.5rem;
    flex-wrap: nowrap;
    margin-top: 1rem;
    margin-bottom: .5rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-right: 1rem;
    width: 100%;
    transition: all 0.3s ease-in-out;
    transition-behavior: allow-discrete;
}

    .ai-search-results .ai-message-citation {
        height: auto;
    }

    .ai-message-citations::-webkit-scrollbar {
        /*display: none !important;*/
    }

    .ai-search-results::-webkit-scrollbar {
        display: none !important;
    }

.ai-search-results {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.ai-search-results {
    display: flex !important;
    gap: .5rem;
}

.ai-message-citations.active {
    display: flex !important;
    opacity: 1;
    visibility: visible;
}

.ai-message-citation,
.ai-source-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    padding: .5rem .65rem;
    border-radius: 0.5rem;
    border-width: 1px;
    border-style: solid;
    border-color: #bbbbbb;
    position: relative;
    box-sizing: border-box;
    /*height: fit-content;*/
    min-height: 100%;
    max-width: 200px;
    min-width: 200px;
}

    .ai-message-citation,
    .ai-message-citation * {
        color: #333333;
        text-decoration: none;
    }

        .ai-message-citation .ai-message-citation-link,
        .ai-source-card .ai-card__item-url {
            font-size: 0.75rem !important;
            color: #031f7380;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
        }

        .ai-message-citation .ai-message-citation-title,
        .ai-source-card .ai-card__item-title {
            margin-top: 0px;
            margin-bottom: 0.25em;
            font-size: 0.75rem;
            overflow: hidden;
            text-overflow: ellipsis;
            -webkit-line-clamp: 2;
            line-clamp: 2;
            -webkit-box-orient: vertical;
            display: -webkit-box;
        }

        .ai-message-citation .ai-message-citation-text {
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            display: -webkit-box;
            overflow: hidden;
            text-overflow: ellipsis;
            font-size: 0.75rem;
            text-decoration: none !important;
            line-height: 1rem;
        }

        .ai-message-citation .ai-message-citation-link-wrap {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            left: 0;
        }

.ai-message-citation-toggle {
    background-color: #afd0ff;
    border-radius: 50%;
    margin: 0 .25rem;
    padding: 0 .15rem;
    transition: all .15s ease-in-out;
}

    .ai-message-citation-toggle:hover {
        background-color: #94afdc;
    }

/* citation styles END */

.ai-previous-question {
    align-items: center;
    background-color: rgb(36, 139, 245);
    border: 1px solid #ffffff;
    border-radius: 10px;
    color: #ffffff;
    display: flex;
    gap: .25rem;
    padding: 0px 0.5rem;
}

    .ai-previous-question svg {
        color: #999999;
        font-size: 1.5rem;
    }

    .ai-previous-question p {
        margin: 0;
    }

.follow-up-modal .ai-previous-question {
    padding: .5rem 1rem;
    margin-left: 1rem;
    width: fit-content;
}

/* table styles START */
.ai-chatbox .ai-message.model:has(div > table) {
    padding-left: 1rem;
    padding-right: 1rem;
}

.funds-disclaimer {
    margin-block-start: 1rem;
    margin-block-end: 1rem;
    padding: 0 8rem;
    font-size: .75rem;
    color: #777;
    text-wrap: pretty;
    margin-top: 50px !important;
    line-height: 1.2;
}

.ai-chatbox:has(.ai-message) .funds-disclaimer {
    display: none;
}

@media(max-width:900px) {
    .funds-disclaimer {
        padding: 0 2rem;
    }
}

.ai-message div:has(> table) {
    /*padding: 1rem;*/
    border-radius: .75rem;
    display: block !important;
    overflow-x: auto;
}

.ai-message table {
    --table-border-color: #bbbbbb;
    --table-bg-color: #ffffff;
    background-color: var(--table-bg-color);
    margin: 0px !important;
    line-height: 1.33;
}

    .ai-message table * {
        font-size: 0.875rem;
    }

    .ai-message table thead {
        white-space: nowrap;
    }

        .ai-message table thead tr {
        }

            .ai-message table thead tr th {
                padding: 0.5rem 1rem;
            }

            .ai-message table thead tr td {
                /*text-align: center;*/
                border: none !important;
            }

                .ai-message table thead tr td * {
                    margin: 0px;
                    padding: 0px;
                }

    .ai-message table tbody {
    }

        .ai-message table tbody tr {
        }

            .ai-message table tbody tr td {
                padding: 0.5rem 1rem;
            }

@media(max-width:900px) {
    .ai-message div:has(> table) {
        padding: 0px !important;
        overflow-x: auto;
    }

    .ai-message table {
        display: block;
        border: none !important;
        background-color: transparent;
    }

        .ai-message table thead {
            display: none;
        }

        .ai-message table tbody {
            display: block !important;
            /*margin: 1rem !important;*/
        }

        .ai-message table tr {
            display: block !important;
            padding: 1rem !important;
            background-color: #ffffff;
            border: 1px solid #bbbbbb !important;
            border-radius: 8px;
            font-size: 1rem;
        }

            .ai-message table tr + tr {
                margin-top: 1rem !important;
            }

            .ai-message table tr td {
                width: 100% !important;
                display: block !important;
                text-align: left !important;
                padding: 0px !important;
                font-size: 1rem;
                line-height: 1.2em;
                border: none;
            }

        .ai-message table tbody tr td + td {
            margin-top: 0.5rem !important;
        }

        .ai-message table tbody tr td:nth-child(1)::before {
            content: '';
            display: inline;
        }

        .ai-message table tbody tr td:nth-child(2)::before {
            content: '';
            display: inline;
        }

        .ai-message table tbody tr td:nth-child(3)::before {
            content: '';
            display: block !important;
            white-space: pre-wrap;
            margin-bottom: 0.5em;
            line-height: 1.25em;
            margin: -0.5em -0.5em 0.5em -0.5em;
            padding: 0.5em;
            background-color: #dddddd;
            text-align: center;
            border-top-left-radius: 4px;
            border-top-right-radius: 4px;
        }

        .ai-message table tbody tr td:nth-child(3)::first-line {
            font-weight: 700 !important;
        }

        .ai-message table tbody tr td:nth-child(3) {
            display: block !important;
            line-height: 1.5em;
            padding: 0.5em !important;
            background-color: #f1f1f1;
            border-radius: 4px;
            font-size: 0.875rem;
        }

        .ai-message table tr td p {
            font-size: 0.875rem;
            line-height: 1.5em;
        }

            .ai-message table tr td p strong,
            .ai-message table tr td strong {
                display: block !important;
            }

        .ai-message table tr td div a {
            width: 100%;
            text-align: center;
        }
}

@media(min-width:901px) {
    .ai-message table {
        font-size: 1rem;
        text-align: left;
        border-collapse: separate;
        border-spacing: 0px 0px;
        border-width: 1px;
        border-style: solid;
        border-color: var(--table-border-color);
        border-radius: 1rem;
        /*white-space: nowrap;*/
    }

        .ai-message table tbody tr td {
            border-top-width: 1px;
            border-top-style: solid;
            border-top-color: var(--table-border-color);
        }
}

/* table styles END */

/* voice prompt styles START */
.ai-voice-prompt-container {
}

button.ai-voice-prompt-button {
}

.ai-voice-prompt-button {
    --active-color: #fecb00;
    /*--active-color: #fa304c;*/
    /*--active-color: #85b44e;*/
    background-color: #ffffff;
    border-top: 0px;
    border-right: 0px;
    border-bottom: 4px solid rgba(119, 119, 119, 0.35) !important;
    border-left: 0px;
    padding-top: 0.25em;
    padding-right: 0.5rem;
    padding-bottom: 0.25em;
    padding-left: 0.5rem;
    border-radius: 0.5rem;
    /*aspect-ratio: 1;*/
    font-size: var(--search-form-font-size);
    line-height: 1.5;
    border-width: 1px;
    border-style: solid;
    border-color: rgb(100, 100, 100, 33%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 200ms ease-in-out;
    position: relative;
    /*min-width: 100px;*/
}

.ai-search-form-wrap:has(.ai-previous-question) .ai-voice-prompt-button {
    align-self: end;
}

.ai-voice-prompt-button:hover:not(.active) {
    background-color: #ffedba;
}

.ai-voice-prompt-button.active {
    background-color: var(--active-color);
}

.ai-voice-prompt-button-icon {
    color: rgba(85, 85, 85, 1);
    font-size: 1.5rem;
    line-height: 0;
    position: relative;
    z-index: 1;
}

.ai-voice-prompt-button-label {
    color: #031f73;
    font-size: 0.875rem;
    line-height: 1;
    position: relative;
    z-index: 1;
}

.ai-voice-prompt-button-recording-animation {
    line-height: 0;
    position: relative;
    z-index: 1;
}

@media(min-width:431px) {
    .ai-chatbox {
        scrollbar-width: none;
        /* hides scrollbar visually on desktop, but keeps functionality */
    }
}

.ripple {
    outline-width: 0.5rem;
    outline-style: solid;
    outline-color: var(--active-color);
    border-radius: 0.5rem;
    position: absolute;
    top: 0px;
    left: 0px;
    bottom: 0px;
    right: 0px;
    animation: ripple infinite 2s;
}

@-webkit-keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

/* voice prompt styles END */





/* fallback animation for loading dots */
.model.ai-message.loading {
    display: flex;
    gap: .25rem;
    padding: .5rem 1rem;
}

.pulse1,
.pulse2,
.pulse3 {
    animation: pulse 1.2s infinite;
    display: inline-block;
}

.pulse2 {
    animation-delay: .2s;
}

.pulse3 {
    animation-delay: .4s;
}

@keyframes pulse {

    0%, 80%, 100% {
        opacity: .2
    }

    40% {
        opacity: 1
    }
}

/* --- Disclaimer look to match screenshot --- */
.ai-message.model.disclaimer .ai-message-bubble {
    background: transparent;
    /* keep the panel's gradient behind it */
    box-shadow: none;
}

.ai-answer-warning {
    font-style: italic;
    line-height: 1.55;
    color: #6B7280;
    /* subtle gray */
    font-size: 18px !important;
    /* scales up on large screens */
    max-width: 760px;
    /* centered block like the screenshot */
    margin: 120px auto;
    /* vertical breathing room */
    text-align: left;
    padding: 0 8px;
}

/* --- Mic button styling to match the rounded square icon on the right --- */
.ai-voice-prompt-container {
    display: flex;
    align-items: center;
    margin-left: 0px;
    /* space between input and mic button */
}

.ai-voice-prompt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 8px !important;
    /* rounded-square */
    border: 1px solid #D6DBE1;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .06), 0 10px 22px rgba(0, 0, 0, .10);
    cursor: pointer;
    transition: transform .06s ease, box-shadow .2s ease, border-color .2s ease;
}

    .ai-voice-prompt-button:hover {
        box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 14px 30px rgba(0, 0, 0, .12);
        border-color: #C7CED6;
    }

    .ai-voice-prompt-button:active {
        transform: translateY(1px);
    }

.ai-voice-prompt-button-icon {
    width: 2rem !important;
    height: 2rem !important;
    display: block;
}

/* When recording, give a visual cue (your JS adds/removes .active) */
.ai-voice-prompt-button.active {
    border-color: #3B82F6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .15), 0 12px 28px rgba(59, 130, 246, .22);
}

/* FINAL disclaimer override (small + subtle + centered) */
html body .ai-search-form-modal .ai-chatbox-container .ai-message.model.disclaimer .ai-message-bubble p.ai-answer-warning {
    font-size: 18px !important;
    /* small like the screenshot */
    line-height: 1.5 !important;
    color: #6b7280 !important;
    /* subtle gray */
    font-style: italic !important;
    font-weight: 400 !important;
    letter-spacing: 0 !important;
    max-width: 720px !important;
    /* narrow column */
    margin: 110px auto 0 !important;
    /* centered with top space */
    padding: 0 8px !important;
    text-align: left !important;
    /* prevent any parent scaling tricks */
    transform: none !important;
}

html body .ai-search-form-modal .ai-chatbox-container .ai-message.model.disclaimer .ai-message-bubble {
    background: transparent !important;
    box-shadow: none !important;
}

/* Ensure star is visible above header contents */
.ai-chatbox-container {
    position: relative;
}

.ai-chatbox-badge {
    position: absolute;
    top: 18px;
    left: 22px;
    z-index: 10;
    /* higher than header */
    pointer-events: none;
}

.ai-chatbox-badge-icon {
    width: 28px;
    height: 28px;
    color: navy;
    opacity: .9;
    /*filter: drop-shadow(0 1px 0 rgba(255,255,255,.7));*/
}

/* Safety: keep fund pill hidden by default; JS will unhide when a fund exists */
.ai-chatbox-header #fund-pill[hidden] {
    display: none !important;
}

#aiInput.ai-searchbox {
    border-radius: 0.5rem !important;
    border-bottom: 4px solid rgba(100, 100, 100, 0.33) !important;
}

    #aiInput.ai-searchbox::placeholder {
        font-size: 1rem;
    }

.ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body,
.ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body {
    scrollbar-width: unset !important;
    scrollbar-gutter: stable;
}

    .ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body:hover,
    .ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body:hover {
        cursor: grab;
    }

    /* Style citation/sources scrollbar */
    .ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body::-webkit-scrollbar,
    .ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body::-webkit-scrollbar {
        width: auto;
    }

    /* Style citation/sources scrollbar thumb */
    .ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body::-webkit-scrollbar-thumb,
    .ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body::-webkit-scrollbar-thumb {
        background-clip: padding-box;
        border: 4px solid transparent;
        background-color: #bbbbbb;
        border-radius: 1rem;
    }

    /* Style citation/sources scrollbar track (the area the thumb moves in) */
    .ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body::-webkit-scrollbar-track,
    .ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body::-webkit-scrollbar-track {
        background-color: #f9f9f9;
    }

    /* Style citation/sources thumb on hover */
    .ai-message .ai-card-slot .ai-card[data-card="citations"] .ai-card__body::-webkit-scrollbar-thumb:hover,
    .ai-message .ai-card-slot .ai-card[data-card="sources"] .ai-card__body::-webkit-scrollbar-thumb:hover {
        background-color: #666666;
    }
