/* Multi-currency price analysis tool page */
.fxa-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 60px 48px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #1f2937;
}

.fxa-crumb {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 10px;
}
.fxa-crumb a { color: #6b7280; text-decoration: none; }
.fxa-crumb a:hover { color: #1956ff; }

.fxa-hero h1 {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.fxa-lead {
  margin: 0 0 22px;
  max-width: 860px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #4b5563;
}

.fxa-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 18px;
  align-items: start;
}

.fxa-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px 20px;
}

.fxa-card h2 {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

/* ---------- controls ---------- */
.fxa-field { margin-bottom: 14px; }
.fxa-field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 6px;
}
.fxa-field input,
.fxa-field select {
  width: 100%;
  box-sizing: border-box;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  color: #1f2937;
  background: #fff;
}
.fxa-readonly { background: #f9fafb !important; color: #6b7280; }

.fxa-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.fxa-suggest { position: relative; }
.fxa-suggest-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 60;
  margin: 4px 0 0;
  padding: 4px;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.10);
  max-height: 260px;
  overflow-y: auto;
}
.fxa-suggest-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13.5px;
}
.fxa-suggest-list li:hover { background: #f3f6ff; color: #1956ff; }
.fxa-suggest-list li small {
  display: block;
  color: #9ca3af;
  font-size: 11.5px;
}

/* currency chips */
.fxa-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fxa-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.12s ease;
  user-select: none;
}
.fxa-chip:hover { border-color: #1956ff; color: #1956ff; }
.fxa-chip.is-on {
  background: #1956ff;
  border-color: #1956ff;
  color: #fff;
}
.fxa-chip.is-base { cursor: default; }
.fxa-chip-actions {
  margin-top: 8px;
  display: flex;
  gap: 10px;
}
.fxa-chip-actions button {
  border: none;
  background: none;
  color: #1956ff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.fxa-chip-actions button:hover { text-decoration: underline; }

.fxa-help {
  border: none;
  background: #eef2f7;
  color: #6b7280;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 11px;
  line-height: 1;
  cursor: help;
  vertical-align: middle;
}

.fxa-run {
  width: 100%;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: #1956ff;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.fxa-run:hover { background: #1445cc; }
.fxa-run:disabled { background: #9db4f5; cursor: not-allowed; }

.fxa-login-tip {
  margin: 10px 0 0;
  font-size: 13px;
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 10px;
}
.fxa-login-tip a { color: #b45309; font-weight: 700; }

/* ---------- result ---------- */
.fxa-res-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.fxa-res-head h2 { margin: 0; font-size: 16px; }

.fxa-mode {
  display: inline-flex;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  overflow: hidden;
}
.fxa-mode button {
  border: none;
  background: #fff;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
}
.fxa-mode button.is-on {
  background: #1956ff;
  color: #fff;
}

.fxa-chart { width: 100%; height: 380px; }
.fxa-chart-sub { height: 240px; }

.fxa-sub {
  margin: 6px 0 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 12px;
}
.fxa-sub summary {
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: #4b5563;
}

.fxa-attr-title { font-size: 14.5px; margin: 4px 0 10px; }

.fxa-attrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 10px;
}
.fxa-attr {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}
.fxa-attr-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.fxa-attr-ccy { font-weight: 700; font-size: 14px; }
.fxa-attr-local { font-size: 14px; font-weight: 700; }
.fxa-attr-local.up { color: #dc2626; }
.fxa-attr-local.down { color: #16a34a; }
.fxa-attr-local.flat { color: #6b7280; }

.fxa-bar-track {
  position: relative;
  height: 26px;
  background: #f3f4f6;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.fxa-bar-mid {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d1d5db;
}
.fxa-bar-seg {
  position: absolute;
  top: 5px;
  bottom: 5px;
}
.fxa-bar-seg.usd { background: #1956ff; border-radius: 2px; }
.fxa-bar-seg.fx { background: #f59e0b; border-radius: 2px; }
.fxa-attr-legend {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: #6b7280;
}
.fxa-attr-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: -1px;
}
.fxa-attr-legend .usd i { background: #1956ff; }
.fxa-attr-legend .fx i { background: #f59e0b; }
.fxa-attr-note { margin-top: 6px; font-size: 12px; color: #6b7280; line-height: 1.5; }

/* empty state */
.fxa-empty { grid-column: 2; }
.fxa-steps {
  margin: 0;
  padding-left: 20px;
  font-size: 13.5px;
  line-height: 1.8;
  color: #4b5563;
}

.fxa-warn {
  margin: 10px 0 0;
  color: #b45309;
  font-size: 13px;
}

/* mobile */
@media (max-width: 900px) {
  .fxa-wrap { padding: 16px 16px 32px; }
  .fxa-grid { grid-template-columns: 1fr; }
  .fxa-empty { grid-column: 1; order: 3; }
  .fxa-chart { height: 300px; }
  .fxa-hero h1 { font-size: 21px; }
}
