/* ============================================================
   VegasBet — Bank-card deposit (fiat on-ramp hand-off)
   Second method on /profile/deposit, next to the crypto flow.

   Scope: ONLY the pieces the card flow adds — the merchant dropdown,
   the amount field and the hand-off card. Everything shared (page grid,
   panel, steps, address row, copy button, info rows, the method
   selector itself) stays in crypto-deposit.css and is reused as-is.

   Dark + purple palette only (NO blue). No inline styles.
   ============================================================ */

/* ── Merchant dropdown (step 2) ─────────────────────────────── */
.cdm-select {
  position: relative;
}

.cdm-select-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  background: #111114;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.cdm-select-toggle:hover {
  border-color: rgba(168, 85, 247, 0.45);
}

.cdm-select.is-open .cdm-select-toggle {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.10);
}

.cdm-select-current {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.cdm-select-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cdm-select-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  stroke: var(--text-secondary);
  fill: none;
  transition: transform 0.22s ease, stroke 0.22s ease;
}

.cdm-select.is-open .cdm-select-chevron {
  transform: rotate(180deg);
  stroke: var(--accent);
}

/* Provider mark: the brand SVG from static/img/merchants/<id>.svg sits on
   top of a purple monogram, so a file that is missing (or replaced later)
   falls back to the initial rather than a broken image. Drop a new SVG in
   under the provider's id and it appears — no code change. Every mark is a
   64x64 file with a full-bleed disc in the brand's own tile colour, so the
   circle here only has to clip the rim. */
.cdm-merchant-badge {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--purple), var(--accent));
}

/* A hairline ring keeps the black tiles (Paybis, Ramp, Topper…) from melting
   into the menu's own dark card. Drawn as an overlay: an inset box-shadow on
   the badge itself would paint UNDER the absolutely positioned image. */
.cdm-merchant-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

/* Set by card-deposit.js once the mark has loaded; the compound selector
   outranks .cdm-go-badge's own translucent holder further down. */
.cdm-merchant-badge.cdm-merchant-badge--img {
  background: none;
  color: transparent;
}

.cdm-merchant-icon {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── Dropdown menu ──────────────────────────────────────────── */
.cdm-select-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 288px;
  overflow-y: auto;
  padding: 6px;
  background: #17171b;
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  animation: cdm-menu-in 0.16s ease-out;
}

/* JS toggles `hidden` on a flex/animated box — without this the author
   rules would outrank the UA `[hidden]` rule and the menu would never
   close (the same cascade footgun as .cd-tag-row in crypto-deposit.css). */
.cdm-select-menu[hidden] {
  display: none;
}

@keyframes cdm-menu-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cdm-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.cdm-option:hover {
  background: rgba(124, 58, 237, 0.14);
  border-color: rgba(168, 85, 247, 0.3);
}

.cdm-option.active {
  background: rgba(124, 58, 237, 0.18);
  border-color: rgba(168, 85, 247, 0.45);
}

.cdm-option-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.cdm-option:hover .cdm-option-name {
  color: #fff;
}

/* Scrollbar in-palette (the list is 15 providers long). */
.cdm-select-menu::-webkit-scrollbar {
  width: 6px;
}

.cdm-select-menu::-webkit-scrollbar-thumb {
  background: rgba(124, 58, 237, 0.4);
  border-radius: 3px;
}

/* ── Amount field (step 3) ──────────────────────────────────── */
.cdm-amount-field {
  position: relative;
}

.cdm-amount-input {
  width: 100%;
  padding: 15px 40px 15px 16px;
  background: #111114;
  border: 1px solid rgba(124, 58, 237, 0.16);
  border-radius: 14px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.22s ease, background 0.22s ease;
}

.cdm-amount-input::placeholder {
  color: var(--text-muted);
  font-weight: 500;
}

.cdm-amount-input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.08);
}

.cdm-amount-input.is-invalid {
  border-color: rgba(239, 68, 68, 0.55);
}

/* Spinners add nothing to a money field and clip the "$" suffix. */
.cdm-amount-input::-webkit-outer-spin-button,
.cdm-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cdm-amount-input {
  -moz-appearance: textfield;
  appearance: textfield;
}

.cdm-amount-suffix {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-secondary);
  pointer-events: none;
}

.cdm-amount-msg {
  margin-top: 9px;
  font-size: 12px;
  color: var(--red);
}

.cdm-amount-msg[hidden] {
  display: none;
}

/* ── Hand-off card (right column) ───────────────────────────── */
.cdm-pay-title {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.cdm-important {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0 0 14px;
}

.cdm-important-word {
  font-weight: 800;
  color: var(--accent);
}

/* ── Go-to-provider button ──────────────────────────────────── */
.cdm-go-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--purple), var(--accent));
  border: none;
  border-radius: 12px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.cdm-go-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.35);
}

.cdm-go-btn:active:not(:disabled) {
  transform: translateY(0);
}

.cdm-go-btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.55);
  opacity: 0.55;
}

.cdm-go-btn.is-busy {
  cursor: progress;
  opacity: 0.8;
}

/* Same badge as the dropdown, on the gradient: the monogram fallback needs a
   neutral holder rather than the purple gradient it would vanish into. */
.cdm-go-badge {
  width: 24px;
  height: 24px;
  font-size: 11px;
  background: rgba(255, 255, 255, 0.2);
}

/* ── Messages + note ────────────────────────────────────────── */
.cdm-msg {
  margin-top: 12px;
  font-size: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.cdm-msg[hidden] {
  display: none;
}

.cdm-msg--error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
}

.cdm-note {
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-secondary);
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin: 16px 0 4px;
}
