/* Absolutely Norway's /bank page */

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  margin-bottom: 14px;
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--ink);
  text-decoration: none;
}

.page-header {
  margin-bottom: 18px;
}

.page-header p {
  color: var(--muted);
  margin-top: 4px;
}

.stat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-tile {
  padding: 18px 20px;
}

.stat-tile .stat-label {
  font-size: 0.8rem;
  color: var(--muted);
}

.stat-tile .stat-value {
  font-size: 1.9rem;
  margin-top: 4px;
}

.stat-tile .stat-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 4px;
}

.converter-card {
  padding: 22px;
  margin-bottom: 18px;
}

.converter-card h2 {
  font-size: 1rem;
  margin-bottom: 14px;
}

.converter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.converter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.converter-field label {
  font-size: 0.78rem;
  color: var(--muted);
}

.converter-field input,
.converter-field select {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--surface-border);
  background: var(--surface);
  color: var(--ink);
  font-size: 1rem;
}

.converter-swap {
  padding: 10px;
  border-radius: 999px;
  border: 1px solid var(--surface-border);
  background: var(--surface-strong);
  flex-shrink: 0;
}

@media (max-width: 520px) {
  .converter-row {
    align-items: stretch;
  }

  .converter-field {
    flex: 1 1 100%;
  }

  .converter-field input,
  .converter-field select {
    width: 100%;
  }

  .converter-swap {
    align-self: center;
  }
}

.converter-result {
  margin-top: 16px;
  font-size: 1.3rem;
}

.converter-result .rate-note {
  font-size: 0.8rem;
  color: var(--muted);
  display: block;
  margin-top: 4px;
}

.rates-card {
  padding: 22px;
  margin-bottom: 18px;
}

.rates-card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.rates-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rate-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.rate-row:hover,
.rate-row[aria-pressed="true"] {
  background: var(--surface);
}

.rate-row .rate-currency {
  width: 60px;
  flex-shrink: 0;
}

.rate-row .rate-value {
  margin-left: auto;
  color: var(--muted);
}

.chart-card {
  padding: 22px;
  margin-bottom: 18px;
}

.chart-card h2 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.chart-card .chart-sub {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.chart-wrap {
  position: relative;
}

#rate-chart {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-line {
  fill: none;
  stroke: var(--brand-strong);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-axis-label {
  font-size: 10px;
  fill: var(--muted);
}

.chart-gridline {
  stroke: color-mix(in srgb, var(--ink) 12%, transparent);
  stroke-width: 1;
}

.chart-crosshair {
  stroke: var(--muted);
  stroke-width: 1;
  stroke-dasharray: 3 3;
  opacity: 0;
}

.chart-dot {
  fill: var(--brand-strong);
  opacity: 0;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--surface-strong);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.8rem;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translate(-50%, -110%);
  white-space: nowrap;
  z-index: 5;
}

.chart-tooltip strong {
  display: block;
}

.source-note {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 8px;
}

.source-note a {
  color: var(--muted);
  text-decoration: underline;
}

/* -- States ------------------------------------------------------------- */

.state-panel {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
}

.state-panel[hidden] {
  display: none;
}

.state-panel .icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  color: var(--muted);
}

.state-panel.is-error .icon {
  color: var(--error);
}

