/*
 * YES Exchange Mini App brand tokens are based on
 * yes-exchange-license/app/globals.css (main branch).
 * Both the source kiosk themes share the orange header and accent.
 */
:root {
  color-scheme: light;
  --accent: #f28c1e;
  --accent-bright: #f5a623;
  --accent-dark: #d67a10;
  --page: #f4f4f4;
  --page-secondary: #ececec;
  --card: #ffffff;
  --text: #0d0d0d;
  --muted: #666666;
  --border: #d4d4d4;
  --accent-soft: #fff7ed;
  --accent-text: #974c0d;
  --shadow: 0 8px 22px rgba(13, 13, 13, 0.09);
  font-family: "Gotham Pro", Arial, sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0d;
  --page-secondary: #141414;
  --card: #1a1a1a;
  --text: #ffffff;
  --muted: #b0b0b0;
  --border: #333333;
  --accent-soft: #302419;
  --accent-text: #f5a623;
  --shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}
*, *::before, *::after { box-sizing: border-box; }
html { min-height: 100%; background: var(--page); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--page);
  color: var(--text);
}
.app-shell {
  width: min(100%, 680px);
  margin: 0 auto;
  padding: 0 20px max(26px, env(safe-area-inset-bottom));
}
.topbar, .brand, .section-heading, .footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar {
  min-height: 83px;
  margin: 0 -20px;
  padding: max(14px, env(safe-area-inset-top)) 20px 14px;
  gap: 12px;
  background: linear-gradient(135deg, #f28c1e, #d67a10);
  border-bottom: 3px solid #f5a623;
  box-shadow: 0 5px 18px rgba(13, 13, 13, 0.16);
}
.brand {
  justify-content: flex-start;
  gap: 12px;
  min-width: 0;
}
.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 72px;
  height: 45px;
  object-fit: contain;
}
.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.12;
}
.brand-copy small {
  color: #fff6eb;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
}
.topbar-tag {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  background: rgba(13, 13, 13, 0.72);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.10em;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin-top: 18px;
  padding: 28px 24px 24px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background:
    radial-gradient(circle at 100% 0%, rgba(242, 140, 30, 0.12), transparent 45%),
    var(--card);
  box-shadow: var(--shadow);
}
.hero-glow {
  position: absolute;
  z-index: -1;
  top: -94px;
  right: -74px;
  width: 235px;
  height: 235px;
  border-radius: 50%;
  background: rgba(245, 166, 35, 0.12);
  filter: blur(22px);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  color: var(--accent-text);
}
.pulse {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(242, 140, 30, 0.17);
}
h1 {
  margin: 31px 0 15px;
  font-size: clamp(30px, 7vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.045em;
  font-weight: 800;
}
h1 em { color: var(--accent); font-style: normal; }
.hero-copy {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}
.status-box {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 28px;
  padding: 15px;
  border: 1px solid rgba(242, 140, 30, 0.32);
  border-radius: 14px;
  background: var(--accent-soft);
}
.status-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  border-radius: 13px;
  background: linear-gradient(135deg, #f28c1e, #d67a10);
  color: #ffffff;
  font-size: 23px;
  font-weight: 800;
}
.status-box strong { display: block; font-size: 13px; line-height: 1.35; }
.status-box p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.status-box[data-state="error"] { border-color: #dc7b63; }
.status-box[data-state="error"] .status-icon { background: #b6402d; }
.section-heading {
  gap: 10px;
  margin: 31px 1px 14px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
}
.section-counter { color: var(--accent-dark); white-space: nowrap; }
:root[data-theme="dark"] .section-counter { color: var(--accent-bright); }
.features { display: grid; gap: 11px; }
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  min-height: 155px;
  padding: 21px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.feature-primary {
  border-color: rgba(242, 140, 30, 0.40);
  background:
    radial-gradient(circle at 94% 12%, rgba(242, 140, 30, 0.13), transparent 34%),
    var(--card);
}
.feature-number {
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}
.feature-symbol {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 14px;
  color: #ffffff;
  background: linear-gradient(135deg, #ffb347, #ff781a);
  font-size: 25px;
  box-shadow: 0 8px 18px rgba(255, 123, 27, 0.18);
}
.feature > div { grid-column: 1 / -1; }
.feature h2 {
  margin: 0 0 7px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.025em;
}
.feature p {
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.feature-label {
  color: var(--accent-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.13em;
}
:root[data-theme="dark"] .feature-number,
:root[data-theme="dark"] .feature-label { color: var(--accent-bright); }
.footer {
  gap: 12px;
  padding: 25px 2px 0;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.10em;
}
@media (min-width: 560px) {
  .app-shell { padding-inline: 34px; }
  .topbar { margin-inline: -34px; padding-inline: 34px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feature-primary { grid-column: 1 / -1; }
}
@media (max-width: 350px) {
  .app-shell { padding-inline: 13px; }
  .topbar { margin-inline: -13px; padding-inline: 13px; }
  .brand { gap: 8px; }
  .brand-logo { width: 58px; }
  .brand-copy { font-size: 13px; }
  .topbar-tag { padding: 7px 8px; font-size: 9px; }
  .hero { padding: 23px 18px; }
  .footer { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}


/* Mini App stage 2: compact, genuine YES Exchange rates table. */
.rates-panel { padding-bottom: 17px; }
.rates-panel h1 { margin: 23px 0 8px; }
.rates-panel .hero-copy { max-width: 490px; }
.branch-field { margin-top: 27px; }
.field-label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.branch-control { position: relative; display: flex; align-items: center; }
.branch-marker {
  position: absolute;
  left: 15px;
  z-index: 1;
  color: var(--accent-dark);
  font-size: 24px;
  line-height: 1;
  pointer-events: none;
}
.branch-control select {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 53px;
  padding: 14px 38px 14px 43px;
  border: 1px solid var(--border);
  border-radius: 14px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--page-secondary);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.35;
  text-overflow: ellipsis;
  outline-offset: 3px;
}
.branch-control select:focus-visible { outline: 2px solid var(--accent); }
.branch-control select:disabled { opacity: .68; }
.select-arrow {
  position: absolute;
  right: 15px;
  color: var(--accent-dark);
  font-size: 22px;
  pointer-events: none;
}
.rates-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 20px 0 13px;
}
.rates-time { display: flex; flex-direction: column; min-width: 0; gap: 5px; }
.rates-time > span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.rates-time > small {
  color: var(--accent-dark);
  font-size: 10px;
  font-weight: 750;
}
:root[data-theme="dark"] .rates-time > small,
:root[data-theme="dark"] .branch-marker,
:root[data-theme="dark"] .select-arrow { color: var(--accent-bright); }
.refresh-button {
  flex: 0 0 auto;
  min-height: 39px;
  padding: 9px 12px;
  border: 1px solid rgba(242, 140, 30, .44);
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.refresh-button:disabled { opacity: .6; cursor: default; }
.refresh-button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rates-error {
  padding: 12px 13px;
  margin: 0 0 12px;
  border: 1px solid #b6402d;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
}
[hidden] { display: none !important; }
.rates-table-wrap {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.rates-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-variant-numeric: tabular-nums;
}
.rates-table th:first-child,
.rates-table td:first-child { width: 35%; text-align: left; }
.rates-table th:nth-child(2),
.rates-table th:nth-child(3),
.rates-table td:nth-child(2),
.rates-table td:nth-child(3) { width: 32.5%; text-align: right; }
.rates-table thead { background: var(--page-secondary); }
.rates-table th {
  padding: 15px 12px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: .02em;
}
.rates-table td {
  min-width: 0;
  padding: 11px 12px;
  border-top: 1px solid var(--border);
  background: var(--card);
  vertical-align: middle;
}
.rates-table tbody tr:nth-child(even) td { background: var(--page-secondary); }
.rates-table tbody tr { transition: background-color .2s ease; }
.rate-currency {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}
.rate-flag {
  flex: 0 0 auto;
  display: inline-grid;
  width: 30px;
  height: 24px;
  place-items: center;
  overflow: hidden;
  font-size: 24px;
  line-height: 1;
}
.rate-flag img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rate-number {
  display: block;
  color: var(--text);
  font-size: clamp(11px, 2.8vw, 16px);
  font-weight: 750;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.rate-number.unavailable {
  color: var(--muted);
  font-weight: 500;
}
.rates-table .rates-placeholder {
  padding: 32px 13px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
  line-height: 1.6;
}
.rates-footnote {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.app-shell > .status-box { margin-top: 14px; }
.app-shell > .status-box .status-icon { width: 35px; height: 35px; }
@media (max-width: 390px) {
  .rates-panel { padding-inline: 14px; }
  .rates-table th, .rates-table td { padding-inline: 7px; }
  .rate-currency { gap: 5px; font-size: 11px; }
  .rate-flag { width: 24px; height: 21px; font-size: 20px; }
  .rate-number { font-size: 11px; }
  .rates-table th { font-size: 9px; }
  .rates-toolbar { gap: 6px; }
  .refresh-button { padding-inline: 8px; }
}
