/**
 * Responsive styles for the fund update page only.
 * Ensures fund tables and CMS content on the fund detail page work on mobile.
 * All selectors are scoped under .fund-update-page so they do not affect other pages.
 */

/* Base: contain width and allow horizontal scroll only where needed */
.fund-update-page .cms-content {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Images: never overflow, scale down */
.fund-update-page .cms-content img {
  max-width: 100%;
  height: auto;
}

/* Tables: scroll horizontally on small screens instead of squashing */
.fund-update-page .cms-content table {
  width: 100%;
  max-width: 100%;
  display: table;
}

.fund-update-page .cms-content .table-responsive,
.fund-update-page .cms-content table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Wrapper for tables so the container scrolls, not the whole page */
.fund-update-page .cms-content table {
  min-width: 0;
}

@media (max-width: 991px) {
  .fund-update-page .cms-content table {
    display: block;
    overflow-x: auto;
  }

  /* Scale down CMS typography on tablet */
  .fund-update-page .cms-content,
  .fund-update-page .cms-content p,
  .fund-update-page .cms-content li {
    font-size: clamp(14px, 2.5vw, 16px) !important;
  }

  .fund-update-page .cms-content h1 { font-size: clamp(1.5rem, 4vw, 2rem) !important; }
  .fund-update-page .cms-content h2 { font-size: clamp(1.35rem, 3.5vw, 1.75rem) !important; }
  .fund-update-page .cms-content h3 { font-size: clamp(1.2rem, 3vw, 1.5rem) !important; }
  .fund-update-page .cms-content h4,
  .fund-update-page .cms-content h5,
  .fund-update-page .cms-content h6 { font-size: clamp(1.1rem, 2.5vw, 1.25rem) !important; }
}

@media (max-width: 767px) {
  .fund-update-page .cms-content,
  .fund-update-page .cms-content p,
  .fund-update-page .cms-content li {
    font-size: clamp(13px, 2.2vw, 15px) !important;
  }

  .fund-update-page .cms-content h1 { font-size: clamp(1.35rem, 5vw, 1.75rem) !important; }
  .fund-update-page .cms-content h2 { font-size: clamp(1.2rem, 4vw, 1.5rem) !important; }
  .fund-update-page .cms-content h3 { font-size: clamp(1.1rem, 3.5vw, 1.35rem) !important; }
  .fund-update-page .cms-content h4,
  .fund-update-page .cms-content h5,
  .fund-update-page .cms-content h6 { font-size: clamp(1rem, 3vw, 1.15rem) !important; }

  /* Tables: smaller cells on mobile for readability */
  .fund-update-page .cms-content table {
    font-size: 0.9rem;
  }

  .fund-update-page .cms-content th,
  .fund-update-page .cms-content td {
    padding: 0.4rem 0.5rem !important;
  }
}

@media (max-width: 480px) {
  .fund-update-page .cms-content,
  .fund-update-page .cms-content p,
  .fund-update-page .cms-content li {
    font-size: 14px !important;
  }

  .fund-update-page .cms-content th,
  .fund-update-page .cms-content td {
    padding: 0.35rem 0.4rem !important;
    font-size: 0.85rem;
  }
}

/* ========== Fund update page: NAV / price tables – original style, mobile-responsive ========== */
.fund-update-page .price-information-section .price-info-mobile-scale {
  font-size: 16px;
}
.fund-update-page .price-information-section .price-info-mobile-scale *,
.fund-update-page .price-information-section .price-info-mobile-scale .cms-content,
.fund-update-page .price-information-section .price-info-mobile-scale p,
.fund-update-page .price-information-section .price-info-mobile-scale td,
.fund-update-page .price-information-section .price-info-mobile-scale th,
.fund-update-page .price-information-section .price-info-mobile-scale h1,
.fund-update-page .price-information-section .price-info-mobile-scale h2,
.fund-update-page .price-information-section .price-info-mobile-scale h3,
.fund-update-page .price-information-section .price-info-mobile-scale h4,
.fund-update-page .price-information-section .price-info-mobile-scale h5,
.fund-update-page .price-information-section .price-info-mobile-scale h6 {
  font-size: inherit !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale th,
.fund-update-page .price-information-section .price-info-mobile-scale td {
  padding: 0.5rem 0.75rem !important;
  white-space: nowrap;
}
.fund-update-page .price-information-section .price-info-mobile-scale table {
  display: table !important;
  width: 100% !important;
  border-collapse: collapse;
  border-spacing: 0;
  margin-left: 0;
  margin-right: 0;
  vertical-align: top;
}
.fund-update-page .price-information-section .price-info-mobile-scale table + table {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale thead {
  display: table-header-group !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale tbody {
  display: table-row-group !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale tr {
  display: table-row !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale th,
.fund-update-page .price-information-section .price-info-mobile-scale td {
  display: table-cell !important;
}
/* Header row: one continuous gold bar – same gold for all header cells, no gap */
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child th,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child td {
  background-color: #977948 !important;
  background: #977948 !important;
  color: #fff !important;
  font-weight: bold !important;
  text-align: center;
  border: none !important;
  border-left: none !important;
  border-right: none !important;
  padding: 0.5rem 0.75rem !important;
  box-sizing: border-box;
}
/* No border between header cells so one continuous gold strip */
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child th + th,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child th + td,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child td + th,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:first-child td + td {
  border-left: none !important;
}
/* Data rows: original single background, borders */
.fund-update-page .price-information-section .price-info-mobile-scale tbody th,
.fund-update-page .price-information-section .price-info-mobile-scale tbody td,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) th,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) td {
  background-color: #f8f9fa !important;
  color: #333;
  font-weight: inherit;
  font-family: inherit;
  text-align: left;
  border-bottom: 1px solid #eee;
}
.fund-update-page .price-information-section .price-info-mobile-scale tbody td:last-child,
.fund-update-page .price-information-section .price-info-mobile-scale tbody th:last-child,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) td:last-child,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) th:last-child {
  text-align: right;
  font-weight: normal;
  color: #333;
  font-family: inherit;
}
/* Net Asset Value, Closing Value, Previous Close, Daily Change etc.: vibrant blue (match 0.98 style) */
.fund-update-page .price-information-section .price-info-mobile-scale tbody td:first-child,
.fund-update-page .price-information-section .price-info-mobile-scale tbody th:first-child,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) td:first-child,
.fund-update-page .price-information-section .price-info-mobile-scale thead tr:not(:first-child) th:first-child {
  font-weight: 600 !important;
  color: #003366 !important;
  font-family: inherit !important;
}
/* Daily Change % value (e.g. 0.98): same vibrant blue, medium weight */
.fund-update-page .price-information-section .price-info-mobile-scale tbody tr:last-child td:last-child,
.fund-update-page .price-information-section .price-info-mobile-scale tbody tr:last-child th:last-child {
  color: #003366 !important;
  font-weight: 500 !important;
}
/* Tables without thead: first row with single cell (colspan) = title row, original gold */
.fund-update-page .price-information-section .price-info-mobile-scale tbody tr:first-child td:only-of-type,
.fund-update-page .price-information-section .price-info-mobile-scale tbody tr:first-child th:only-of-type {
  background-color: #977948 !important;
  background: #977948 !important;
  color: #fff !important;
  font-weight: bold !important;
  text-align: center;
}
.fund-update-page .price-info-mobile-scale {
  width: 100%;
}
/* No space between tables so gold headers merge when side by side */
.fund-update-page .price-information-section .price-info-mobile-scale .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: 0 !important;
  --bs-gutter-x: 0 !important;
  --bs-gutter-y: 0 !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale .row > * {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale .row [class*="col-"] {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.fund-update-page .price-information-section .price-info-mobile-scale .row [class*="col-"] + [class*="col-"] {
  padding-left: 0 !important;
}

.fund-update-page .fund-details-scroll-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile/tablet: stack price tables vertically (match design – one table per row, card style) */
@media (max-width: 991px) {
  .fund-update-page .price-information-section {
    overflow: visible;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale {
    zoom: unset;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important;
    display: block;
  }
  /* Force any row/column wrappers to stack vertically */
  .fund-update-page .price-information-section .price-info-mobile-scale .row,
  .fund-update-page .price-information-section .price-info-mobile-scale [class*="col-"] {
    max-width: 100% !important;
    flex: 0 0 100% !important;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale .row {
    flex-direction: column;
    display: flex;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale > div {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  /* Each table full width, stacked with gap; card-like rounded corners */
  .fund-update-page .price-information-section .price-info-mobile-scale table {
    width: 100% !important;
    max-width: 100% !important;
    display: table !important;
    margin-bottom: 1.25rem;
    border-radius: 8px;
    overflow: hidden;
    border-collapse: collapse;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale td,
  .fund-update-page .price-information-section .price-info-mobile-scale th {
    white-space: normal;
  }
}

@media (max-width: 767px) {
  .fund-update-page .fund-details-scroll-wrap .displayxsmall {
    font-size: 0.8rem;
    padding: 6px 4px;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale table {
    margin-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .fund-update-page .fund-details-scroll-wrap .displayxsmall {
    font-size: 0.75rem;
    padding: 4px 3px;
  }
  .fund-update-page .price-information-section .price-info-mobile-scale table {
    margin-bottom: 0.875rem;
    border-radius: 6px;
  }
}
