/* THEDOLD Stage 15 — deliberate redesign of ONLY the exchange selector card.
   Based on approved baseline Stage 14. All rules scoped under #exchange.
   No changes to header, left hero, results, modal, global service catalogs or JS.
   Typographic hierarchy: label < currency < amount; restrained weights.
*/

/* Card itself: preserve the original 480px track and outer silhouette. */
#exchange {
  box-shadow: 0 18px 46px rgba(25, 60, 120, .09);
}
#exchange .exchange-head {
  margin-bottom: 13px;
  align-items: center;
}
#exchange .overline {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.15px;
  line-height: 1.4;
}
#exchange h2 {
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -.48px;
  line-height: 1.28;
  margin-top: 5px;
}
#exchange .blueicon {
  width: 40px;
  height: 40px;
  font-size: 18px;
  border-radius: 12px;
}

/* The market selector must remain comfortably tappable in both languages. */
#exchange .market-switch {
  margin-top: 12px;
  padding: 3px;
  border-radius: 12px;
}
#exchange .market-switch button {
  min-height: 34px;
  padding: 7px 4px;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1.2;
  font-weight: 550;
  letter-spacing: -.12px;
}
#exchange .market-switch small,
#exchange .market-switch #marketGlobal small {
  font-size: 11px;
  font-weight: 450;
}
#exchange .market-switch button.active {
  box-shadow: 0 2px 7px rgba(18,65,144,.14);
}

/* Equal-height currency sections, quieter framing and clearer text hierarchy. */
#exchange .pair { gap: 11px; }
#exchange .pair > .currencyfield {
  display: flex;
  flex-direction: column;
  min-height: 170px;
  padding: 12px 17px 12px;
  border-width: 1px;
  border-radius: 15px;
  background: var(--panel);
}
#exchange .pair > .currencyfield:focus-within {
  border-color: var(--blue2);
}
#exchange .fieldlabel {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .95px;
  line-height: 1.4;
  color: var(--muted);
}
#exchange .currencybtn {
  padding: 9px 0 11px;
  gap: 12px;
  min-width: 0;
}
#exchange .currencytext {
  gap: 1px;
  min-width: 0;
}
#exchange .currencytext b {
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.12px;
  line-height: 1.28;
}
#exchange .currencytext small {
  font-size: 12px;
  font-weight: 450;
  line-height: 1.4;
  margin-top: 2px;
}
#exchange .coin { flex: 0 0 40px; width: 40px; height: 40px; }
#exchange .currencybtn .chev {
  width: 29px;
  height: 29px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--blue);
}

/* Input and calculated amount: same numeric voice, intentionally less bold.
   Horizontal alignment remains right-justified; no input behavior changes. */
#exchange .amountlabel {
  min-height: 58px;
  margin-top: auto;
  padding-top: 10px;
  border-color: var(--border);
}
#exchange .amountlabel > label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
#exchange .amountlabel .amount-editor {
  gap: 9px;
}
#exchange .amountlabel .amount-editor input {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -.48px;
  font-variant-numeric: tabular-nums;
  padding: 7px 0;
}
#exchange .amountlabel-receive .amount-editor input::placeholder {
  font-size: 12.5px;
  font-weight: 450;
  letter-spacing: 0;
  opacity: .9;
}
#exchange .amount-steppers { gap: 3px; }
#exchange .amount-steppers button {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 8px;
  box-shadow: none;
}
#exchange .swap {
  width: 41px;
  height: 41px;
  font-size: 20px;
  border-color: var(--border);
  box-shadow: 0 4px 14px rgba(30,70,133,.12);
}

/* Global: country/service controls match the RU numerical row in hierarchy. */
#exchange .currencyfield .global-filters {
  margin-top: auto;
  min-height: 70px;
  padding-top: 10px;
}
#exchange .global-filter {
  min-height: 49px;
  padding: 7px 8px;
  border-radius: 10px;
}
#exchange .global-filter-copy { gap: 3px; }
html[data-market="global"] #exchange .global-filter-copy small {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}
html[data-market="global"] #exchange .global-filter-copy strong {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.18;
}

/* Call-to-action: adequate contrast, but not louder than the form values. */
#exchange > .primary {
  min-height: 52px;
  margin-top: 13px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  border-radius: 12px;
  box-shadow: 0 7px 17px rgba(30,96,200,.15);
}

/* Compact layout: do not let names, amounts or country labels overflow. */
@media (max-width: 480px) {
  #exchange h2 { font-size: 21px; }
  #exchange .pair > .currencyfield { padding: 12px 13px; }
  #exchange .market-switch button { font-size: 12px; padding-inline: 2px; }
  #exchange .market-switch small,
  #exchange .market-switch #marketGlobal small { font-size: 10px; }
  #exchange .currencytext b { font-size: 15px; }
  #exchange .amountlabel .amount-editor input { font-size: 21px; }
  #exchange .global-filter { padding: 6px 5px; }
  html[data-market="global"] #exchange .global-filter-copy small { font-size: 10px; }
  html[data-market="global"] #exchange .global-filter-copy strong { font-size: 12px; }
}
@media (max-width: 370px) {
  #exchange .market-switch #marketGlobal .mode-name small { font-size: 9.5px; }
  #exchange .amountlabel .amount-editor input { font-size: 20px; }
}
