/* ============================================================
   Hermes Exchange — Calculator styles
   ============================================================ */

.calc-section { background:
  linear-gradient(180deg, transparent, rgba(0,217,178,0.025) 50%, transparent); }

.calc-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) { .calc-grid { grid-template-columns: 1fr; } }

/* ---- calculator card ---- */
.calc-card { padding: 26px; }
@media (max-width: 480px) { .calc-card { padding: 18px; } }

.calc-field { background: var(--bg-inset); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; }
.calc-field label { display: block; font-size: 13px; color: var(--fg-2); margin-bottom: 8px; font-weight: 500; }
.calc-row { display: flex; align-items: center; gap: 14px; }
.calc-input {
  flex: 1; min-width: 0; background: none; border: none; outline: none;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(26px, 5vw, 34px); letter-spacing: -0.02em; color: var(--fg-1);
}
.calc-input::placeholder { color: var(--fg-3); }

/* swap control */
.calc-swap-wrap { position: relative; height: 16px; display: flex; align-items: center; justify-content: center; margin: 4px 0; }
.calc-line { position: absolute; left: 0; right: 0; height: 1px; background: var(--line); }
.calc-swap {
  position: relative; z-index: 1;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--mint);
  display: inline-flex; align-items: center; justify-content: center;
  transition: transform 420ms var(--ease), border-color 200ms, background 200ms;
}
.calc-swap:hover { border-color: var(--mint); background: var(--mint-soft); }
.calc-swap.spin { transform: rotate(180deg); }

/* currency select */
.cursel { position: relative; flex: none; }
.cursel-btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 9px 12px 9px 13px; font-weight: 600; font-size: 15px;
  transition: border-color 160ms, background 160ms;
}
.cursel-btn:hover { border-color: var(--mint); }
.cursel-btn .fi { width: 1.5em; height: 1.05em; border-radius: 3px; }
.cursel-code { font-family: var(--font-display); }

.usdt-badge {
  width: 21px; height: 21px; border-radius: 50%;
  background: var(--mint); color: #042820;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; flex: none;
}

.cursel-pop {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 20;
  width: 240px; max-height: 280px; overflow-y: auto;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: var(--sh-pop); padding: 6px;
  animation: popIn 160ms var(--ease) both;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.cursel-opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border-radius: var(--r-sm); text-align: left;
  transition: background 140ms;
}
.cursel-opt:hover { background: var(--bg-1); }
.cursel-opt.on { background: var(--mint-soft); }
.cursel-opt .fi { width: 1.6em; height: 1.1em; border-radius: 3px; }
.cursel-opt-code { font-weight: 700; font-size: 14px; min-width: 42px; }
.cursel-opt-name { color: var(--fg-2); font-size: 13px; }

/* meta */
.calc-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 18px 2px 0; }
.calc-rate { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--fg-2); }
.calc-rate b { color: var(--fg-1); }
.calc-limits { font-size: 13px; color: var(--fg-3); }

.calc-warn {
  margin-top: 14px; padding: 11px 14px; border-radius: var(--r-sm);
  background: var(--gold-soft); border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold); font-size: 13.5px;
}

.calc-cta { margin-top: 20px; }
.calc-savings {
  display: flex; align-items: center; gap: 9px; justify-content: center;
  margin-top: 16px; font-size: 13.5px; color: var(--fg-2);
}
.calc-savings b { color: var(--mint); font-weight: 700; }

/* ---- rate list ---- */
.rates-list { padding: 10px; display: flex; flex-direction: column; max-height: 540px; }
.rates-list-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 14px; font-size: 14px;
}
.rates-list-head > span:first-child { font-family: var(--font-display); font-weight: 600; }
.rates-list-base { font-size: 12px; color: var(--fg-3); }
.rates-list-body { overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.rate-item {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: var(--r-sm); text-align: left;
  transition: background 140ms;
}
.rate-item:hover { background: var(--bg-inset); }
.rate-item.on { background: var(--mint-soft); box-shadow: inset 0 0 0 1px rgba(0,217,178,0.25); }
.rate-item .fi { width: 1.7em; height: 1.15em; border-radius: 3px; }
.rate-item-name { display: flex; flex-direction: column; line-height: 1.25; }
.rate-item-name b { font-size: 14px; font-weight: 600; }
.rate-item-name .muted { font-size: 12px; }
.rate-item-val { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rate-item.on .rate-item-val { color: var(--mint); }
