#compare_calculator {
  font-size: 1rem;
}

.compare_container {
  position: relative;
  background: #f1f1f1;
  padding: 20px;
  border-radius: 10px;
}

#compare_calculator.thin .compare_container {
  background: transparent;
  padding: 0;
}

.compare_container .tabs {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-bottom: 10px;
}

.compare_container .tabs button {
  padding: 15px 30px;
  font-size: 1.375em;
  color: #6b6b6b;
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  cursor: pointer;
}

.compare_container .tabs button.active,
.compare_container .tabs button:hover {
  background: #00c99f;
  color: white;
  border-color: #000;
}

.compare_container .tabs button.active {
  font-weight: bold;
}

.custom_radio {
  display: flex;
  flex-direction: column;
  margin: 15px 0;
  flex-wrap: wrap;
  gap: 10px;
}

.custom_radio div {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  border: 1px solid #000;
  padding: 10px;
  border-radius: 10px;
  color: #6b6b6b;
  font-size: 1.125em;
}

.custom_radio div b {
  color: #000;
}

.custom_radio label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.custom_radio label span {
  display: flex;
  align-items: center;
}

.custom_radio label span::before {
  content: "";
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 1px solid #000;
  border-radius: 50%;
  background-color: #fff;
  margin-left: 8px;
  vertical-align: middle;
}

.custom_radio label input[type="radio"] {
  display: none;
}

.custom_radio label input[type="radio"]:checked + span::before {
  background-color: #2ad09d;
  border-color: #000;
}

.custom_radio input[type="radio"]:checked + span {
  font-weight: bold;
  color: #000;
}

.compare_container .left-card {
  max-width: 226px;
  background: #e7e7e7;
  padding: 15px;
  border-radius: 10px;
  text-align: center;
  float: left;
  display: flex;
  gap: 25px;
  flex-direction: column;
  align-items: center;
}

.compare_container .left-card img {
  max-height: 54px;
  width: auto;
}

.compare_container .left-card .primaryButton {
  padding: 9px 18px;
}

.compare_container .left-card .title {
  font-size: 1.5em;
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}

.compare_container .left-card .total_box {
  background: #e7e7e7;
  border: 1px solid #000;
  padding: 15px 25px;
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  line-height: normal;
  box-shadow: 0px 0px 43px 0px rgba(42, 208, 157, 1);
}

.compare_container .left-card .total_box .value {
  font-weight: bold;
  font-size: 1.875em;
}

.compare_container .left-card .total_box span {
  font-size: 1.125em;
  color: #969696;
}

.compare_container .left-card .company_name {
  font-size: 1.5em;
  font-weight: bold;
}

.compare_container .chart-container {
  display: flex;
  gap: 20px;
}

#chart_div {
  height: 100%;
}

.compare_container .chart-area {
  min-height: 520px;
  flex: 1;
  position: relative;
}

.compare_container .chart-area .yLabel {
  position: absolute;
  left: 10px;
  top: 0;
  font-size: 1.125em;
  color: #000;
  font-weight: bold;
  z-index: 1;
}

.compare_container #logoLabels {
  position: absolute;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 50px;
  font-size: 1.125em;
  flex-direction: row-reverse;
}

.compare_container #logoLabels .logoLabel {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.compare_container #logoLabels img {
  height: 20px;
  width: auto;
}

#compare_button_area {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 0.3s ease;
  overflow: hidden;
  background-image: linear-gradient(rgb(255, 255, 255) 0%, rgba(255, 255, 255, 0.5) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  backdrop-filter: blur(7.5px);
  -webkit-backdrop-filter: blur(7.5px);
  position: fixed;
  bottom: 0;
  right: 0;
  width: 100%;
  padding: 30px 0px;
  z-index: 1000;
  font-size: 1rem;
  transform: translateY(100%);
  opacity: 0;
  visibility: hidden;
}

#compare_button_area.show {
  transform: translateY(0%);
  opacity: 1;
  visibility: visible;
}

#compare_button_area .primaryButton {
  padding: 5px 60px;
}

/* Fund Comparison Table Styles */
.extend_container {
  font-size: 1rem;
}

.extend_container .fund_comparison_table {
  background: #f8f9fa;
  font-size: 1.125em;
  border: 1px solid #000;
  border-radius: 12px;
}

.extend_container .table_header,
.extend_container .table_row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #000000;
  min-height: 60px;
  padding: 0;
}

.extend_container .table_row:last-child {
  border-bottom: 0;
}

.extend_container .table_header {
  background: #e7e7e7;
  border-top-left-radius: 12px;
  border-top-right-radius: 12px;
  white-space: nowrap;
}

/* Sortable header styling */
.extend_container .table_header .sortable {
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  padding: 15px 10px;
  gap: 5px;
}

.extend_container .table_header .sortable:hover {
  background: rgba(0, 0, 0, 0.05);
}

.extend_container .table_header .sortable .header_text {
  flex: 1;
  text-align: center;
}

.extend_container .table_header .sortable .sort_arrows {
  display: flex;
  flex-direction: column;
  font-size: 0.7em;
  line-height: 0.8;
  margin-left: 3px;
  width: 8px;
}

.extend_container .table_header .sortable .arrow_up,
.extend_container .table_header .sortable .arrow_down {
  color: #ccc;
  transition: color 0.2s ease;
  cursor: pointer;
}

.extend_container .table_header .sortable .arrow_up:hover,
.extend_container .table_header .sortable .arrow_down:hover {
  color: #666;
}

.extend_container .table_header .sortable.sort_asc .arrow_up {
  color: #00c99f;
}

.extend_container .table_header .sortable.sort_desc .arrow_down {
  color: #00c99f;
}

.extend_container .table_row {
  background: #f1f1f1;
  transition: background-color 0.2s ease;
  font-weight: bold;
}

.extend_container .table_row:hover,
.extend_container .table_row.highlighted {
  background: #80e5c3;
}

.extend_container .table_row:last-child {
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
}

/* Column widths and styling */
.extend_container .col_compare {
  flex: 0 0 12%;
  padding: 15px 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.extend_container .table_header .col_compare {
  border-top-right-radius: 12px;
}

.extend_container .col_name {
  flex: 1;
  min-width: 25%;
  padding: 15px 20px;
  text-align: right;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
}

.extend_container .col_name .search-input-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
}

.extend_container .col_name .fund-search-input {
  width: 100%;
  padding: 0 38px 0 12px; /* Added right padding for icon */
  border: none;
  border-bottom: 1px solid #8d8c8c;
  background: transparent;
}

.extend_container .col_name .search-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #8d8c8c;
  pointer-events: none;
}

.extend_container .col_name .fund-search-input:focus {
  outline: none;
  border-color: #000;
}

.extend_container .col_name .fund-search-input:focus + .search-icon {
  color: #000;
}

.extend_container .col_name .fund-search-input::placeholder {
  color: #000;
}

.extend_container .table_row .col_name {
  justify-content: flex-start;
  flex-direction: row;
}

.extend_container .col_5y,
.extend_container .col_3y,
.extend_container .col_1y,
.extend_container .col_ytd,
.extend_container .col_month {
  flex: 0 0 10%;
  white-space: nowrap;
  padding: 15px 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.extend_container .col_action {
  flex: 0 0 12%;
  padding: 15px 10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Override padding for sortable headers since they already have padding */
.extend_container .table_header .sortable.col_5y,
.extend_container .table_header .sortable.col_3y,
.extend_container .table_header .sortable.col_1y,
.extend_container .table_header .sortable.col_ytd,
.extend_container .table_header .sortable.col_month {
  padding: 15px 10px;
}

/* Add Preference Button */
.extend_container .add_preference {
  background: #80e5c3;
  border: none;
  color: #000;
  text-decoration: none;
  border-radius: 5px;
  padding: 0.2rem 0.75rem;
  font-size: 0.875em;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
}

.extend_container .add_preference.selected,
.extend_container .add_preference:hover,
.extend_container .table_row:hover .add_preference {
  background: #000;
  color: white;
  text-decoration: none;
}

/* Fund Name */
.extend_container .fund_name {
  color: #3529b5;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
}

.extend_container .fund_name:hover {
  color: #3529b5;
  text-decoration: underline;
}

/* Custom Checkbox */
.extend_container .checkbox_container {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  position: relative;
  user-select: none;
  font-size: 0.875em;
  gap: 7px;
}

.extend_container .checkbox_container input[type="checkbox"] {
  opacity: 0;
  position: absolute;
  width: 0;
  height: 0;
}

.extend_container .checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 24px;
  background: #f8f9fa;
  border: 1px solid #000;
  border-radius: 2px;
  font-weight: bold;
  color: #6c757d;
  transition: all 0.2s ease;
  box-shadow: 0px 5px 5px 0px rgba(128, 229, 195, 0.75);
}

.extend_container .checkmark:after {
  content: "✓";
  opacity: 0;
  transition: opacity 0.2s ease;
}

.extend_container .checkbox_container input[type="checkbox"]:checked + .checkmark:after {
  opacity: 1;
}

.comparison-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999991;
}

.comparison-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.comparison-popup-content {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-height: 100vh;
  background-color: white;
  z-index: 10001;
  overflow-y: auto;
}

.comparison-popup-header {
  position: sticky;
  position: -webkit-sticky;
  position: -moz-sticky;
  position: -ms-sticky;
  position: -o-sticky;
  top: 0;
  right: 0;
  padding: 10px 30px 0 30px;
  z-index: 10002;
  background: #fff;
  display: flex;
}

.comparison-popup-close {
  display: inline-flex;
  align-items: center;
  color: #000;
  gap: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.comparison-popup-close:hover {
  color: #80e5c3;
}

.comparison-popup-body {
  padding: 10px 30px 30px;
  min-height: calc(100vh - 100px);
}

.comparison-popup-body h2 {
  text-align: center;
  margin-bottom: 40px;
  font-size: 28px;
}

.comparison-content {
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 4px 12px rgba(128, 128, 128, 0.15);
  background: #fff;
}

/* Prevent body scrolling when popup is open */
body.popup-open {
  overflow: hidden;
}

/* Loading spinner styles */
.comparison-popup-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 30px;
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.error-message {
  text-align: center;
  padding: 20px;
  color: #e74c3c;
}

/* Comparison table styles */
.comparison-table {
  margin-top: 20px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.comparison-table-header,
.comparison-table-row {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1fr 1fr 1fr 1fr;
  gap: 10px;
  padding: 15px 20px;
  align-items: center;
}

.comparison-table-header {
  background-color: #f8f9fa;
  font-weight: bold;
  border-bottom: 2px solid #dee2e6;
}

.comparison-table-row {
  background-color: white;
  border-bottom: 1px solid #e9ecef;
  transition: background-color 0.2s ease;
}

.comparison-table-row:hover {
  background-color: #f8f9fa;
}

.comparison-table-row:last-child {
  border-bottom: none;
}

.fund-info strong {
  font-size: 16px;
}

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

.company-logo {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 4px;
}

.col-month,
.col-ytd,
.col-3y,
.col-5y {
  font-weight: 600;
  text-align: center;
}

.no-selection-message {
  text-align: center;
  padding: 40px 20px;
  color: #666;
}

.no-selection-message p {
  margin: 10px 0;
  font-size: 16px;
}

.no-selection-message p:first-child {
  font-weight: bold;
  font-size: 1.125em;
}

/* Comparison Table Layout - Grid Based for Perfect Alignment */
.comparison-popup .comparison-cards-container {
  display: grid;
  grid-template-columns: repeat(4, 25%);
  grid-auto-columns: 25%;
  grid-template-rows: minmax(120px, auto) repeat(8, minmax(50px, auto));
  border-radius: 0;
  overflow-x: auto;
  background: #fff;
  width: 100%;
  position: relative;
}

/* Scroll arrows for horizontal navigation */
.comparison-popup .scroll-arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  background: #80e5c3;
  border: 1px solid #000;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  transition: all 0.2s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.comparison-popup .scroll-arrows:hover {
  background: #000;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.comparison-popup .scroll-arrows.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.comparison-popup .scroll-arrow-left {
  left: 10px;
}

.comparison-popup .scroll-arrow-right {
  right: 10px;
}

.comparison-popup .scroll-arrows::before {
  content: "";
  display: block;
}

.comparison-popup .scroll-arrow-left::before {
  content: "←";
}

.comparison-popup .scroll-arrow-right::before {
  content: "→";
}

/* Labels column */
.comparison-popup .comparison-labels {
  grid-column: 1;
  grid-row: 1 / -1;
  border-right: 1px solid #cfcee5;
  position: sticky;
  position: -webkit-sticky;
  position: -moz-sticky;
  position: -ms-sticky;
  position: -o-sticky;
  inset-inline-start: 0;
  display: table-cell;
  background: #fff;
  z-index: 11;
}

.comparison-popup .comparison-labels-header {
  grid-column: 1;
  grid-row: 1;
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #e4e1fc;
  background: #ececec;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 25px;
}

.comparison-popup .comparison-labels-header .share_buttons {
  display: flex;
  gap: 12px;
  flex-direction: column;
  width: 100%;
}

.comparison-popup .comparison-labels-header img {
  max-width: 100%;
  max-height: 4rem;
  object-fit: contain;
}

.comparison-popup .comparison-labels-body {
  display: contents;
}

.comparison-popup .label-item {
  grid-column: 1;
  padding: 1rem;
  border-bottom: 1px solid #cfcee5;
  font-size: 1.125em;
  font-weight: bold;
  display: flex;
  align-items: center;
  word-break: break-word;
  hyphens: auto;
}

.comparison-popup .label-item:nth-child(1) {
  grid-row: 2;
}
.comparison-popup .label-item:nth-child(2) {
  grid-row: 3;
}
.comparison-popup .label-item:nth-child(3) {
  grid-row: 4;
}
.comparison-popup .label-item:nth-child(4) {
  grid-row: 5;
}
.comparison-popup .label-item:nth-child(5) {
  grid-row: 6;
}
.comparison-popup .label-item:nth-child(6) {
  grid-row: 7;
}
.comparison-popup .label-item:nth-child(7) {
  grid-row: 8;
}
.comparison-popup .label-item:nth-child(8) {
  grid-row: 9;
}

.comparison-popup .label-item:last-child {
  border-bottom: none;
}

/* Fund columns */
.comparison-popup .comparison-card {
  display: contents;
  border-right: 1px solid #cfcee5;
  background: #fff;
  min-width: 0; /* Prevent grid overflow */
}

.comparison-popup .comparison-card:last-child {
  border-right: none;
}

/* Fund header with logo and title */
.comparison-popup .comparison-card-header {
  grid-row: 1;
  padding: 2.25rem;
  text-align: center;
  border-bottom: 1px solid #e4e1fc;
  border-right: 1px solid #e4e1fc;
  background: #fff;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* X close button for each fund */
.comparison-popup .fund-remove-btn {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  font-size: 1.5em;
  color: #000;
  cursor: pointer;
  width: 1.5rem;
  height: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: none;
  background: transparent;
  font-weight: bold;
  border-radius: 3px;
  z-index: 10;
}

.comparison-popup .fund-remove-btn:hover {
  color: #dc3545;
}

/* Hide remove button when there's only one fund */
.comparison-popup .comparison-cards-container[data-fund-count="1"] .fund-remove-btn {
  display: none !important;
}

/* Adjust grid layout for single fund comparison */
.comparison-popup .comparison-cards-container[data-fund-count="1"] {
  grid-template-columns: minmax(120px, 400px) 1fr;
}

/* Animation for removing fund columns */
.comparison-popup .comparison-card-header.removing,
.comparison-popup .performance-item.removing {
  animation: slideOutAndShrink 0.4s ease-in-out forwards;
}

@keyframes slideOutAndShrink {
  0% {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
  50% {
    opacity: 0.3;
    transform: scale(0.98) translateX(5px);
  }
  100% {
    opacity: 0;
    transform: scale(0.95) translateX(10px);
    visibility: hidden;
  }
}

/* Company logo */
.comparison-popup .company-logo-wrapper {
  margin-bottom: 0.25rem;
  max-width: 100%;
}

.comparison-popup .company-logo-large {
  max-width: 100%;
  height: 3.5rem;
  object-fit: contain;
  display: block;
}

/* Fund details */
.comparison-popup .fund-details {
  text-align: center;
  margin-bottom: auto;
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.6;
}

.comparison-popup .fund-details .fund-name {
  font-size: 1.125em;
  margin-bottom: 0.25rem;
  line-height: 1.2;
  word-break: break-word;
  hyphens: auto;
}

.comparison-popup .fund-details .fund-name a {
  color: #3529b5;
  text-decoration: none;
}

.comparison-popup .company-name {
  color: #666;
  word-break: break-word;
}

.comparison-popup .fund-more-info {
  background: #80e5c3;
  border: none;
  border-radius: 5px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  font-weight: bold;
  transition: all 0.2s ease;
  font-size: 1em;
  color: #000;
  text-decoration: none;
}

.comparison-popup .fund-more-info:hover {
  background: #000;
  color: white;
}

/* Performance data rows */
.comparison-popup .comparison-card-body {
  display: contents;
}

.comparison-popup .performance-grid {
  display: contents;
}

.comparison-popup .performance-item {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.125em;
  padding: 1rem;
  border-bottom: 1px solid #cfcee5;
  border-right: 1px solid #cfcee5;
  transition: background-color 0.2s ease;
}

.comparison-popup .performance-item:nth-child(1) {
  grid-row: 2;
}
.comparison-popup .performance-item:nth-child(2) {
  grid-row: 3;
}
.comparison-popup .performance-item:nth-child(3) {
  grid-row: 4;
}
.comparison-popup .performance-item:nth-child(4) {
  grid-row: 5;
}
.comparison-popup .performance-item:nth-child(5) {
  grid-row: 6;
}
.comparison-popup .performance-item:nth-child(6) {
  grid-row: 7;
}
.comparison-popup .performance-item:nth-child(7) {
  grid-row: 8;
}
.comparison-popup .performance-item:nth-child(8) {
  grid-row: 9;
}

/* Remove bottom border from last row items */
.comparison-popup .comparison-card-header:last-child,
.comparison-popup .label-item:nth-child(8),
.comparison-popup .performance-item:nth-child(8) {
  border-bottom: none;
}

.comparison-popup .performance-item:hover {
  background: #f8f9fa;
}

.comparison-popup .performance-item:last-child {
  border-bottom: none;
}

/* Hide labels in this layout */
.comparison-popup .performance-label {
  display: none;
}

.comparison-popup .performance-value {
  font-size: 1.125em;
  text-align: center;
}

/* Color coding for positive/negative values */
.comparison-popup .performance-value:contains("+"),
.comparison-popup .performance-value[data-positive="true"] {
  color: #28a745;
}

.comparison-popup .performance-value:contains("-"),
.comparison-popup .performance-value[data-negative="true"] {
  color: #dc3545;
}

#fund-page-info {
  display: flex;
}

#fund-page-info .textArea {
  margin-left: auto;
  flex: 0.9;
}

#fund-page-info .share_buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.fund-lines-list {
  display: flex;
  flex-direction: column;
  font-size: 1.5em;
  position: relative;
}

.fund-lines-list .fund-graph-image {
  position: absolute;
  left: 6%;
  bottom: -30px;
}

.fund-lines-list .line {
  padding: 0.5rem 0;
  border-bottom: 1px solid #cbcbcb;
}

.fund-lines-list .line span {
  color: #2ad09d;
}

.fund-lines-list .line a {
  color: #3529b5;
  text-decoration: none;
}

.fund-lines-list .line a:hover {
  text-decoration: underline;
}

#funds_dashboard {
  padding: 20px;
  border-radius: 10px;
  background: #f1f1f1;
  display: grid;
  gap: 40px;
  width: 100%;
  grid-template-columns: 1.5fr 1fr 1fr;
}
#funds_dashboard .section-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  border-left: 1px solid #ddd;
  padding: 0 10px;
}
#funds_dashboard .section-block:last-child {
  border-left: none;
}
#funds_dashboard .section-title {
  font-size: 1.125em;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}
#funds_dashboard .section {
  display: flex;
  gap: 30px;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  padding-bottom: 10px;
  width: 100%;
}
#funds_dashboard .section > div {
  flex: 1;
}
#funds_dashboard .section .circle {
  width: 100%;
  height: 100%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}
#funds_dashboard .section .circle svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
#funds_dashboard .section .circle circle {
  fill: none;
  stroke-width: 14;
  cx: 50%;
  cy: 50%;
}
#funds_dashboard .section .circle .background {
  stroke: #e6e6e6;
}
#funds_dashboard .section .circle span {
  position: absolute;
  font-size: 1.25em;
  font-weight: bold;
}
#funds_dashboard .section .label {
  margin-top: 10px;
  text-align: center;
  font-size: 1em;
  height: 55px;
}

/* Responsive Styles for Compare Calculator */
@media (max-width: 1200px) {
  /* Make compare container relative for filter icon positioning */
  .compare_container {
    position: relative;
    padding: 10px;
  }

  .compare_container .tabs {
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
  }

  .extend_container .checkmark {
    width: 20px;
    height: 20px;
  }

  .compare_container .tabs::-webkit-scrollbar {
    height: 8px;
  }

  .compare_container .tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .compare_container .tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  .compare_container .tabs::-webkit-scrollbar-thumb:hover {
    background: #999;
  }

  .compare_container .tabs button {
    font-size: 1em;
    padding: 8px 20px;
  }

  .custom_radio {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
  }

  .custom_radio::-webkit-scrollbar {
    height: 8px;
  }

  .custom_radio::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .custom_radio::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  .custom_radio::-webkit-scrollbar-thumb:hover {
    background: #999;
  }

  .custom_radio div {
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
    font-size: 1em;
  }

  .custom_radio div::-webkit-scrollbar {
    height: 8px;
  }

  .custom_radio div::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .custom_radio div::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  .custom_radio div::-webkit-scrollbar-thumb:hover {
    background: #999;
  }

  .calculator-container .time-periods.custom_radio div {
    font-size: 1em;
  }

  /* Chart container adjustments */
  .compare_container .chart-container {
    flex-direction: column;
    gap: 15px;
  }

  /* Left card adjustments */
  .compare_container .left-card {
    max-width: none;
    float: none;
    order: 2;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 15px;
  }

  .compare_container .left-card .title {
    font-size: 1.2em;
    margin-bottom: 0;
    gap: 5px;
  }

  .compare_container .left-card .company_name {
    font-size: 1.2em;
    text-align: left;
    flex: 1;
  }

  .compare_container .left-card img {
    max-height: 40px;
    width: auto;
  }

  .compare_container .left-card .total_box {
    margin: 0;
    padding: 10px 15px;
    min-width: 80px;
  }

  .compare_container .left-card .total_box .value {
    font-size: 1.5em;
  }

  .compare_container .left-card .total_box span {
    font-size: 1em;
  }

  .compare_container .left-card .primaryButton {
    padding: 8px 16px;
    font-size: 0.9em;
    white-space: nowrap;
  }

  /* Chart area adjustments */
  .compare_container .chart-area {
    order: 1;
    min-height: auto;
  }

  /* Logo labels adjustments */
  .compare_container #logoLabels {
    font-size: 1em;
    bottom: 0;
  }

  .compare_container #logoLabels img {
    height: 16px;
  }

  .compare_container #logoLabels .logoLabel span {
    transform: rotate(-50deg);
    white-space: nowrap;
    font-size: 0.875em;
    display: block;
    height: 100%;
  }

  .extend_container .col_name .fund-search-input {
    padding: 6px 30px 6px 8px; /* Adjusted padding for mobile icon */
  }

  .extend_container .col_name .search-icon {
    font-size: 12px;
    right: 8px;
  }

  /* Fund Comparison Table Mobile Styles */
  .extend_container .fund_comparison_table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
    position: relative;
    font-size: 0.875em;
  }

  .extend_container .fund_comparison_table::-webkit-scrollbar {
    height: 8px;
  }

  .extend_container .fund_comparison_table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
  }

  .extend_container .fund_comparison_table::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }

  .extend_container .fund_comparison_table::-webkit-scrollbar-thumb:hover {
    background: #999;
  }

  /* Make table rows non-wrapping and maintain flex structure */
  .extend_container .table_header,
  .extend_container .table_row {
    flex-wrap: nowrap;
  }

  /* Sticky first two columns (checkbox and name) */
  .extend_container .col_compare {
    position: sticky;
    position: -webkit-sticky;
    position: -moz-sticky;
    position: -ms-sticky;
    position: -o-sticky;
    right: 0;
    z-index: 3;
    background: inherit;
    flex: 0 0 70px;
    min-width: 70px;
  }

  .extend_container .col_name {
    position: sticky;
    position: -webkit-sticky;
    position: -moz-sticky;
    position: -ms-sticky;
    position: -o-sticky;
    right: 70px; /* Exactly matches col_compare width */
    z-index: 2;
    background: inherit;
    flex: 0 0 150px;
    min-width: auto;
    padding: 10px 10px;
    text-align: center;
  }

  .extend_container .safari-mobile .col_compare,
  .extend_container .safari-mobile .col_name {
    position: relative;
    right: auto;
  }

  /* Ensure header sticky columns have same background */
  .extend_container .table_header .col_compare,
  .extend_container .table_header .col_name {
    background: #e7e7e7;
  }

  /* Ensure row sticky columns have same background */
  .extend_container .table_row .col_compare,
  .extend_container .table_row .col_name {
    background: #f1f1f1;
  }

  .extend_container .table_row:hover .col_compare,
  .extend_container .table_row:hover .col_name,
  .extend_container .table_row.highlighted .col_compare,
  .extend_container .table_row.highlighted .col_name {
    background: #80e5c3;
  }

  /* Ensure scrollable columns have minimum widths */
  .extend_container .col_5y,
  .extend_container .col_3y,
  .extend_container .col_1y,
  .extend_container .col_ytd,
  .extend_container .col_month {
    flex: 0 0 120px;
    min-width: 120px;
    padding: 10px 3px;
  }

  .extend_container .col_action {
    flex: 0 0 120px;
    min-width: 120px;
  }

  /* Improve text handling in headers */
  .extend_container .table_header .sortable {
    padding: 15px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .extend_container .table_header .sortable .header_text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Add border-left to sticky columns for visual separation */
  .extend_container .col_name {
    border-left: 2px solid #000000;
  }

  #fund-page-info {
    flex-direction: column;
    gap: 20px;
  }
  #fund-page-info .share_buttons {
    flex-direction: row;
    justify-content: center;
  }
  .comparison-popup .comparison-labels-header .share_buttons a {
    white-space: normal;
    font-size: 1em;
    line-height: normal;
  }

  /* Comparison Popup Mobile Layout - Limit to 2 columns */
  .comparison-popup .comparison-cards-container {
    grid-template-columns: repeat(2, 50%);
    grid-auto-columns: 50%;
  }
  .comparison-popup-body {
    font-size: 0.875em;
    padding: 10px 15px 15px;
  }
  .comparison-popup .label-item,
  .comparison-popup .performance-value {
    font-size: 1em;
  }
  .fund-lines-list .fund-graph-image {
    display: none;
  }
}
