/* ────────────────────────────────────────────────────────────────────
   Noir · Currency converter page (themes/noir/public/converter.blade.php)
   Uses the theme tokens from theme.css, so it follows light/dark mode.
──────────────────────────────────────────────────────────────────── */

.fx-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.fx-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; color: var(--text-primary); }
.fx-sub { margin-top: 4px; font-size: 14px; color: var(--text-secondary); }
.fx-head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Rate source picker, styled like a search pill */
.fx-provider {
  position: relative; display: flex; align-items: center; gap: 10px;
  height: 48px; min-width: 300px; padding: 0 16px;
  border: 1px solid var(--field-border); border-radius: 999px; background: var(--bg-surface);
  transition: border-color .2s, box-shadow .2s;
}
.fx-provider:hover { border-color: rgba(var(--accent-rgb), .45); }
.fx-provider:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px var(--focus-ring); }
.fx-provider i { font-size: 18px; color: var(--text-muted); }
.fx-provider select {
  flex: 1; min-width: 0; height: 100%; padding-right: 22px;
  border: 0; outline: none; background: transparent; appearance: none; cursor: pointer;
  font: 600 14px 'Inter', sans-serif; color: var(--text-primary);
}
.fx-provider::after, .fx-currency::after {
  content: ''; position: absolute; top: 50%; width: 7px; height: 7px; pointer-events: none;
  border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted);
  transform: translateY(-70%) rotate(45deg);
}
.fx-provider::after { right: 18px; }

.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border: 1px solid transparent; border-radius: 999px;
  font: 700 14px 'Inter', sans-serif; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.fx-btn i { font-size: 18px; }
.fx-btn-primary { background: var(--btn-bg); color: var(--on-accent); box-shadow: 0 6px 18px rgba(var(--accent-rgb), .25); }
.fx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(var(--accent-rgb), .32); color: var(--on-accent); }
.fx-btn-ghost { background: var(--bg-surface); border-color: var(--field-border); color: var(--text-primary); }
.fx-btn-ghost:hover { border-color: rgba(var(--accent-rgb), .5); color: var(--text-primary); }

.fx-grid { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 20px; align-items: start; margin-bottom: 20px; }

.fx-card { padding: 24px; border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); }
html[data-theme="light"] .fx-card { box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.fx-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.fx-card-title { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 700; color: var(--text-primary); }

.fx-live {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  background: var(--btn-bg); color: var(--on-accent);
  font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
}
.fx-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: fx-pulse 1.6s infinite; }
@keyframes fx-pulse { 50% { opacity: .35; } }

/* From / To pills */
.fx-label { display: block; margin-bottom: 8px; font-size: 13px; font-weight: 500; color: var(--text-secondary); }
.fx-field {
  display: flex; align-items: center; gap: 10px; height: 76px; padding: 0 12px 0 26px;
  border: 1px solid var(--border-soft); border-radius: 999px; background: var(--bg-inset);
  transition: border-color .2s, box-shadow .2s;
}
.fx-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 4px var(--focus-ring); }
.fx-field input {
  flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
  font: 700 28px 'Inter', sans-serif; color: var(--text-primary); font-variant-numeric: tabular-nums;
  -moz-appearance: textfield; appearance: textfield;
}
.fx-field input::-webkit-outer-spin-button,
.fx-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fx-field input::placeholder { color: var(--text-muted); }

.fx-currency {
  position: relative; flex-shrink: 0; width: 124px; height: 52px;
  border: 1px solid var(--border-soft); border-radius: 999px; background: var(--bg-surface);
  transition: border-color .2s;
}
.fx-currency:hover { border-color: rgba(var(--accent-rgb), .45); }
.fx-currency img {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 50%; object-fit: cover; pointer-events: none;
}
.fx-currency select {
  width: 100%; height: 100%; padding: 0 30px 0 48px; border: 0; border-radius: 999px; outline: none;
  background: transparent; appearance: none; cursor: pointer;
  font: 700 15px 'Inter', sans-serif; color: var(--text-primary);
}
.fx-currency::after { right: 16px; }

.fx-meta { margin: 10px 0 0 8px; font-size: 13px; color: var(--text-muted); }
.fx-meta strong { font-weight: 600; color: var(--text-primary); }

.fx-swap-row { position: relative; display: flex; justify-content: center; margin: 18px 0 14px; }
.fx-swap-row::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed var(--field-border); }
.fx-swap {
  position: relative; display: grid; place-items: center; width: 44px; height: 44px;
  border: 0; border-radius: 50%; background: var(--btn-bg); color: var(--on-accent); font-size: 20px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), .3); transition: transform .3s;
}
.fx-swap:hover { transform: rotate(180deg); }
.fx-swap:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.fx-rate-line { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; font-size: 15px; font-weight: 600; color: var(--text-primary); }
.fx-note { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-muted); }
.fx-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

/* Live rates list */
.fx-rates { margin: 0; padding: 0; list-style: none; }
.fx-rate {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 13px 8px;
  border: 0; border-bottom: 1px solid var(--border-soft); border-radius: 0; background: transparent;
  font: inherit; text-align: left; cursor: pointer; transition: background .15s;
}
.fx-rates li:last-child .fx-rate { border-bottom: 0; }
.fx-rate:hover, .fx-rate.is-active { border-radius: 12px; background: rgba(var(--accent-rgb), .08); }
.fx-rate img { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--border-soft); }
.fx-rate-pair, .fx-rate-name, .fx-rate-change, .fx-rate-value { display: block; }
.fx-rate-pair { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.fx-rate-name { margin-top: 2px; font-size: 12px; color: var(--text-muted); }
.fx-rate-values { margin-left: auto; text-align: right; }
.fx-rate-change { font-size: 13px; font-weight: 600; }
.fx-rate-change.up { color: var(--success); }
.fx-rate-change.down { color: var(--danger); }
.fx-rate-change.flat { color: var(--text-muted); }
.fx-rate-value { margin-top: 2px; font-size: 17px; font-weight: 800; color: var(--text-primary); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-rate-value .sep { margin: 0 3px; font-weight: 500; color: var(--text-muted); }
.fx-card-foot { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.fx-empty { padding: 30px 0; text-align: center; color: var(--text-muted); }

/* Bank comparison */
.fx-table-wrap { overflow-x: auto; }
.fx-compare { width: 100%; border-collapse: separate; border-spacing: 0 6px; }
.fx-compare th { padding: 0 14px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-align: left; color: var(--text-muted); }
.fx-compare td { padding: 12px 14px; background: var(--bg-inset); font-size: 14px; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.fx-compare th:not(:first-child), .fx-compare td:not(:first-child) { text-align: right; white-space: nowrap; }
.fx-compare td:first-child { border-radius: 12px 0 0 12px; font-weight: 600; }
.fx-compare td:last-child { border-radius: 0 12px 12px 0; }
.fx-compare tbody tr { cursor: pointer; }
.fx-compare tbody tr:hover td { background: rgba(var(--accent-rgb), .08); }
.fx-compare tbody tr.is-active td { background: rgba(var(--accent-rgb), .14); }
.fx-best { display: inline-block; margin-left: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(var(--accent-rgb), .15); color: var(--accent); font-size: 10px; font-weight: 700; }

@media (max-width: 1100px) {
  .fx-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 575px) {
  .fx-title { font-size: 22px; }
  .fx-head-actions, .fx-provider { width: 100%; min-width: 0; }
  .fx-head-actions .fx-btn { flex: 1; }
  .fx-card { padding: 18px; border-radius: 16px; }
  .fx-field { height: 64px; padding-left: 18px; }
  .fx-field input { font-size: 22px; }
  .fx-currency { width: 108px; height: 46px; }
  .fx-actions .fx-btn { flex: 1; }
  .fx-compare th:nth-child(4), .fx-compare td:nth-child(4) { display: none; }
}
