@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── WRAPPER ── */
.csn-wrap {
  display: flex;
  justify-content: center;
  padding: 16px 0;
  font-family: 'Inter', sans-serif;
}

/* ── CARD ── */
.csn-card {
  background: #2c1810;
  border-radius: 24px;
  width: 100%;
  max-width: 420px;
  padding: 24px 20px 20px;
  color: #fff;
  box-sizing: border-box;
}

/* ── RESET inside card to avoid theme bleed ── */
.csn-card *,
.csn-card *::before,
.csn-card *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.csn-card label {
  font-size: 14px;
  font-weight: 600;
  color: #c8a898;
  display: block;
  margin-bottom: 4px;
  letter-spacing: 0.01em;
}

/* ── YOU SEND ROW ── */
.csn-send-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.csn-send-left input[type="number"] {
  background: transparent;
  border: none;
  outline: none;
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  width: 160px;
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.5px;
  -moz-appearance: textfield;
}

.csn-send-left input[type="number"]::-webkit-outer-spin-button,
.csn-send-left input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

.csn-send-left input::placeholder { color: #ffffff; }

/* ── CURRENCY PILL ── */
.csn-currency-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #3d2218;
  border-radius: 50px;
  padding: 10px 14px 10px 6px;
  cursor: pointer;
  border: none;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  font-weight: 700;
  min-width: 120px;
  user-select: none;
  transition: background 0.15s;
}

.csn-currency-pill:hover { background: #4a2a1a; }

.csn-flag {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.csn-code {
  flex: 1;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
}

.csn-arrow {
  font-size: 13px;
  color: #c8a898;
  margin-left: 2px;
}

/* ── RATE BAR ── */
.csn-rate-bar {
  background: #3d2218;
  border-radius: 12px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 16px;
}

.csn-refresh-icon {
  color: #e8472a;
  font-size: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition: transform 0.4s;
}

.csn-refresh-icon.csn-spinning {
  animation: csn-spin 0.5s linear;
}

@keyframes csn-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.csn-rate-text {
  font-size: 16px;
  font-weight: 600;
  color: #e8472a;
  letter-spacing: 0.01em;
}

/* ── THEY RECEIVE ROW ── */
.csn-receive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.csn-receive-left label {
  color: #c8a898;
}

.csn-receive-amount {
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.5px;
  min-height: 46px;
  display: flex;
  align-items: center;
  font-family: 'Inter', sans-serif;
}

.csn-receive-amount.csn-loading {
  font-size: 22px;
  color: #c8a898;
}

/* ── DROPDOWN FIELD ROWS ── */
.csn-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.csn-field-row > label {
  font-size: 14px;
  font-weight: 600;
  color: #e8472a;
  flex-shrink: 0;
  width: 130px;
  margin-bottom: 0;
}

.csn-custom-select {
  flex: 1;
  background: #3d2218;
  border: none;
  border-radius: 12px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  position: relative;
}

.csn-custom-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  font-size: 14px;
  border: none;
  background: transparent;
}

.csn-select-text {
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: calc(100% - 20px);
}

.csn-select-arrow {
  color: #c8a898;
  font-size: 14px;
  pointer-events: none;
  flex-shrink: 0;
}

/* ── ERROR ── */
.csn-error-msg {
  background: #5a1a1a;
  border: 1px solid #8a2a2a;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ff8888;
  margin-bottom: 14px;
  display: none;
  line-height: 1.4;
}

/* ── PROMO PANEL ── */
.csn-promo-panel {
  background: #3d2218;
  border: 1px solid #5a3020;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 20px;
}

.csn-promo-panel p {
  font-size: 13px;
  font-weight: 400;
  color: #c8a898;
  line-height: 1.55;
  font-family: 'Inter', sans-serif;
}

.csn-promo-panel p strong {
  color: #ffffff;
  font-weight: 700;
}

/* ── FEE TABLE ── */
.csn-fee-table {
  margin-bottom: 10px;
  padding: 0 4px;
}

.csn-fee-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
}

.csn-fee-label {
  font-size: 13px;
  font-weight: 600;
  color: #c8a898;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
}

.csn-fee-value {
  font-size: 13px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
  font-family: 'Inter', sans-serif;
}

/* ── DIVIDER ── */
.csn-divider {
  border: none !important;
  border-top: 1px solid #4a2a1a !important;
  margin: 4px 0 16px !important;
  background: none !important;
  height: 1px !important;
}

/* ── DISCLAIMER ── */
.csn-disclaimer {
  text-align: center;
  font-size: 12px;
  color: #7a5545;
  margin-bottom: 20px !important;
  padding: 0 8px;
  line-height: 1.4;
  font-family: 'Inter', sans-serif;
}

/* ── SEND BUTTON ── */
.csn-send-btn {
  width: 100%;
  background: #e8472a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 14px !important;
  padding: 17px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  letter-spacing: 0.12em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  transition: background 0.15s, transform 0.1s !important;
  display: block !important;
  text-align: center !important;
  box-shadow: none !important;
  outline: none;
}

.csn-send-btn:hover  { background: #d43d22 !important; }
.csn-send-btn:active { transform: scale(0.98) !important; }
.csn-send-btn:disabled {
  background: #7a3a2a !important;
  cursor: not-allowed !important;
  transform: none !important;
}

/* ── CURRENCY MODAL ── */
.csn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.csn-modal-overlay.csn-open {
  opacity: 1;
  pointer-events: all;
}

.csn-modal {
  background: #2c1810;
  border-radius: 20px;
  width: 320px;
  max-height: 480px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
  transition: transform 0.2s;
  border: 1px solid #4a2a1a;
}

.csn-modal-overlay.csn-open .csn-modal {
  transform: translateY(0);
}

.csn-modal-header {
  padding: 18px 20px 12px;
  border-bottom: 1px solid #4a2a1a;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.csn-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  font-family: 'Inter', sans-serif;
  margin: 0;
  line-height: 1.4;
}

.csn-modal-close {
  background: none;
  border: none;
  color: #c8a898;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.csn-modal-search {
  padding: 12px 20px;
  border-bottom: 1px solid #3d2218;
}

.csn-modal-search input {
  width: 100%;
  background: #3d2218;
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  color: #fff;
  font-size: 14px;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.csn-modal-list {
  overflow-y: auto;
  flex: 1;
}

.csn-modal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.1s;
}

.csn-modal-item:hover  { background: #3d2218; }
.csn-modal-item.csn-active { background: #4a2a1a; }

.csn-m-flag { font-size: 24px; width: 32px; text-align: center; }
.csn-m-code { font-size: 15px; font-weight: 700; color: #fff; font-family: 'Inter', sans-serif; }
.csn-m-name { font-size: 12px; color: #c8a898; font-family: 'Inter', sans-serif; }

.csn-modal-list::-webkit-scrollbar       { width: 4px; }
.csn-modal-list::-webkit-scrollbar-track { background: #2c1810; }
.csn-modal-list::-webkit-scrollbar-thumb { background: #5a3020; border-radius: 2px; }

/* ── RESPONSIVE ── */
@media (max-width: 480px) {
  .csn-card { border-radius: 16px; padding: 20px 16px 16px; }
  .csn-send-left input[type="number"] { font-size: 30px; width: 130px; }
  .csn-receive-amount { font-size: 30px; }
  .csn-field-row > label { width: 110px; font-size: 13px; }
}
