/* ── The share subpages (MFN widgets) ── */
.the-share-subpage {
  padding-bottom: clamp(4.5rem, 9vw, 7rem);
}

.the-share-subpage .gov-subpage__title {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.the-share-subpage__widget {
  width: 100%;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.the-share-subpage__widget--stock-chart {
  min-height: clamp(24rem, 42vw, 36rem);
}

.the-share-subpage__widget--dividend-graph {
  min-height: clamp(16rem, 28vw, 22rem);
}

.the-share-subpage__widget--total-return-table,
.the-share-subpage__widget--dividend-table,
.the-share-subpage__widget--data-table {
  min-height: 0;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.the-share-subpage .governance-card__media {
  width: 100%;
}

.the-share-subpage #MF_totalReturnWidget,
.the-share-subpage #mf_dividendGraph {
  width: 100%;
}

/* ── MFN data tables (total-return is the reference) ── */
.the-share-subpage__table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.the-share-subpage__table-wrap table,
.the-share-subpage__table-wrap .mf-table {
  width: 100%;
  min-width: 42rem;
  border-collapse: collapse;
  font-size: clamp(0.875rem, 1.15vw, 1rem);
  line-height: 1.45;
}

.the-share-subpage__table-wrap thead th,
.the-share-subpage__table-wrap .mf-tbl-head {
  padding: 0.875rem 0.75rem 0.875rem 0;
  font-weight: 600;
  text-align: left !important;
  vertical-align: bottom;
  border-bottom: 1px solid #e5e5e5;
  white-space: nowrap;
}

.the-share-subpage__table-wrap thead th.mf-tbl-col-0,
.the-share-subpage__table-wrap tbody td.mf-tbl-col-0 {
  padding-left: 0;
}

.the-share-subpage__table-wrap tbody td {
  padding: 0.9375rem 0.75rem 0.9375rem 0;
  vertical-align: top;
  text-align: left !important;
  border-bottom: 1px solid #e5e5e5;
}

.the-share-subpage__table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.the-share-subpage__table-wrap .mf-tbl-col-1,
.the-share-subpage__table-wrap .mf-tbl-col-2,
.the-share-subpage__table-wrap .mf-tbl-col-3,
.the-share-subpage__table-wrap .mf-tbl-col-4,
.the-share-subpage__table-wrap .mf-tbl-col-5,
.the-share-subpage__table-wrap .mf-tbl-col-6 {
  text-align: right !important;
  white-space: nowrap;
}

.the-share-subpage__widget--owner-list .mf-table {
  min-width: 44rem;
}

.the-share-subpage__widget--owner-list .mf-tbl-col-0 {
  white-space: nowrap;
}

.the-share-subpage__widget--owner-holding-dist .mf-table,
.the-share-subpage__widget--owner-type-dist .mf-table,
.the-share-subpage__widget--owner-country-dist .mf-table,
.the-share-subpage__widget--owner-concentration .mf-table {
  min-width: 40rem;
}

/* Dividend: Type column stays left-aligned */
.the-share-subpage__widget--dividend-table .mf-tbl-col-3 {
  text-align: left !important;
  white-space: normal;
}

.the-share-subpage__widget--dividend-table table {
  min-width: 28rem;
}

/* MFN branding hidden via css/mfn-widgets.css */

/* Total return year filters */
.the-share-subpage #MF_totalReturnWidget {
  width: 100%;
}

.the-share-subpage .MF_yearSelector {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
  margin-bottom: clamp(1.5rem, 3vw, 2rem);
}

.the-share-subpage .MF_yearSelector .startYear,
.the-share-subpage .MF_yearSelector .endYear {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.the-share-subpage .MF_yearSelector label {
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  font-weight: 400;
  line-height: 1.4;
}

.the-share-subpage .MF_yearSelector select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 5.75rem;
  padding: 0.4375rem 2.125rem 0.4375rem 1rem;
  border: 1px solid var(--color-text, #111);
  border-radius: 999px;
  background-color: var(--color-white, #fff);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23111' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  background-size: 0.65rem auto;
  font: inherit;
  font-size: clamp(0.9375rem, 1.25vw, 1rem);
  line-height: 1.4;
  cursor: pointer;
}

@media (max-width: 768px) {
  .the-share-subpage .gov-subpage__title {
    font-size: clamp(1.75rem, 8vw, 2.25rem);
    text-align: center;
  }

  .the-share-subpage .gov-breadcrumb {
    margin-bottom: clamp(1rem, 3vw, 1.5rem);
  }

  .the-share-subpage__widget--stock-chart {
    min-height: clamp(20rem, 62vw, 28rem);
  }

  .the-share-subpage__widget--dividend-graph {
    min-height: clamp(14rem, 52vw, 18rem);
    margin-bottom: clamp(1.5rem, 4vw, 2rem);
  }

  .the-share-subpage__table-wrap {
    margin-inline: calc(-1 * clamp(1.25rem, 5vw, 1.5rem));
    padding-inline: clamp(1.25rem, 5vw, 1.5rem);
  }

  .the-share-subpage__table-wrap table,
  .the-share-subpage__table-wrap .mf-table {
    min-width: 36rem;
    table-layout: auto;
  }

  .the-share-subpage__widget--owner-list .mf-table {
    min-width: 40rem;
  }

  .the-share-subpage__widget--owner-holding-dist .mf-table,
  .the-share-subpage__widget--owner-type-dist .mf-table,
  .the-share-subpage__widget--owner-country-dist .mf-table,
  .the-share-subpage__widget--owner-concentration .mf-table {
    min-width: 36rem;
  }

  .the-share-subpage__widget--dividend-table table {
    min-width: 22rem;
  }

  .the-share-subpage__table-wrap thead th,
  .the-share-subpage__table-wrap tbody td {
    padding-block: 0.75rem;
    font-size: 0.875rem;
  }

  .the-share-subpage__table-wrap thead th.mf-tbl-col-5,
  .the-share-subpage__table-wrap tbody td.mf-tbl-col-5 {
    white-space: normal;
  }

  .the-share-subpage .governance-grid {
    grid-template-columns: 1fr;
  }
}
