/*
 * Deposit withdrawals (member) — a tidier page, phones first.
 * The markup is platform.js's; member-withdrawals.js folds the policy box.
 */

/* --- The header: Refresh beside the title, not on a row of its own ------------
   The copy block steps out of the way (display: contents) so the title, the
   description and the button can each be placed: title and button on the first
   row, the description across the width under both. */
.member-withdrawals-hero {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: .75rem;
  row-gap: 0;
  align-items: center;
}

.member-withdrawals-hero__copy {
  display: contents;
}

.member-withdrawals-hero__title {
  grid-column: 1;
  grid-row: 1;
  margin: 0 !important;
}

.member-withdrawals-hero__subtitle {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: .4rem !important;
}

.member-withdrawals-hero > .btn {
  grid-column: 2;
  grid-row: 1;
  white-space: nowrap;
}

/* --- The policy: one line until it is opened ----------------------------------- */
.member-withdrawals-policy.wdp {
  display: block;
  padding: 0;
  overflow: hidden;
}

.member-withdrawals-policy.wdp > .member-withdrawals-policy__icon {
  display: none;
}

.wdp__toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .7rem .9rem;
  border: 0;
  background: transparent;
  color: #1e3a8a;
  text-align: left;
  cursor: pointer;
}

.wdp__icon {
  font-size: 1rem;
  line-height: 1;
}

.wdp__text {
  min-width: 0;
}

.wdp__title {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.wdp__gist {
  display: block;
  margin-top: .1rem;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.4;
}

.wdp__chev {
  font-size: 12px;
  transition: transform .15s ease;
}

.wdp.is-open .wdp__chev {
  transform: rotate(180deg);
}

.member-withdrawals-policy.wdp .member-withdrawals-policy__list {
  margin: 0;
  padding: 0 .9rem .8rem 2.35rem;
}

/* --- Said once, not three times ------------------------------------------------ */

/* The selected account's lock message is the form's alert just below it. */
.member-withdrawals-account-card--active .member-withdrawals-account-card__hint {
  display: none;
}

@media (max-width: 640px) {
  .member-withdrawals-hero {
    padding: .85rem .9rem !important;
  }

  .member-withdrawals-hero__title {
    font-size: 1.15rem !important;
  }

  .member-withdrawals-hero__subtitle {
    font-size: 12.5px !important;
    line-height: 1.5 !important;
  }

  /*
   * The form repeated the selected account card right above it: its balance and the
   * most that can be withdrawn. On a phone that is a screen of the same two figures;
   * the card keeps them, the form keeps what is new — when the deposit was opened and
   * when withdrawal opens.
   */
  .member-withdrawals-form-grid > .member-withdrawals-summary-tile:nth-child(-n + 2) {
    display: none;
  }

  .member-withdrawals-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
