@import url(../fonts/stylesheet.css);
@use "sass:math";

html,
body {
  font-family: "manrope", sans-serif;
  font-size: 1.0rem;
  line-height: 1.75rem;
  font-weight: 400;
  touch-action: manipulation;
  /* Prevents double-tap zoom */
  overscroll-behavior-y: none;
  overflow: hidden;
  /* Prevents pull-to-refresh / bounce */
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 2.125rem;
}

h2 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.75rem;
}

h3 {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.5rem;
}

h4 {
  font-size: 1.0rem;
  font-weight: 700;
  line-height: 1.75rem;
}

.caption-title {
  font-size: 1.0rem;
  font-weight: 700;
  line-height: 1.75rem;
  color: #000000;
  text-decoration: none;
}

body {
  background-color: #F6F8FA;
  color: #131927;
  margin: 0;
  padding: 0;
}

.content-main {
  font-family: 'work-sans', sans-serif;
  padding: 1.5rem;
  background-color: #FFFFFF;
  border-radius: 1rem;
}

.main-content {
  padding: 72px 1.25rem 1.25rem 260px;
  height: 100vh;
}

@media (max-width: 991.98px) {
  .main-content {
    padding-left: 1.25rem;
  }
}

.main-content-wrapper {
  height: 100%;
  box-shadow: 0px 0px 0.125rem rgba(97, 88, 151, 0.25);
  border-radius: 0.625rem;
  /*padding: 1.25rem;*/
  padding: 1.25rem 0 1.25rem 1.25rem;
  /* top | right | bottom | left */
  background-color: #FFFFFF;
}

.main-content.closed {
  padding-left: 68px;
}

@media (max-width: 991.98px) {
  .main-content.closed {
    padding-left: 1.25rem;
  }
}

/* Webkit (Chrome, Edge, Safari) */
::-webkit-scrollbar {
  width: 4px !important;
  /* Extra thin scrollbar */
  height: 4px !important;
  /* For horizontal scrollbars */
}

::-webkit-scrollbar-track {
  background: #f0f0f0 !important;
  /* Light grey background */
  border-radius: 8px !important;
  /* More rounded track */
}

::-webkit-scrollbar-thumb {
  background: #a0a0a0 !important;
  /* Medium grey */
  border-radius: 8px !important;
  /* Extra rounded corners */
}

/* Remove scrollbar buttons (arrows) */
::-webkit-scrollbar-button {
  display: none !important;
}

.btn {
  padding: 0.3125rem 1rem;
  border-radius: 0.3125rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.btn.btn-link {
  font-size: 1.0rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #5D5BB5;
  letter-spacing: 0;
  text-decoration: none;
  padding-left: 0;
  padding-right: 0;
}

/* Fix spacing between icon and text inside action buttons */
.case-header .btn.btn-link {
  display: inline-flex;
  align-items: center;
}

.case-header .btn.btn-link img {
  margin-right: 0.5rem;   /* increase spacing */
  width: 16px;
  height: 16px;
}

.btn.btn-link:hover {
  text-decoration: underline;
}

.btn.btn-outline-primary {
  border-color: #726FC8;
  color: #726FC8;
}

.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus {
  border-color: #726FC8;
  background-color: #726FC8;
  color: #FFFFFF;
}

.btn.btn-primary {
  border-color: #726FC8;
  background-color: #726FC8;
  color: #FFFFFF;
}

.btn.btn-primary:hover,
.btn.btn-primary:focus {
  border-color: #4C4A92;
  background-color: #4C4A92;
  color: #FFFFFF;
}

.btn.btn-secondary {
  background-color: #eff1ef;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
  border-color: #eff1ef;
}

.btn.btn-secondary:hover,
.btn.btn-secondary:focus {
  border-color: #eff1ef;
  background-color: #eff1ef;
  color: #131927;
}

.button-wrapper {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  justify-content: center;
}

.header {
  padding: 0.9375rem 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 72px;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  background: #F6F8FA;
  z-index: 1;
}

.header .header-left {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-right: 1.25rem;
  width: 16.875rem;
}

@media (max-width: 991.98px) {
  .header .header-left {
    width: auto;
  }
}

.header .header-left .logo {
  min-width: 9.8125rem;
  width: 9.8125rem;
  margin-right: 1.25rem;
}

.header .header-left .logo img {
  width: 100%;
}

.header .header-left .logo-mobile {
  margin-right: 1.25rem;
}

.header .header-left .sidebar-trigger {
  width: 1rem;
  height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background-color: transparent;
  padding: 0;
  transform-origin: center;
}

.header .header-left .sidebar-trigger.closed {
  transform: rotate(-180deg) scale(1);
}

.header .header-left .sidebar-trigger.closed:hover {
  transform: rotate(-180deg) scale(1.2);
}

.header .header-left .sidebar-trigger:hover {
  transform: rotate(0deg) scale(1.2);
}

.header .header-left .sidebar-trigger img {
  width: 100%;
}

.header .header-right {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header .header-right .right .account-dropdown {
  border: 0;
  background-color: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 14.52px;
  display: flex;
  align-items: center;
  padding: 0;
}

.header .header-right .right .account-dropdown:hover {
  color: #5D5BB5;
}

.header .header-right .right .account-dropdown img {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 1.875rem;
  margin-right: 0.625rem;
}

.header .header-right .right .account-dropdown img.dropdown-arrow {
  margin-right: 0;
  margin-left: 0.625rem;
  border-radius: 0;
  width: 1rem;
  height: 1rem;
}

.account-dropdown {
  border: 0;
  background-color: transparent;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 14.52px;
  display: flex;
  align-items: center;
  padding: 0;
}

.account-dropdown:hover {
  color: #5D5BB5;
}

.account-dropdown img {
  width: 1.875rem;
  height: 1.875rem;
  border-radius: 1.875rem;
  margin-right: 0.625rem;
}

.account-dropdown img.dropdown-arrow {
  margin-right: 0;
  margin-left: 0.625rem;
  border-radius: 0;
  width: 1rem;
  height: 1rem;
}

.card {
  padding: 0.625rem 1.25rem;
  border-radius: 1.25rem;
  border: 0.0625rem solid #E5E7EA;
}


.tooltip {
  z-index: 99999 !important;
}

.btn.fs-12 {
  font-size: 0.75rem;
}

.btn.fs-14 {
  font-size: 0.875rem;
}

.btn.fs-16 {
  font-size: 1rem;
}

.btn.fs-18 {
  font-size: 1.125rem;
}

.search-button {
  display: flex;
  align-items: center;
  border: 0.0625rem solid #D3E4D3;
  background-color: #EFF1EF;
  border-radius: 1.875rem;
  padding: 0.625rem 0.9375rem;
  font-size: 1rem;
  font-weight: 600;
  line-height: 19.36px;
}

@media (max-width: 991.98px) {
  .search-button {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    padding: 0.625rem;
  }

  .search-button img {
    margin-right: 0.375rem !important;
    width: 0.875rem;
  }
}

.search-button:hover {
  background-color: #D3E4D3;
}

.search-button img {
  margin-right: 0.75rem;
}

.header.closed {
  padding-left: 0;
}

.header.closed .header-left {
  width: 68px;
  justify-content: center;
  padding-right: 0;
}

.header.closed .header-left .logo {
  display: none !important;
}

.header.closed .header-left .logo-mobile {
  display: none !important;
}

.action-group .form-control {
  border: 0.125rem solid #B2B1DB;
  box-shadow: none;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
}

.section-slider {
  background-color: rgba(255, 255, 255, 0);
  /* 50% translucent white */
  padding: 10px;
  /* Optional: Adds spacing for better visibility */
  border-radius: 8px;
  top: 20px;
  /* Optional: Adds rounded corners */
}

.slider-section-wrapper {
  margin: 0.625rem auto;
  width: 100%;
  max-width: 80%;
  padding: 0 2.125rem;
}

.section-slider .slick-slide {
  margin: 1rem 0.525rem;
}

.section-slider .slick-list {
  margin: 0 -0.125rem;
  /* Prevents overflow issues */
}

.slick-next,
.slick-prev {
  width: 1.5rem;
  height: 1.5rem;
  overflow: hidden;
  text-indent: -999999px;
  background-image: url(../images/nav-arrow-right.svg) !important;
  background-repeat: no-repeat !important;
  border-radius: 0.75rem;
}

.slick-next:hover,
.slick-prev:hover {
  background-color: #D3E4D3;
}

.slick-prev {
  transform-origin: center;
  transform: rotate(-180deg);
  left: -1.6875rem;
}

.slick-next {
  right: -1.75rem;
}

.dropdown-menu {
  border: 0 none;
  box-shadow: 0px 0.125rem 0.625rem 0px #676490;
  border-radius: 0.3125rem;
  padding: 0.625rem;
}

.dropdown-menu .dropdown-item {
  padding: 0.5rem;
  border-radius: 0.3125rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  color: #131927;
  font-family: "work-sans", sans-serif;
  display: flex;
  align-items: center;
}

.dropdown-menu .dropdown-item img {
  margin-right: 0.25rem;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:active {
  background-color: #F3F4F6;
}

.dropdown-menu .dropdown-item.color-red {
  color: #F16965;
}

.dropdown-menu .dropdown-item.color-red img {
  position: relative;
  top: -0.0625rem;
}

.ai-chat {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  position: relative;
  display: flex;
  padding-left: 0.25rem;
  flex-direction: column;
}

.ai-chat.new-chat {
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-chat .chat-title {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 2.125rem;
  letter-spacing: 0;
  margin: 0 auto;
  padding: 0.75rem 0.25rem 2rem 0;
  position: sticky;
  top: 0;
  max-width: calc(100% - 15.25rem);
  background-color: #FFFFFF;
  width: 100%;
}

.ai-chat .chat-title span {
  max-width: 51.875rem;
  background-color: #FFFFFF;
  width: 100%;
  display: block;
  margin: auto;
}

.ai-chat .chat-body {
  max-width: calc(100% - 12.875rem);
  margin: 0 auto;
  padding-bottom: 1rem;
  width: 100%;
  flex: 1;
}

.ai-chat .chat-body .chat-body-wrapper {
  display: flex;
  flex-direction: column;
  align-items: end;
  width: 100%;
}

.ai-chat .chat-body .chat-item {
  margin-bottom: 1rem;
  width: 100%;
  padding: 0.625rem 1.25rem;
  border-radius: 1.25rem;
  /*border: 0.0625rem solid #E5E7EA; */
}

.ai-chat .chat-body .chat-item:last-child {
  margin-bottom: 0;
}

.ai-chat .chat-body .chat-item .sender {
  margin-bottom: 0.625rem;
  display: flex;
  align-items: center;
}

.ai-chat .chat-body .chat-item .sender .avatar {
  width: 1.5rem;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.75rem;
  background-color: #726FC8;
  margin-right: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 0.75rem;
  color: #FFFFFF;
  letter-spacing: 0;
  text-transform: uppercase;
}

.ai-chat .chat-body .chat-item .sender .name {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
}

.ai-chat .chat-body .chat-item .content {
  font-family: "work-sans", sans-serif;
}

.ai-chat .chat-body .chat-item .content>*:last-child {
  margin-bottom: 0;
}

.ai-chat .chat-body .chat-item .content .case-header {
  padding: 0.625rem;
  background-color: #F9FAFB;
  margin-bottom: 1rem;
  border-radius: 1rem;
}

.ai-chat .chat-body .chat-item .content .case-header .case-label {
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  color: #4D5461;
  letter-spacing: 0;
}

.ai-chat .chat-body .chat-item .content .case-header .case-label-content {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
}

/* .ai-chat .chat-body .chat-item .content .case-body {
          padding: 0 0.625rem; } */
.ai-chat .chat-body .chat-item .content .case-body>*:last-child {
  margin-bottom: 1rem;
}

.ai-chat .chat-body .chat-item.user {
  width: calc(100% - 8.125rem);
  border-color: #D3E4D3;
  background-color: #D3E4D3;
  margin-right: 22px;
}

.ai-chat .chat-body .chat-item.user .sender .avatar {
  background-color: #43B75D;
}

.ai-chat .chat-footer {
  position: sticky;
  bottom: 0;
  max-width: calc(100% - 14.875rem);
  /* background-color: #FFFFFF; */
  margin: 0 auto;
  width: 100%;
  /* padding-right: 0.25rem;  */
}

.ai-chat .chat-footer .shadow-helper {
  /* background-color: #FFFFFF; */
  width: 100%;
  height: 1.25rem;
  display: block;
  position: relative;
  z-index: -1;
}

.ai-chat .chat-footer .chat-footer-form-wrapper {
  background-color: rgba(255, 255, 255, 0);
}

.ai-chat .chat-footer .chart-form {
  /*max-width: 63.125rem;
      background-color: #FFFFFF;
      margin: auto;*/
}

.ai-chat .chat-footer .chart-form .chat-field {
  width: 100%;
  position: relative;
}

.ai-chat .chat-footer .chart-form .chat-field textarea {
  border: 0.125rem solid #B2B1DB;
  resize: none;
  width: 100%;
  font-family: "work-sans", sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
  padding: 1.0625rem 1.25rem;
  border-radius: 1.25rem;
  display: block;
  padding-right: 10rem;
}

.ai-chat .chat-footer .chart-form .chat-field textarea:focus {
  outline: none;
  box-shadow: none !important;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions {
  position: absolute;
  right: 1.25rem;
  bottom: 0.625rem;
  margin: auto;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .chant-count {
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1rem;
  color: #9EA2AE;
  letter-spacing: 0;
  margin-right: 0.5rem;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .custom-file-input {
  position: relative;
  width: 1rem;
  min-width: 1rem;
  height: 1rem;
  background-image: url(../images/attachment.svg);
  background-repeat: no-repeat;
  background-size: 1rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .custom-file-input input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: pointer;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .chat-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.375rem;
  min-width: 2.375rem;
  height: 2.375rem;
  border-radius: 1.1875rem;
  border: 0 none;
  background-color: #726FC8;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .chat-submit:hover {
  background-color: #131927;
}

.ai-chat .chat-footer .chart-form .chat-field .chat-actions .chat-submit img {
  width: 1rem;
  height: 1rem;
}

.ai-chat .chat-footer .section-slider .card-button {
  border: 0.0625rem solid transparent;
  border-radius: 1.25rem;
  background-color: transparent;
  text-decoration: none;
  display: block;
}

.ai-chat .chat-footer .section-slider .card:hover {
  border-color: #69C57D;
}

.ai-chat .chat-footer .section-slider .card-button.active {
  border-width: 2px 0.5px 0.5px 0.5px;
  border-style: solid;
  border-color: #5D5BB5;
}

.ai-chat .chat-footer .section-slider .card-button.active .card {
  background-color: #FFFFFF;
  border-color: transparent;
}

.ai-chat .chat-footer .section-slider .card-button.active .card .card-title::before {
  display: none;
}

.ai-chat .chat-footer .section-slider .card {
  border: 0.0625rem solid #EFF1EF;
  background-color: #EFF1EF;
  border-radius: 1.25rem;
}

.ai-chat .chat-footer .section-slider .card-body {
  padding: 0.9375rem;
  height: 5rem;
  border-radius: 1.25rem;
  box-shadow: 0px 0.25rem 1.25rem rgba(97, 88, 151, 0.8);
}

.ai-chat .chat-footer .section-slider .card .card-title,
.ai-chat .chat-footer .section-slider .card .card-content {
  margin-bottom: 0.5rem;
}

.ai-chat .chat-footer .section-slider .card .card-title {
  position: relative;
}

.ai-chat .chat-footer .section-slider .card .card-title::before {
  content: '';
  height: 100%;
  width: 0.1875rem;
  background-color: #69C57D;
  display: block;
  position: absolute;
  top: 0;
  left: -0.9375rem;
}

.ai-chat .chat-footer .section-slider .card .case-label {
  display: block;
  margin-bottom: 0.125rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 0.8125rem;
  color: #6D717F;
  letter-spacing: 0;
}

.ai-chat .chat-footer .section-slider .card .case-label-content {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 0.8125rem;
  color: #131927;
  letter-spacing: 0;
}

.custom-checkbox {
  position: relative;
}

.custom-checkbox label {
  position: relative;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5rem;
  padding-left: 2.125rem;
  background-color: transparent;
}

.custom-checkbox label::before {
  border: 0.09375rem solid #4D5461;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.3125rem;
  content: '';
  display: block;
  position: absolute;
  left: 0;
  top: 0;
}

.custom-checkbox input {
  opacity: 0;
  position: absolute;
  left: 0;
  top: 0;
  z-index: -1;
}

.custom-checkbox input:checked+label::before {
  background-color: #726FC8;
  border-color: #726FC8;
  content: '\2714';
  text-align: center;
  color: #FFFFFF;
}

.form-check {
  min-height: auto;
}

.form-check .form-check-input {
  border-color: #9EA2AE;
}

.form-check .form-check-input:checked {
  background-color: #5D5BB5;
  border-color: #5D5BB5;
}

.sidebar {
  position: fixed;
  left: 0;
  top: 72px;
  height: calc(100vh - 72px);
  width: 260px;
  padding: 1.25rem;
  padding-right: 0;
  z-index: 1;
}

@media (max-width: 991.98px) {
  .sidebar {
    background-color: #F6F8FA;
    padding-right: 1.25rem;
    width: 290px;
  }
}

.sidebar .sidebar-wrapper {
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
}

.sidebar .sidebar-wrapper .logo,
.sidebar .sidebar-wrapper .closed-actions {
  display: none;
}

.sidebar .sidebar-wrapper .sidebar-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-right: 1.25rem;
}

.sidebar .sidebar-wrapper .sidebar-search .search-field {
  flex-grow: 1;
  min-width: 0;
  margin-right: 0.625rem;
  position: relative;
}

.sidebar .sidebar-wrapper .sidebar-search .search-field::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0.5rem;
  display: block;
  background-image: url(../images/search.svg);
  background-size: 1.5rem;
  background-repeat: no-repeat;
  width: 1.5rem;
  height: 1.5rem;
  margin: auto;
}

.sidebar .sidebar-wrapper .sidebar-search .search-field input {
  width: 100%;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.5rem;
  letter-spacing: 0;
  border: 0.0625rem solid #D2D5DB;
  border-radius: 2.6875rem;
  padding: 0.1875rem 2.125rem 0.1875rem 0.5rem;
}

.sidebar .sidebar-wrapper .sidebar-search .add-chat-button {
  width: 2rem;
  height: 2rem;
  background-color: #E5E5ED;
  border-radius: 1rem;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar .sidebar-wrapper .sidebar-search .add-chat-button:hover {
  background-color: #D3E4D3;
}

.sidebar .sidebar-wrapper .sidebar-content {
  flex-grow: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 1.25rem;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-item {
  background-color: transparent;
  margin-bottom: 1rem;
  border: 0 none;
  padding: 0.2rem;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-button {
  background-color: transparent;
  border: 0 none;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1rem;
  letter-spacing: 0;
  color: rgba(77, 84, 97, 0.6);
  padding: 0;
  box-shadow: none;
  transition: none;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-button :focus-visible {
  color: #131927;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-button:hover {
  color: #131927;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-button::after {
  background-image: url(../images/nav-arrow-down.svg);
  background-size: 1rem;
  width: 1rem;
  height: 1rem;
}

.sidebar .sidebar-wrapper .sidebar-content .accordion-body {
  padding: 0;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history {
  padding: 0;
  margin: 0;
  list-style: none;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li {
  margin: 0.25rem 0;
  display: flex;
  width: 100%;
  justify-content: space-between;
  flex-wrap: nowrap;
  align-items: center;
  border-radius: 0.375rem;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li>a {
  text-decoration: none;
  padding: 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1rem;
  color: #131927;
  letter-spacing: 0;
  font-family: "work-sans", sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li:hover {
  background-color: #D4D1FF;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li.active {
  background-color: #5D5BB5;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li.active>a {
  font-weight: 700;
  color: #FFFFFF;
}

.sidebar .sidebar-wrapper .sidebar-content .chat-history>li .chat-dropdown {
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background-color: transparent;
  padding: 0;
  border-radius: 0.375rem;
}

.sidebar.closed {
  padding-top: 0;
  padding-left: 0;
  padding-right: 0;
  width: 68px;
  display: none;
}

@media (min-width: 992px) {
  .sidebar.closed {
    display: block;
  }
}

.sidebar.closed .sidebar-wrapper {
  align-items: center;
}

.sidebar.closed .sidebar-wrapper .logo {
  display: block;
  margin-bottom: 1.875rem;
}

.sidebar.closed .sidebar-wrapper .closed-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sidebar.closed .sidebar-wrapper .closed-actions li {
  margin-bottom: 0.625rem;
}

.sidebar.closed .sidebar-wrapper .closed-actions li .closed-actions-button {
  width: 2rem;
  height: 2rem;
  background-color: #E5E5ED;
  border-radius: 1rem;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar.closed .sidebar-wrapper .closed-actions li .closed-actions-button:hover {
  background-color: #D3E4D3;
}

.sidebar.closed .sidebar-wrapper .closed-actions li .closed-actions-button.active {
  background-color: #FFFFFF;
}

.sidebar.closed .sidebar-wrapper .sidebar-search {
  display: none;
}

.sidebar.closed .sidebar-wrapper .sidebar-content .accordion {
  display: none;
}

.create-headnote-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.custom-page {
  width: 100vw;
  height: 100vh;
  background-image: url(../images/bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.custom-page h1,
.custom-page h2,
.custom-page h3,
.custom-page h4,
.custom-page h5,
.custom-page h6 {
  margin-bottom: 0.625rem;
  margin-top: 0;
}

.page-bg {
  width: 100vw;
  min-height: 100vh;
  background-image: url(../images/bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.page-terms {
  width: 100%;
  height: 100%;
  position: relative;
}

.page-terms .page-terms-wrapper {
  height: 96%;
  width: 95%;
  max-width: 64rem;
  max-height: 49.875rem;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  margin: auto;
  background-color: #FFFFFF;
  border-radius: 1.875rem;
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
}

.page-terms .page-terms-wrapper .page-terms-header {
  margin-bottom: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-header .logo {
  margin-bottom: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-header .header-note {
  padding: 0.625rem 1.25rem;
  background-color: #EFF1EF;
  border-radius: 2.5rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.page-terms .page-terms-wrapper .page-terms-header .header-note p {
  margin: 0;
}

.page-terms .page-terms-wrapper .page-terms-body {
  min-height: 0;
  margin-bottom: 1rem;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-body .terms-heading {
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.page-terms .page-terms-wrapper .page-terms-footer {
  border-top: 0.0625rem solid #E5E7EA;
  padding-top: 1.25rem;
}

.page-terms .page-terms-wrapper .page-terms-footer .page-terms-footer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.login-wrapper {
  padding: 1.875rem;
  background-color: #fff;
  border-radius: 1.875rem;
  max-width: 23.75rem;
  min-width: 23.75rem;
}

.login-wrapper .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
}

.login-wrapper .form-control {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
  border-radius: 0.875rem;
  border: 0.125rem solid #9EA2AE;
}

.login-wrapper .form-control:focus {
  box-shadow: none;
  border-color: #726fc8;
}

.login-wrapper .lg-variant {
  height: 2.25rem;
}

.login-wrapper sup {
  color: #ee443f;
}

.login-wrapper .message-txt {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #2E2E2E;
  letter-spacing: 0;
}

.page-bg {
  width: 100vw;
  height: 100vh;
}

/* Login Page Styles here */

.custom-page {
  width: 100vw;
  height: 100vh;
  background-image: url(../images/bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.custom-page h1,
.custom-page h2,
.custom-page h3,
.custom-page h4,
.custom-page h5,
.custom-page h6 {
  margin-bottom: 0.625rem;
  margin-top: 0;
}

.page-bg {
  width: 100vw;
  height: 100vh;
  background-image: url(../images/bg.png);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.page-terms {
  width: 100%;
  height: 100%;
  position: relative;
}

.page-terms .page-terms-wrapper {
  height: 96%;
  width: 95%;
  max-width: 64rem;
  max-height: 49.875rem;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  margin: auto;
  background-color: #FFFFFF;
  border-radius: 1.875rem;
  padding: 1.875rem;
  display: flex;
  flex-direction: column;
}

.page-terms .page-terms-wrapper .page-terms-header {
  margin-bottom: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-header .logo {
  margin-bottom: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-header .header-note {
  padding: 0.625rem 1.25rem;
  background-color: #EFF1EF;
  border-radius: 2.5rem;
  text-align: right;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
}

.page-terms .page-terms-wrapper .page-terms-header .header-note p {
  margin: 0;
}

.page-terms .page-terms-wrapper .page-terms-body {
  min-height: 0;
  margin-bottom: 1rem;
  flex-grow: 1;
  overflow-y: auto;
  padding-right: 1rem;
}

.page-terms .page-terms-wrapper .page-terms-body .terms-heading {
  margin-bottom: 1.25rem;
  font-weight: 500;
}

.page-terms .page-terms-wrapper .page-terms-footer {
  border-top: 0.0625rem solid #E5E7EA;
  padding-top: 1.25rem;
}

.page-terms .page-terms-wrapper .page-terms-footer .page-terms-footer-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
}

.login-wrapper {
  padding: 1.875rem;
  background-color: #fff;
  border-radius: 1.875rem;
  max-width: 23.75rem;
  min-width: 23.75rem;
}

.login-wrapper .form-label {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
}

.login-wrapper .form-control {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #131927;
  letter-spacing: 0;
  border: 0.125rem solid #9EA2AE;
}

.login-wrapper .form-control:focus {
  box-shadow: none;
  border-color: #726fc8;
}

.login-wrapper .lg-variant {
  height: 2.25rem;
}

.login-wrapper sup {
  color: #ee443f;
}

.login-wrapper .message-txt {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  color: #2E2E2E;
  letter-spacing: 0;
}

.page-bg {
  width: 100vw;
  height: 100vh;
}

/* Pre loader */
.spinner-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.65);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner-overlay .spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  transform: none !important;
  top: 0 !important;
  width: 50px;
  height: 50px;
}

.spinner-overlay .dot {
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #4C4A92;
  border-radius: 50%;
  animation: dot-spin 1.5s linear infinite;
}

.spinner-overlay .dot:nth-child(1) {
  animation-delay: 0s;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.spinner-overlay .dot:nth-child(2) {
  animation-delay: 0.2s;
  top: 25%;
  left: 75%;
}

.spinner-overlay .dot:nth-child(3) {
  animation-delay: 0.4s;
  top: 50%;
  left: 100%;
  transform: translateX(-100%);
}

.spinner-overlay .dot:nth-child(4) {
  animation-delay: 0.6s;
  top: 75%;
  left: 75%;
}

.spinner-overlay .dot:nth-child(5) {
  animation-delay: 0.8s;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
}

.spinner-overlay .dot:nth-child(6) {
  animation-delay: 1s;
  top: 75%;
  left: 25%;
}

.spinner-overlay .dot:nth-child(7) {
  animation-delay: 1.2s;
  top: 50%;
  left: 0;
}

.spinner-overlay .dot:nth-child(8) {
  animation-delay: 1.4s;
  top: 25%;
  left: 25%;
}

@keyframes dot-spin {
  0% {
    opacity: 0.3;
    transform: scale(0.8);
  }

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

  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
}

.otp-msg {
  font-family: 'work-sans', sans-serif;
  padding: 0.8rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  background-color: #ccffcc;
}

.feedback-font {
  font-family: 'Work Sans', sans-serif !important;
  border-radius: 0.625rem;
}

@media (min-width: 1400px) and (max-width: 1599.98px) {
  .ai-chat .chat-title {
    width: calc(100% - 27.875rem);
  }

  .ai-chat .chat-body {
    width: calc(100% - 25.5rem);
  }

  .ai-chat .chat-footer {
    width: calc(100% - 27.875rem);
  }
}

@media (min-width: 1600px) {
  .ai-chat .chat-title {
    width: calc(100% - 53.875rem);
  }

  .ai-chat .chat-body {
    width: calc(100% - 51rem);
  }

  .ai-chat .chat-footer {
    width: calc(100% - 53.875rem);
  }
}

.alert {
  border-radius: 1rem;
}

sup {
  font-size: 1rem;
  position: relative;
  top: 1px;
}

body.fs-small {
  font-size: 0.8rem;
}

/*Small font*/
/* Chat Header  */
body.fs-small .ai-chat .chat-title {
  font-size: 1.2rem;
}

/* Chat Content */
body.fs-small .ai-chat .chat-body .chat-item .content .case-header .case-label-content {
  font-size: 0.8rem;
}

/* Sidebar Header */
body.fs-small .sidebar .sidebar-wrapper .sidebar-content .accordion-button {
  font-size: 0.7rem;
}

/* Sidebar list Title */
body.fs-small .sidebar .sidebar-wrapper .sidebar-content .chat-history>li>a {
  font-size: 0.8rem;
}

body.fs-small .ai-chat .chat-body .chat-item .content .case-header .case-label {
  font-size: 0.75rem;
}

body.fs-small .btn.btn-link {
  font-size: 0.75rem;
}

body.fs-small .ai-chat .chat-footer .chart-form .chat-field textarea {
  font-size: 0.8rem;
}

body.fs-small .header .header-right .right .account-dropdown {
  font-size: 0.55rem;
}

/*medium font*/
/* Chat Header  */
body.fs-medium .ai-chat .chat-title {
  font-size: 1.3rem;
}

/* Chat Content */
body.fs-medium .ai-chat .chat-body .chat-item .content .case-header .case-label-content {
  font-size: 0.9rem;
}

/* Sidebar Header */
body.fs-medium .sidebar .sidebar-wrapper .sidebar-content .accordion-button {
  font-size: 0.8rem;
}

/* Sidebar list Title */
body.fs-medium .sidebar .sidebar-wrapper .sidebar-content .chat-history>li>a {
  font-size: 0.9rem;
}

body.fs-medium .ai-chat .chat-body .chat-item .content .case-header .case-label {
  font-size: 0.85rem;
}

body.fs-medium .btn.btn-link {
  font-size: 0.85rem;
}

body.fs-medium .ai-chat .chat-footer .chart-form .chat-field textarea {
  font-size: 0.9rem;
}

body.fs-medium .header .header-right .right .account-dropdown {
  font-size: 0.65rem;
}

/* For Large Font */
/* Chat Header  */
body.fs-large .ai-chat .chat-title {
  font-size: 1.4rem;
}

/* Chat Content */
body.fs-large .ai-chat .chat-body .chat-item .content .case-header .case-label-content {
  font-size: 1rem;
}

/* Sidebar Header */
body.fs-large .sidebar .sidebar-wrapper .sidebar-content .accordion-button {
  font-size: 0.9rem;
}

/* Sidebar list Title */
body.fs-large .sidebar .sidebar-wrapper .sidebar-content .chat-history>li>a {
  font-size: 1rem;
}

body.fs-large .ai-chat .chat-body .chat-item .content .case-header .case-label {
  font-size: 0.95rem;
}

body.fs-large .btn.btn-link {
  font-size: 0.95rem;
}

body.fs-large .ai-chat .chat-footer .chart-form .chat-field textarea {
  font-size: 1rem;
}

body.fs-large .header .header-right .right .account-dropdown {
  font-size: 0.75rem;
}

/* For XLarge Font */
/* Chat Header  */
body.fs-xlarge .ai-chat .chat-title {
  font-size: 1.5rem;
}

/* Chat Content */
body.fs-xlarge .ai-chat .chat-body .chat-item .content .case-header .case-label-content {
  font-size: 1.1rem;
}

/* Sidebar Header */
body.fs-xlarge .sidebar .sidebar-wrapper .sidebar-content .accordion-button {
  font-size: 1rem;
}

/* Sidebar list Title */
body.fs-xlarge .sidebar .sidebar-wrapper .sidebar-content .chat-history>li>a {
  font-size: 1.1rem;
}

body.fs-xlarge .ai-chat .chat-body .chat-item .content .case-header .case-label {
  font-size: 1.05rem;
}

body.fs-xlarge .btn.btn-link {
  font-size: 1.05rem;
}

body.fs-xlarge .ai-chat .chat-footer .chart-form .chat-field textarea {
  font-size: 1.1rem;
}

body.fs-xlarge .header .header-right .right .account-dropdown {
  font-size: 0.85rem;
}

body.fs-normal {
  font-size: 1rem;
}



body.fs-large {
  font-size: 1.125rem;
}

body.fs-xlarge {
  font-size: 1.25rem;
}

/* ===============================
   Subscription Expired – UI Lock
   =============================== */

/* Disabled textarea */
.subscription-expired {
  background-color: #f8d7da !important;
  border-color: #dc3545 !important;
  color: #721c24 !important;
  cursor: not-allowed;
}

/* Prevent focus glow */
.subscription-expired:focus {
  box-shadow: none !important;
  outline: none !important;
}

/* Disabled send button */
.subscription-expired~.chat-actions .chat-submit {
  background-color: #adb5bd !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Disabled character counter */
.subscription-expired~.chat-actions .chant-count {
  color: #f57f8bf6;
}

/* Disable “+ New Chat” button */
body[data-subscription-expired="true"] .add-chat-button {
  background-color: #e0e0e0 !important;
  cursor: not-allowed;
  pointer-events: none;
}

/* Disable closed sidebar “New Thread” button */
body[data-subscription-expired="true"] .closed-actions-button {
  background-color: #e0e0e0 !important;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.6;
}


/* =========================================================
   LEGAL RESEARCH – MOBILE RESPONSIVE FIX
========================================================= */
@media (max-width: 991.98px) {

  /* ---------- MAIN LAYOUT ---------- */
  .main-content {
    padding: 0px 0.75rem 0.75rem 0.75rem !important;
    /*height: 100vh;*/
    overflow: hidden;
  }

  .main-content.closed {
    padding-left: 0.75rem !important;
  }

  .ai-chat .chat-title {
    padding-left: 1rem;
  }

  /* ---------- SIDEBAR AS OVERLAY ---------- */
  .sidebar {
    position: fixed !important;
    top: 72px;
    left: 0;
    height: calc(100vh - 72px);
    width: min(85vw, 320px) !important;

    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 1200;

    background-color: #F6F8FA;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  .ai-chat .chat-footer .shadow-helper {
    height: 0rem;
  }

  /* ---------- REMOVE CHAT WIDTH CAPS ---------- */
  .ai-chat,
  .ai-chat .chat-title,
  .ai-chat .chat-body,
  .ai-chat .chat-footer {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .ai-chat .chat-title span {
    max-width: 100% !important;
  }

  /* ---------- CHAT BODY ---------- */
  .ai-chat {
    padding-left: 0 !important;
  }

  .ai-chat .chat-body {
    padding: 0 0.25rem 1rem;
  }

  .ai-chat .chat-body .chat-item.user {
    width: 100% !important;
    margin-right: 0 !important;
  }

  /* ---------- FOOTER & TEXTAREA ---------- */
  .ai-chat .chat-footer {
    padding: 0.25rem 0.25rem;
    padding-top: 1rem;
  }

  .ai-chat .chat-footer .chart-form .chat-field textarea {
    padding: 0.75rem 0.9rem !important;
    padding-right: 6rem !important;
    /* space for buttons */
    font-size: 1rem;
    line-height: 1.3rem;

    min-height: 44px;
    max-height: 140px;
    height: auto;
    overflow-y: auto;
  }

  .ai-chat .chat-footer .chart-form .chat-field textarea:focus {
    outline: none;
    box-shadow: none;
  }

  .ai-chat .chat-footer .chat-actions {
    right: 0.75rem;
    bottom: 0.5rem;
    gap: 0.5rem;
  }

  .ai-chat .chat-footer .chat-submit {
    width: 2.1rem;
    height: 2.1rem;
    min-width: 2.1rem;
  }

  /* ---------- SLIDER ---------- */
  .slider-section-wrapper {
    max-width: 100%;
    padding: 0 0.75rem;
  }

  /* ---------- HIDE CHARACTER COUNT ON MOBILE ---------- */
  .chant-count {
    display: none !important;
  }
}


/* =========================================================
   LOGIN PAGE – MOBILE KEYBOARD FIX
========================================================= */
:root {
  --app-height: 100vh;
}

.page-bg {
  min-height: var(--app-height);
  /* display: flex;
  align-items: center;
  justify-content: center; */
  padding: 24px 16px;
}

.login-wrapper {
  width: min(420px, 92vw);
}


/* =========================================================
   MOBILE: Fix send button spacing + vertically center it
========================================================= */
@media (max-width: 991.98px) {

  /* Make sure chat-field is the positioning container */
  .ai-chat .chat-footer .chart-form .chat-field {
    position: relative;
  }

  /* Give extra breathing room so button never touches border */
  .ai-chat .chat-footer .chart-form .chat-field textarea {
    padding-right: 3.75rem !important;
    /* was 6rem */
  }

  /* Center the action cluster vertically relative to textarea */
  .ai-chat .chat-footer .chat-actions {
    position: absolute;
    right: 1rem !important;
    /* slightly inward */
    top: 50% !important;
    /* vertical center */
    bottom: auto !important;
    /* override earlier bottom-based placement */
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  /* Tiny separation so button never feels stuck to border */
  .ai-chat .chat-footer .chat-submit {
    margin-left: 0.3rem;
  }

  .main-content-wrapper {
    padding: 1.25rem 0.75rem;
  }
}


@media (max-width: 991.98px) {

  /* Use flexbox to create a stable app shell */
  body {
    display: flex !important;
    flex-direction: column !important;
    height: var(--app-h, 100vh) !important;
    overflow: hidden !important;
    position: fixed !important;
    /* Lock body in place */
    width: 100% !important;
    top: 0;
    left: 0;
    overscroll-behavior: none !important;
    touch-action: pan-y !important;
    /* Allow only vertical panning, disable pinch-zoom */
  }

  /* Header stays at the top of the flex container */
  .header {
    position: fixed !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    height: 72px;
    padding: 0 0.75rem !important;
    z-index: 3000;
    flex: none;
    transition: transform 0.3s ease;
  }

  /* Main content fills the remaining space and handles its own scroll */
  .main-content {
    position: fixed !important;
    top: 72px;
    left: 0 !important;
    right: 0 !important;
    height: calc(var(--app-h, 100vh) - 72px) !important;
    bottom: auto !important;
    /* Use height instead of bottom for stability */
    padding: 0 0.75rem 0.75rem 0.75rem !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    transition: top 0.3s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .main-content::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  /* When keyboard is active, slide header out and expand main area */
  /* Only hide header when keyboard is open AND chat body has content */
  body.keyboard-visible.chat-active .header {
    transform: translateY(-72px);
  }

  body.keyboard-visible .main-content {
    top: 0 !important;
    height: var(--app-h, 100vh) !important;
  }

  body.keyboard-visible:not(.chat-active) .main-content {
    overflow: hidden !important;
    overflow-y: hidden !important;
  }

  body.keyboard-visible .chat-title,
  body.keyboard-visible .ai-chat .chat-title {
    position: static !important;
    top: auto !important;
  }

  body.keyboard-visible:not(.chat-active) .main-content-wrapper,
  body.keyboard-visible:not(.chat-active) .ai-chat {
    overflow: hidden !important;
  }

  body.keyboard-visible:not(.chat-active) .main-content::-webkit-scrollbar,
  body.keyboard-visible:not(.chat-active) .main-content-wrapper::-webkit-scrollbar,
  body.keyboard-visible:not(.chat-active) .ai-chat::-webkit-scrollbar,
  body.keyboard-visible:not(.chat-active) *::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
  }

  body.keyboard-visible.chat-active .main-content,
  body.keyboard-visible.chat-active .main-content-wrapper,
  body.keyboard-visible.chat-active .ai-chat {
    overflow: hidden !important;
  }

  body.keyboard-visible.chat-active .chat-messages-scroll {
    flex: 1 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.keyboard-visible.chat-active .chat-body {
    overflow: visible !important;
    flex: none !important;
  }

  .main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 0.75rem !important;
  }

  .ai-chat {
    flex: 1;
    display: flex;
    flex-direction: column;
  }

  .ai-chat > div:first-child {
    flex: 0 0 auto;
  }

  .greeting-block {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 0;
  }

  body:not(.chat-active) .greeting-block {
    flex: 1;
  }

  body.keyboard-visible:not(.chat-active) .chat-messages-scroll {
    flex: 0 0 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  body.keyboard-visible:not(.chat-active) .greeting-inner {
    padding-top: 3rem;
  }

  .greeting-block .row {
    width: 100%;
    margin: 0;
    justify-content: center;
  }

  .greeting-block .greeting-inner,
  .greeting-block .header-content {
    width: 100%;
    text-align: center;
  }

  .greeting-block .header-content {
    max-width: 100%;
  }

  /* Footer stays at the bottom of the chat */
  .chat-footer {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 10;
    margin-top: auto;
    /* background-color: #fff; */
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom)) !important;
  }

  /* Ensure sidebar still works as an overlay */
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    height: 100% !important;
    z-index: 4000;
  }
}

/* =========================
   HEADNOTE PAGE – SCROLL FIX
   ========================= */

body.headnote-page {
  overflow: hidden;
  /* ✅ disables outer page scroll */
}

body.headnote-page .content-main {
  height: calc(100vh - 140px);
  /* ✅ scrollable content area */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}