/* Bank accounts (BankAccountsView.swift, from the site's bank_accounts.css). Shares withdraw.css's colours, buttons
   and notes. */

.ba-body {
  display: flex;
  flex-direction: column;
  color: var(--wd-ink);
}
.ba-intro {
  margin: -6px 0 18px;
  text-align: center;
  font-size: 13px;
  line-height: 1.5;
  color: var(--wd-muted);
}
.ba-intro strong,
.ba-hint strong {
  color: var(--wd-ink);
}
.ba-notice {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--wd-green);
  background: var(--wd-green-soft);
}
.ba-notice.is-error {
  color: var(--wd-red);
  background: var(--wd-red-soft);
}

/* Saved accounts */
.ba-saved-head {
  padding: 6px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.ba-saved-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.ba-saved-count {
  font-size: 12px;
  font-weight: 700;
  color: var(--wd-muted);
}
.ba-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ba-card {
  padding: 16px 16px 4px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--wd-line);
  box-shadow: 0 5px 18px var(--wd-card-shadow);
}
.ba-card.is-default {
  border-color: color-mix(in srgb, var(--wd-brand) 45%, transparent);
}
.ba-card-main {
  display: flex;
  align-items: center;
  gap: 13px;
}
.ba-card-main .wd-default {
  align-self: flex-start;
}
.ba-card-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.ba-card-bank,
.ba-card-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ba-card-bank {
  font-size: 15px;
  font-weight: 700;
}
.ba-card-name {
  padding-top: 2px;
  font-size: 12px;
  color: var(--wd-muted);
}
.ba-card-number {
  padding-top: 5px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  font-variant-numeric: tabular-nums;
}
.ba-card-warning {
  margin-top: 12px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--wd-red);
  background: var(--wd-red-soft);
}
.ba-card-actions {
  margin-top: 13px;
  padding-top: 2px;
  border-top: 1px solid var(--wd-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
}
.ba-card-note {
  font-size: 12px;
  color: var(--wd-muted);
}
.ba-action {
  min-height: 44px;
  font-size: 13px;
  font-weight: 700;
  color: var(--wd-brand);
}
.ba-action.is-remove {
  color: var(--wd-red);
}
.ba-empty {
  padding: 28px 22px;
  border-radius: 16px;
  border: 1px dashed var(--wd-field-line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.ba-empty-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 4px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--wd-brand);
  background: var(--wd-brand-soft);
}
.ba-empty-title {
  font-size: 15px;
  font-weight: 700;
}
.ba-empty-text,
.ba-max {
  font-size: 13px;
  color: var(--wd-muted);
}
.ba-max {
  padding-top: 16px;
  font-size: 12px;
  text-align: center;
}

/* Add bank account */
.ba-add {
  margin-top: 16px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--wd-line);
  box-shadow: 0 5px 18px var(--wd-card-shadow);
}
.ba-add-toggle {
  width: 100%;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  color: var(--wd-ink);
}
.ba-add-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: var(--wd-brand);
  border: 1.5px dashed var(--wd-brand);
}
.ba-add-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ba-add-title {
  font-size: 15px;
  font-weight: 700;
}
.ba-add-subtitle {
  font-size: 12px;
  color: var(--wd-muted);
}
.ba-chevron {
  font-size: 13px;
  color: var(--wd-muted);
  transition: transform 0.2s;
}
.ba-chevron.is-open {
  transform: rotate(180deg);
}
.ba-add-body {
  padding: 0 18px 18px;
}
.ba-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.ba-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.ba-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}
.ba-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--wd-muted);
}
.ba-count,
.ba-match {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--wd-muted);
}
.ba-count.is-done,
.ba-match.is-ok {
  color: var(--wd-green);
}
.ba-match:not(.is-ok) {
  color: var(--wd-red);
}
.ba-field-box {
  min-height: 48px;
  padding: 0 13px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--wd-field-line);
  transition: border-color 0.15s;
}
.ba-field-box:focus-within {
  border-color: var(--wd-brand);
}
.ba-field-box.is-filled {
  background: var(--wd-surface2);
}
.ba-field-box.is-filled .ba-input {
  font-weight: 600;
}
.ba-field-box.is-invalid {
  border-color: var(--wd-red);
}
.ba-input {
  flex: 1;
  min-width: 0;
  height: 46px;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--wd-ink);
}
.ba-input::placeholder {
  color: color-mix(in srgb, var(--wd-muted) 70%, transparent);
}
.ba-input.is-number {
  letter-spacing: 1.5px;
  font-variant-numeric: tabular-nums;
}
.ba-spinner {
  width: 16px;
  height: 16px;
  flex: none;
  border-radius: 50%;
  border: 2px solid var(--wd-line);
  border-top-color: var(--wd-muted);
  animation: loading-spin 0.8s linear infinite;
}
.ba-lookup {
  padding: 0 2px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--wd-muted);
}
.ba-lookup.is-ok {
  color: var(--wd-green);
}
.ba-lookup.is-error {
  color: var(--wd-red);
}
.ba-hint {
  padding: 0 2px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--wd-muted);
}
.ba-hint.is-error {
  font-weight: 600;
  color: var(--wd-red);
}
.ba-save {
  margin-top: 5px;
}

/* The bank button and the picker */
.ba-bank-button {
  height: 52px;
  padding: 0 12px 0 8px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  color: var(--wd-ink);
  background: var(--surface);
  border: 1px solid var(--wd-field-line);
}
.ba-bank-button:focus-visible {
  border-color: var(--wd-brand);
}
.ba-bank-placeholder {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  color: var(--wd-muted);
  background: var(--wd-surface2);
}
.ba-bank-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ba-bank-name.is-empty {
  font-weight: 400;
  color: var(--wd-muted);
}
.ba-picker {
  padding: 8px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--wd-ink);
}
.ba-picker-title {
  text-align: center;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
}
.ba-search {
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--wd-field-line);
  outline: none;
  font: inherit;
  font-size: 15px;
  color: var(--wd-ink);
  background: var(--wd-surface2);
}
.ba-search:focus {
  border-color: var(--wd-brand);
}
.ba-bank-list {
  display: flex;
  flex-direction: column;
}
.ba-bank-option {
  min-height: 52px;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--wd-ink);
  border-bottom: 1px solid var(--wd-line);
}
.ba-bank-option:hover,
.ba-bank-option:focus-visible {
  background: var(--wd-surface2);
  outline: none;
}
.ba-bank-option-name {
  flex: 1;
  min-width: 0;
}
.ba-bank-option.is-selected {
  font-weight: 700;
}
.ba-bank-option .icon {
  font-size: 14px;
  color: var(--wd-brand);
}
.ba-no-banks {
  padding: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--wd-muted);
}
