/* ===== EXCHANGE / SWAP FORM ===== */
.swap-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

/* Three columns: send | switch | receive */
.swap-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 14px;
}

.swap-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.swap-select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='%23d4a24c'%3E%3Cpath d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
  font-weight: 600;
}

.swap-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

.swap-amount {
  font-family: var(--font);
  font-weight: 600;
}

/* Switch button between the two columns */
.swap-switch {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 1px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--accent);
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.swap-switch:hover {
  border-color: var(--accent);
  background: rgba(212, 162, 76, 0.1);
  transform: rotate(90deg);
}

/* Rate line */
.swap-rate {
  min-height: 18px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-align: center;
}

.swap-rate strong {
  color: var(--accent);
}

/* Dynamic fields */
#swap-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.swap-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.swap-field.hidden {
  display: none;
}

.swap-submit {
  margin-top: 4px;
}

/* ===== EXCHANGE STATUS — amounts summary ===== */
.exchange-summary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.exchange-summary-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.exchange-summary-value {
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.exchange-summary-arrow {
  font-size: 1.4rem;
  color: var(--accent);
}

/* Mobile: stack columns, rotate switch to point down */
@media (max-width: 600px) {
  .swap-grid {
    grid-template-columns: 1fr;
  }

  .swap-switch {
    margin: 0 auto;
    transform: rotate(90deg);
  }

  .swap-switch:hover {
    transform: rotate(90deg) scale(1.05);
  }
}
