/* =========================================================================
   Globalnet Finance — Fee tables
   Loaded only on pages using the "Fee Table" template (see assets-public.php).
   Built on the brand tokens defined in redesign.css.
   ========================================================================= */

.fee-page {
  position: relative;
  z-index: 1;
  padding: 190px 0 110px;
}

.fee-page .container {
  max-width: 1140px;
}

/* ---- Page head --------------------------------------------------------- */
.fee-page-head {
  text-align: center;
  margin-bottom: 48px;
}

.fee-eyebrow {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gn-glow-blue);
}

.fee-page-head h1 {
  margin: 0 0 32px;
  font-size: clamp(30px, 4.2vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--gn-text-white);
}

/* Regional schedule navigation. Long labels can wrap on narrow screens. */
.fee-switch {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 5px;
  background: var(--gn-card-bg);
  border: 1px solid var(--gn-card-border);
  border-radius: 20px;
}

.fee-switch a {
  padding: 10px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--gn-text-muted);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.fee-switch a:hover {
  color: var(--gn-text-white);
  background: rgba(255, 255, 255, 0.07);
}

.fee-switch a[aria-current="page"] {
  color: #fff;
  background: #2455b8;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fee-page a:focus-visible,
.fee-page button:focus-visible,
.fee-table-scroll:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px #15356f;
}

.fee-scroll-hint {
  margin: 0 0 12px;
  color: #fff;
  font-size: 13px;
  line-height: 1.5;
}

.fee-status {
  display: block;
  margin-top: 20px;
  font-size: 13px;
  color: var(--gn-text-dim);
}

/* ---- Panel & table ------------------------------------------------------ */
.fee-panel {
  padding: 8px 8px 12px;
  background: var(--gn-card-bg);
  border: 1px solid var(--gn-card-border);
  border-radius: var(--gn-radius-lg);
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.fee-table-scroll {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 6px;
  scroll-padding-inline: 6px;
}

.fee-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--gn-font);
  font-size: 14px;
  color: var(--gn-text-muted);
}

.fee-table th,
.fee-table td {
  padding: 14px 18px;
  border: 0;
  text-align: left;
  vertical-align: middle;
}

/* Header */
.fee-head-tiers th {
  padding-top: 22px;
  padding-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-align: center;
  color: var(--gn-text-white);
}

.fee-table .fee-col-label {
  vertical-align: bottom;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  text-align: left;
  color: var(--gn-text-dim);
  border-bottom: 1px solid var(--gn-card-border);
  padding-bottom: 14px;
}

.fee-head-cols th {
  padding-top: 4px;
  padding-bottom: 14px;
  font-size: 12px;
  font-weight: 500;
  text-align: right;
  color: var(--gn-text-dim);
  border-bottom: 1px solid var(--gn-card-border);
}

/* Tint the middle tariff so each %/currency pair reads as one group */
.fee-table [data-tier="1"] {
  background: rgba(255, 255, 255, 0.028);
}

/* Section bands */
.fee-section th {
  padding: 26px 18px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  /* No text-transform: the source headings are already uppercase, and forcing it
     would turn the deliberate "eWALLETS" into "EWALLETS". */
  color: var(--gn-glow-blue);
  border-bottom: 1px solid var(--gn-card-border);
}

.fee-section-note {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: normal;
  text-transform: none;
  color: var(--gn-text-dim);
}

/* Fee rows */
.fee-row th {
  width: 46%;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gn-text-white);
}

.fee-row td {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: var(--gn-text-muted);
}

.fee-row + .fee-row th,
.fee-row + .fee-row td {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.fee-row:hover th,
.fee-row:hover td {
  background: rgba(79, 129, 242, 0.09);
}

.fee-row--empty th {
  color: var(--gn-text-dim);
}

.fee-label em {
  font-style: italic;
  color: var(--gn-text-dim);
}

.fee-label strong {
  font-weight: 600;
  color: var(--gn-text-white);
}

.fee-sub {
  display: block;
  margin-top: 3px;
  font-size: 13px;
  color: var(--gn-text-dim);
}

/* Footnote markers */
.fee-fn-wrap {
  margin-left: 3px;
  font-size: 10px;
  line-height: 0;
}

.fee-table a.fee-fn {
  font-weight: 600;
  color: var(--gn-light-blue);
  text-decoration: none;
}

.fee-table a.fee-fn:hover {
  color: var(--gn-glow-blue);
  text-decoration: underline;
}

/* ---- Footnotes ----------------------------------------------------------- */
.fee-notes {
  margin: 36px auto 0;
  padding: 0 8px;
  list-style: none;
  max-width: 920px;
}

.fee-notes li {
  display: flex;
  gap: 14px;
  padding: 7px 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--gn-text-dim);
  scroll-margin-top: 200px;
}

.fee-note-num {
  flex: 0 0 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(79, 129, 242, 0.16);
  color: var(--gn-glow-blue);
  font-size: 11px;
  font-weight: 700;
  line-height: 22px;
  text-align: center;
}

/* Briefly highlight a footnote when you jump to it */
.fee-notes li:target .fee-note-text {
  color: var(--gn-text-white);
  transition: color 0.3s;
}

.fee-missing {
  text-align: center;
}

/* ---- Mobile tariff tabs -------------------------------------------------- */
.fee-tier-tabs {
  display: none;
}

@media (max-width: 991px) {
  .fee-page {
    padding: 150px 0 80px;
  }

  .fee-page-head {
    margin-bottom: 32px;
  }

  /* The five regional labels remain readable and have separate touch targets. */
  .fee-switch {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    border-radius: 14px;
  }

  .fee-switch a {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 8px 6px;
    font-size: 13px;
    line-height: 1.25;
    text-align: center;
    border-radius: 10px;
  }

  .fee-panel {
    padding: 4px 4px 8px;
    border-radius: var(--gn-radius);
  }

  .fee-table {
    font-size: 13px;
  }

  .fee-table th,
  .fee-table td {
    padding: 12px 10px;
  }

  .fee-row th {
    width: auto;
  }

  /* Tariff buttons appear only once JS has run (.js-tiers) */
  .fee-table-wrap.js-tiers .fee-tier-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 14px;
    padding: 5px;
    background: var(--gn-card-bg);
    border: 1px solid var(--gn-card-border);
    border-radius: var(--gn-radius-sm);
  }

  .fee-tier-tab {
    flex: 1 1 0;
    min-width: 90px;
    overflow-wrap: anywhere;
    min-height: 44px;
    padding: 8px 6px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-family: var(--gn-font);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gn-text-muted);
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
  }

  .fee-tier-tab[aria-pressed="true"] {
    background: #2455b8;
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  /* Show only the active tariff's columns */
  .fee-table-wrap.js-tiers[data-active-tier="0"] [data-tier]:not([data-tier="0"]),
  .fee-table-wrap.js-tiers[data-active-tier="1"] [data-tier]:not([data-tier="1"]),
  .fee-table-wrap.js-tiers[data-active-tier="2"] [data-tier]:not([data-tier="2"]) {
    display: none;
  }

  /* One tariff visible — the group tint no longer means anything */
  .fee-table-wrap.js-tiers .fee-table [data-tier="1"] {
    background: transparent;
  }

  /* Without JS, keep the multi-tariff table legible by letting it scroll sideways */
  .fee-table-wrap[data-tier-count="2"]:not(.js-tiers) .fee-table,
  .fee-table-wrap[data-tier-count="3"]:not(.js-tiers) .fee-table {
    min-width: 720px;
  }

  .fee-notes {
    margin-top: 28px;
    padding: 0 4px;
  }
}
