/* ============================================================
   VegasBet — Balance Transfer (/profile/transfer)
   Client-to-client transfers: the form card, the confirmation
   card and the success plaque.
   Design tokens (--pf-*) come from .profile-layout in profile.css,
   so every rule here lives inside that scope.
   No blue, no inline styles, no frameworks.
   ============================================================ */

/* ── Layout ─────────────────────────────────────────────────── */
.bt-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: flex-start;
}

.bt-main,
.bt-side {
  min-width: 0;
}

/* ── Form card ──────────────────────────────────────────────── */
.bt-card {
  background: var(--pf-panel);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.bt-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.14);
  background: linear-gradient(120deg, rgba(124, 58, 237, 0.10), transparent 65%);
}

.bt-card-title {
  font-family: var(--pf-heading);
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .4px;
}

.bt-card-badge {
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.bt-card-body {
  padding: 24px;
}

.bt-step {
  margin-bottom: 22px;
}

.bt-step-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--pf-muted);
  margin-bottom: 12px;
}

.bt-field-hint {
  margin-top: 9px;
  font-size: 12px;
  color: var(--pf-muted);
}

.bt-balance-hint {
  font-size: 12px;
  color: var(--pf-idle);
  text-align: right;
  margin-bottom: 9px;
}

/* ── Inputs ─────────────────────────────────────────────────── */
.bt-input-wrap {
  background: var(--pf-field);
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 11px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: border-color .2s, box-shadow .2s;
}

.bt-input-wrap:focus-within {
  border-color: rgba(168, 85, 247, .55);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.10);
}

.bt-input-wrap.bt-field-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.16);
  animation: btFieldShake 0.4s ease;
}

@keyframes btFieldShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}

.bt-input {
  flex: 1;
  min-width: 0;
  background: none;
  border: none;
  outline: none;
  color: #fff;
  font-size: 15px;
  padding: 13px 0;
}

.bt-input::placeholder {
  color: #5c5668;
}

/* Number inputs: drop the spin buttons so the field matches the text one. */
.bt-input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.bt-input[type="number"]::-webkit-outer-spin-button,
.bt-input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.bt-input-prefix {
  font-size: 15px;
  font-weight: 700;
  color: var(--pf-muted);
  flex-shrink: 0;
}

.bt-max-btn {
  background: rgba(168, 85, 247, .12);
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  cursor: pointer;
  letter-spacing: .5px;
  transition: background .2s;
}

.bt-max-btn:hover {
  background: rgba(168, 85, 247, .22);
}

/* ── Submit ─────────────────────────────────────────────────── */
.bt-submit-btn {
  position: relative;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  border: none;
  border-radius: var(--pf-radius-sm);
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 4px;
  animation: pfPulseGlow 3s ease-in-out infinite;
  transition: transform .2s;
}

.bt-submit-btn:hover {
  transform: translateY(-2px);
}

.bt-submit-spinner { display: none; }

.bt-submit-btn.bt-loading,
.bt-modal-btn.bt-loading {
  pointer-events: none;
  opacity: .94;
}

.bt-submit-btn.bt-loading .bt-submit-label,
.bt-modal-btn.bt-loading .bt-submit-label {
  visibility: hidden;
}

.bt-submit-btn.bt-loading .bt-submit-spinner,
.bt-modal-btn.bt-loading .bt-submit-spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: btSpin 0.6s linear infinite;
}

@keyframes btSpin { to { transform: rotate(360deg); } }

/* ── Info rows ──────────────────────────────────────────────── */
.bt-info-rows {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(124, 58, 237, 0.12);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bt-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bt-info-row-label {
  font-size: 13px;
  color: var(--pf-muted);
}

.bt-info-row-value {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

/* ── Error plate (same language as the withdraw alert) ──────── */
.bt-alert:empty { display: none; }

.bt-alert {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 42px 13px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(255, 50, 80, 0.14), rgba(255, 50, 80, 0.04));
  border: 1px solid rgba(255, 77, 109, 0.33);
  animation: btAlertIn 0.45s cubic-bezier(0.2, 1.2, 0.3, 1) both,
             btAlertShake 0.5s ease 0.1s;
}

.bt-alert-accent {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #ff4d6d;
  box-shadow: 0 0 14px #ff4d6d;
}

.bt-alert-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #ff4d6d;
  box-shadow: 0 0 18px #ff4d6d;
}

.bt-alert-icon svg { width: 20px; height: 20px; display: block; }

.bt-alert-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #ffd0d8;
  line-height: 1.35;
}

.bt-alert-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: #ffd0d8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: .7;
  transition: opacity .2s;
}

.bt-alert-close:hover { opacity: 1; }

@keyframes btAlertIn {
  from { opacity: 0; transform: translateY(-8px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes btAlertShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
  80% { transform: translateX(-2px); }
}

/* ── Side card ──────────────────────────────────────────────── */
.bt-side-card {
  position: relative;
  overflow: hidden;
  padding: 24px 22px;
  background: var(--pf-panel);
  border: 1px solid var(--pf-border);
  border-radius: var(--pf-radius);
}

.bt-side-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(320px 180px at 100% -10%, rgba(168, 85, 247, 0.14), transparent 70%);
  pointer-events: none;
}

.bt-side-icon {
  position: relative;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--accent);
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
  animation: pfFloatY 4.5s ease-in-out infinite;
}

.bt-side-icon svg { width: 22px; height: 22px; }

.bt-side-title {
  position: relative;
  font-family: var(--pf-heading);
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .4px;
  margin-bottom: 14px;
}

.bt-side-list {
  position: relative;
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bt-side-list li {
  position: relative;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--pf-idle);
}

.bt-side-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 0 10px rgba(168, 85, 247, .55);
}

.bt-side-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--pf-lilac);
  text-decoration: none;
  transition: color .2s, gap .2s;
}

.bt-side-link:hover {
  color: var(--hover-text);
  gap: 10px;
}

.bt-side-link svg { width: 14px; height: 14px; }

/* ════════════════════════════════════════════════════════════
   Confirmation card + success plaque
   ════════════════════════════════════════════════════════════ */

.bt-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  animation: btBackdropIn .28s ease both;
}

/* JS toggles [hidden]; the display:flex above would otherwise win (the same
   [hidden] cascade footgun documented in CLAUDE.md). */
.bt-modal-backdrop[hidden] { display: none; }

.bt-modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  padding: 34px 28px 26px;
  text-align: center;
  background: var(--pf-panel);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--pf-radius);
  box-shadow: 0 0 48px rgba(124, 58, 237, 0.18), 0 8px 32px rgba(0, 0, 0, 0.60);
  animation: btCardIn .5s cubic-bezier(.16, 1, .3, 1) both;
}

.bt-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--pf-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: color .18s, background .18s;
}

.bt-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.bt-modal-close svg { width: 15px; height: 15px; }

.bt-modal-icon {
  width: 58px;
  height: 58px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  animation: btIconPop .55s cubic-bezier(.34, 1.56, .64, 1) .12s both;
}

.bt-modal-icon svg { width: 28px; height: 28px; }

.bt-modal-title {
  font-family: var(--pf-heading);
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: .5px;
  animation: btRise .45s ease .14s backwards;
}

.bt-modal-text {
  font-size: 13.5px;
  color: var(--pf-idle);
  line-height: 1.5;
  margin: 0 0 20px;
  animation: btRise .45s ease .22s backwards;
}

.bt-modal-strong {
  color: #fff;
  font-weight: 700;
}

.bt-modal-amount {
  font-family: var(--pf-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--green);
  margin: 0 0 10px;
  letter-spacing: .5px;
  animation: btRise .45s ease .18s backwards;
}

/* Recipient summary inside the confirmation card */
.bt-confirm-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  margin-bottom: 22px;
  text-align: left;
  border-radius: var(--pf-radius-sm);
  background: rgba(124, 58, 237, 0.07);
  border: 1px solid rgba(124, 58, 237, 0.22);
  animation: btRise .45s ease .26s backwards;
}

.bt-confirm-avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--pf-heading);
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  box-shadow: 0 0 18px rgba(168, 85, 247, .45);
}

.bt-confirm-lines {
  flex: 1;
  min-width: 0;
}

.bt-confirm-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pf-muted);
  margin-bottom: 3px;
}

.bt-confirm-login {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bt-confirm-amount {
  flex-shrink: 0;
  font-family: var(--pf-heading);
  font-size: 19px;
  font-weight: 800;
  color: var(--accent);
}

.bt-modal-actions {
  display: flex;
  gap: 12px;
  animation: btRise .45s ease .30s backwards;
}

.bt-modal-btn {
  position: relative;
  flex: 1;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s, background .2s, border-color .2s, box-shadow .2s;
}

.bt-modal-btn--primary {
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  color: #fff;
}

.bt-modal-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(124, 58, 237, .45);
}

.bt-modal-btn--ghost {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.35);
  color: #e4ddf3;
}

.bt-modal-btn--ghost:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.6);
}

/* Success variant */
.bt-modal-card--success {
  border-color: rgba(16, 185, 129, 0.4);
}

.bt-modal-card--success .bt-modal-icon {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: var(--green);
}

.bt-modal-card--success .bt-modal-btn--primary {
  background: linear-gradient(135deg, #10b981, #059669);
}

.bt-modal-card--success .bt-modal-btn--primary:hover {
  box-shadow: 0 14px 32px rgba(16, 185, 129, .40);
}

@keyframes btBackdropIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes btCardIn {
  0%   { opacity: 0; transform: translateY(26px) scale(.9); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes btIconPop {
  0%   { opacity: 0; transform: scale(0) rotate(-28deg); }
  60%  { opacity: 1; transform: scale(1.18) rotate(8deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}
@keyframes btRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .bt-layout { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .bt-card-body { padding: 20px 18px; }
  .bt-modal-card { padding: 28px 20px 22px; }
  .bt-modal-actions { flex-direction: column-reverse; }
  .bt-confirm-summary { flex-wrap: wrap; }
  .bt-confirm-amount { width: 100%; text-align: right; }
}

@media (prefers-reduced-motion: reduce) {
  .bt-modal-backdrop,
  .bt-modal-card,
  .bt-modal-icon,
  .bt-modal-title,
  .bt-modal-text,
  .bt-modal-amount,
  .bt-modal-actions,
  .bt-confirm-summary,
  .bt-submit-btn,
  .bt-side-icon,
  .bt-alert { animation: none !important; }
}
