/* ==========================================================================
   Rates Table — styles
   Matches the SRFFCU mockup: navy tab nav, serif title, clean table.
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,700;1,400&family=Roboto:wght@400;700&display=swap");

/* --------------------------------------------------------------------------
   Custom properties — edit these to retheme the whole component
   -------------------------------------------------------------------------- */
:root {
  --rt-dark-blue: #1f2869;
  --rt-med-blue: #2e47c5;
  --rt-light-blue: #e3f0fe;
  --rt-black: #000000;
  --rt-green: #00917b;
  --rt-white: #ffffff;

  /* Aliases used throughout the component */
  --rt-navy: var(--rt-dark-blue);
  --rt-tab-text: var(--rt-dark-blue);
  --rt-tab-hover-bg: var(--rt-med-blue);
  --rt-tab-active-bg: var(--rt-dark-blue);
  --rt-tab-active-text: var(--rt-white);
  --rt-body-bg: var(--rt-white);
  --rt-border: var(--rt-green);
  --rt-cell-text: var(--rt-black);
  --rt-validity-text: var(--rt-black);
  --rt-footnote-text: var(--rt-black);
  --rt-notice-bg: #fcf0f1;
  --rt-notice-border: #d63638;
  --rt-radius: 10px;
  --rt-shadow: 0 2px 12px rgba(31, 40, 105, 0.1);
  --rt-font-sans: "Roboto", sans-serif;
  --rt-font-serif: "Playfair Display", Georgia, serif;
}

/* --------------------------------------------------------------------------
   Outer wrapper
   -------------------------------------------------------------------------- */
.rates-tabs {
  width: 100% !important;
  margin: 0 0 2.5rem !important;
  font-family: var(--rt-font-sans) !important;
}

/* --------------------------------------------------------------------------
   Tab navigation
   -------------------------------------------------------------------------- */
.rates-tabs__nav {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 20px !important;
  background: transparent !important;
}

.rates-tabs__tab {
  flex: 0 0 auto !important;
  padding: 12px 16px !important;
  background: var(--rt-white) !important;
  border: none !important;
  border-radius: var(--rt-radius) !important;
  color: var(--rt-dark-blue) !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em !important;
  text-transform: uppercase !important;
  text-align: center !important;
  line-height: 1.3 !important;
  cursor: pointer !important;
  transition:
    background 0.18s ease,
    color 0.18s ease !important;
}

.rates-tabs__tab:hover:not(.is-active),
.rates-tabs__tab.is-active {
  background: var(--rt-med-blue) !important;
  color: var(--rt-white) !important;
  border-radius: var(--rt-radius) !important;
}

.rates-tabs__tab:focus-visible {
  outline: 3px solid var(--rt-med-blue) !important;
  outline-offset: 2px !important;
  z-index: 1 !important;
}

/* --------------------------------------------------------------------------
   Validity line
   -------------------------------------------------------------------------- */
.rates-tabs__validity {
  margin: 0.9rem 0 0.2rem !important;
  text-align: center !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.8em !important;
  color: var(--rt-validity-text) !important;
  font-style: italic !important;
}

/* --------------------------------------------------------------------------
   Panel
   -------------------------------------------------------------------------- */
.rates-tabs__panel {
  padding: 80px 0 0 !important;
}

.rates-tabs__panel[hidden] {
  display: none !important;
}

/* --------------------------------------------------------------------------
   Per-tab heading
   -------------------------------------------------------------------------- */
.rates-tabs__title {
  margin: 0.5rem 0 1.25rem !important;
  font-family: var(--rt-font-serif) !important;
  font-size: 48px !important;
  font-weight: 700 !important;
  color: var(--rt-navy) !important;
  text-align: center !important;
  line-height: 1.2 !important;
}

.rates-tabs__title em {
  font-style: italic !important;
  font-weight: 700 !important;
}

.rates-tabs__subtitle {
  margin: -0.5rem 0 1.25rem !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  color: var(--rt-black) !important;
  text-align: center !important;
  line-height: 1.5 !important;
}

/* --------------------------------------------------------------------------
   Table wrapper — provides the card shadow + rounded corners.
   When multiple tables are stacked in one panel, add breathing room between them.
   -------------------------------------------------------------------------- */
.rates-table-wrap + .rates-tabs__title {
  margin-top: 2.5rem !important;
}

.rates-table-wrap {
  width: 100% !important;
  overflow-x: auto !important;
}

/* --------------------------------------------------------------------------
   Table base
   -------------------------------------------------------------------------- */
.rates-table {
  width: 100% !important;
  border-collapse: collapse !important;
  background: var(--rt-body-bg) !important;
  font-size: 20px !important;
  color: var(--rt-cell-text) !important;
  line-height: 1.45 !important;
}

/* --------------------------------------------------------------------------
   Hard reset — override any theme borders and backgrounds on all cells
   -------------------------------------------------------------------------- */
.rates-table th,
.rates-table td {
  border: none !important;
  background: transparent !important;
}

/* --------------------------------------------------------------------------
   Header row
   -------------------------------------------------------------------------- */
.rates-table thead {
  border-radius: 10px !important;
  box-shadow: 0 0px 4px rgba(0, 0, 0, 0.1) !important;
}

.rates-table thead tr {
  background: var(--rt-light-blue) !important;
}

.rates-table thead th {
  padding: 22px 20px !important;
  color: var(--rt-dark-blue) !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 22px !important;
  font-weight: 700 !important;
  letter-spacing: 0.03em !important;
  text-align: left !important;
  white-space: nowrap !important;
}

.rates-table thead th:first-child {
  border-radius: 10px 0 0 10px !important;
}

.rates-table thead th:last-child {
  border-radius: 0 10px 10px 0 !important;
}

/* --------------------------------------------------------------------------
   Body rows
   -------------------------------------------------------------------------- */
.rates-table tbody tr {
  border-bottom: 1.5px solid var(--rt-border) !important;
  transition: background 0.12s ease !important;
}

.rates-table tbody th,
.rates-table tbody td {
  padding: 20px 20px !important;
  text-align: left !important;
  vertical-align: middle !important;
}

.rates-table tbody th {
  font-weight: 400 !important;
  color: var(--rt-black) !important;
}

/* Round the last-row corners to match the wrapper */
.rates-table tbody tr:last-child th:first-child {
  border-radius: 0 0 0 var(--rt-radius) !important;
}

.rates-table tbody tr:last-child td:last-child {
  border-radius: 0 0 var(--rt-radius) 0 !important;
}

/* --------------------------------------------------------------------------
   Empty cell dash
   -------------------------------------------------------------------------- */
.rates-table__empty {
  color: #a0aab8 !important;
}

/* --------------------------------------------------------------------------
   Footnotes / disclaimer
   -------------------------------------------------------------------------- */
.rates-tabs__footnotes {
  margin-top: 1.1rem !important;
  padding: 0 0.25rem !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 15px !important;
  font-weight: 400 !important;
  line-height: 1.8em !important;
  color: var(--rt-footnote-text) !important;
}

.rates-tabs__footnotes p {
  margin: 0.35rem 0 !important;
}

.rates-tabs__footnotes a {
  color: var(--rt-navy) !important;
}

/* --------------------------------------------------------------------------
   Admin notice (editors only)
   -------------------------------------------------------------------------- */
.rates-tabs__notice {
  padding: 0.75rem 1rem !important;
  background: var(--rt-notice-bg) !important;
  font-size: 0.875rem !important;
}

/* --------------------------------------------------------------------------
   Mobile select — hidden on desktop, revealed below the breakpoint
   -------------------------------------------------------------------------- */
.rates-tabs__select-wrap {
  display: none !important;
}

.rates-tabs__select {
  width: 100% !important;
  padding: 0.75rem 2.5rem 0.75rem 1rem !important;
  background: var(--rt-med-blue) !important;
  border: none !important;
  border-radius: var(--rt-radius) !important;
  color: var(--rt-white) !important;
  font-family: var(--rt-font-sans) !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.85rem center !important;
  background-size: 1.1rem !important;
  cursor: pointer !important;
}

.rates-tabs__select:focus {
  outline: 3px solid var(--rt-med-blue) !important;
  outline-offset: 2px !important;
}

/* --------------------------------------------------------------------------
   Responsive — swap tab nav for dropdown, stack table columns as cards
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .rates-tabs__nav {
    display: none !important;
  }

  .rates-tabs__select-wrap {
    display: block !important;
    margin-bottom: 0.5rem !important;
  }

  .rates-tabs__panel {
    padding-top: 30px !important;
  }

  .rates-tabs__title {
    font-size: 1.45rem !important;
  }

  /* Switch table to card layout */
  .rates-table-wrap {
    box-shadow: none !important;
  }

  .rates-table {
    font-size: 14px !important;
  }

  .rates-table thead th {
    font-size: 14px !important;
  }

  .rates-table thead {
    display: none !important;
  }

  .rates-table,
  .rates-table tbody,
  .rates-table tr,
  .rates-table th,
  .rates-table td {
    display: block !important;
    width: 100% !important;
  }

  .rates-table tbody tr {
    margin-bottom: 0.75rem !important;
  }

  .rates-table tbody th,
  .rates-table tbody td {
    padding: 0.55rem 1rem !important;
    text-align: right !important;
  }

  .rates-table tbody th .rates-table__mobile-label,
  .rates-table tbody td .rates-table__mobile-label {
    display: block !important;
    float: left !important;
    font-weight: 600 !important;
    font-size: 0.78rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    color: var(--rt-dark-blue) !important;
  }
}

/* Hide injected mobile labels on desktop */
.rates-table__mobile-label {
  display: none !important;
}
