/* Help center: the top-up guide, the coin table, common questions, the terms and the privacy policy */
.help-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.help-actions .rp-note {
  flex: 1;
  min-width: 240px;
}

@media (max-width: 767px) {
  .help-actions .button {
    flex-basis: 100%;
  }
}

/* How to top up */
.help-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.help-step {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.help-step__number {
  display: grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 13px;
  font-weight: 700;
}

.help-step:last-child .help-step__number {
  background: var(--win);
  color: var(--surface-0);
}

.help-step__text {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.help-step__title {
  font-size: 14px;
}

.help-step__body {
  color: var(--ink-muted);
  font-size: 12px;
  line-height: 1.6;
}

.help-warning {
  display: flex;
  gap: var(--space-3);
  padding: 14px 18px;
  border: 1px solid rgb(242 85 90 / 0.45);
  border-radius: var(--radius-lg);
  background: rgb(242 85 90 / 0.08);
}

.help-warning > .icon {
  flex: none;
  margin-top: 1px;
  color: var(--danger);
}

.help-warning__text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.help-warning__title {
  margin: 0;
  font-size: 15px;
}

.help-warning__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin: 0;
  padding-left: 1.2em;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 1099px) {
  .help-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .help-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--surface-2);
  }

  .help-step {
    flex-direction: row;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-radius: 0;
    background: none;
  }

  .help-step + .help-step {
    border-top: 1px solid var(--surface-3);
  }

  .help-step__number {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .help-step__text {
    gap: 2px;
  }
}

/* Supported coins, on the table every help center table shares */
.help-table-box {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

.help-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.help-table thead th {
  padding: 12px 10px 8px;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
}

.help-table :is(tbody th, td) {
  padding: 11px 10px;
  border-top: 1px solid var(--surface-3);
  text-align: left;
  vertical-align: middle;
}

.help-table tr > :first-child {
  padding-left: 18px;
}

.help-table tr > :last-child {
  padding-right: 18px;
}

.coin-table .coin-table__number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.coin-table__coin {
  white-space: nowrap;
}

.coin-table__coin .coin-mark {
  display: inline-grid;
  width: 26px;
  height: 26px;
  margin-right: 10px;
  font-size: 13px;
  vertical-align: middle;
}

.coin-table__networks {
  line-height: 1.9;
}

.coin-table__network {
  display: inline-block;
  margin: 0 4px 0 0;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  font-size: 12px;
  line-height: 1.5;
}

.coin-table__arrival {
  color: var(--ink-muted);
}

.coin-table__label {
  display: none;
}

@media (max-width: 767px) {
  /* Tables drop their heading row and stack each row's cells. */
  .help-table thead {
    display: none;
  }

  .help-table :is(tbody, tr) {
    display: block;
  }

  .help-table tr + tr {
    border-top: 1px solid var(--surface-3);
  }

  .help-table :is(tbody th, td),
  .help-table tr > :is(:first-child, :last-child) {
    padding: 0;
    border: 0;
  }

  /* Each coin becomes two lines: its name and networks, then the minimum, the wait and the rate. */
  .coin-table tr {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 8px;
    padding: var(--space-3) var(--space-4);
  }

  .coin-table__coin {
    grid-column: 1 / 3;
    font-size: 15px;
  }

  .coin-table__networks {
    grid-column: 3;
    justify-self: end;
    line-height: 1.5;
    text-align: right;
  }

  .coin-table__network {
    margin: 0 0 0 4px;
    padding: 2px 6px;
    font-size: 11px;
  }

  .coin-table .coin-table__number {
    grid-row: 2;
    color: var(--ink-muted);
    font-size: 12px;
    text-align: left;
  }

  .coin-table__minimum {
    grid-column: 1;
  }

  .coin-table__arrival {
    grid-column: 2;
  }

  .coin-table__rate {
    grid-column: 3;
  }

  .coin-table__arrival::before,
  .coin-table__rate::before {
    margin-right: 8px;
    content: "·";
  }

  .coin-table__label {
    display: inline;
    margin-right: 4px;
  }
}

/* Common questions */
.help-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--control-md);
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-0);
  color: var(--ink-muted);
}

.help-search:focus-within {
  border-color: var(--focus);
}

.help-search__input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}

.help-search__input::placeholder {
  color: var(--ink-muted);
}

.help-faq {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.help-faq__categories {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.help-faq__category {
  height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  color: var(--ink-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.help-faq__category:hover {
  color: var(--ink);
}

.help-faq__category[aria-pressed="true"] {
  background: var(--accent);
  color: var(--on-accent);
}

.help-faq__list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 18px;
  border-radius: var(--radius-lg);
  background: var(--surface-2);
}

/* Every row draws a line above itself; the list clips the first one, whichever rows the filter hides. */
.help-faq__item,
.help-faq__empty {
  margin-top: -1px;
  border-top: 1px solid var(--surface-3);
}

.help-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 50px;
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: pointer;
}

.help-faq__question::-webkit-details-marker {
  display: none;
}

.help-faq__question .icon {
  flex: none;
  color: var(--ink-muted);
  transition: transform 0.15s ease;
}

.help-faq__item[open] .help-faq__question {
  font-weight: 700;
}

.help-faq__item[open] .help-faq__question .icon {
  transform: rotate(180deg);
}

.help-faq__answer {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-2);
  padding-bottom: var(--space-4);
}

.help-faq__answer .rp-text {
  font-size: 14px;
  line-height: 1.7;
}

.help-faq__empty {
  margin: 0;
  padding: var(--space-4) 0;
  color: var(--ink-muted);
  font-size: 14px;
}

.help-contact {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.help-contact > .icon {
  flex: none;
  color: var(--focus);
}

.help-contact__text {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.help-contact__title {
  margin: 0;
  font-size: 15px;
}

@media (max-width: 767px) {
  .help-faq__categories {
    flex-wrap: nowrap;
    margin: 0 calc(var(--space-4) * -1);
    padding: 0 var(--space-4);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .help-faq__categories::-webkit-scrollbar {
    display: none;
  }

  .help-faq__list {
    padding: 0 var(--space-4);
  }

  .help-contact {
    flex-wrap: wrap;
  }

  .help-contact .button {
    flex-basis: 100%;
  }
}

/* Terms and privacy */
.settings-tabs__divider {
  width: 100%;
  margin: 6px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.help-doc__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
}

.help-doc__date {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
}

.help-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2) var(--space-4);
  margin: 0;
  padding: 0;
  font-size: 14px;
  list-style: none;
}

.help-points li {
  display: flex;
  gap: var(--space-2);
}

.help-points .icon {
  flex: none;
  margin-top: 2px;
  color: var(--win);
}

.help-toc {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.help-toc__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 15px;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.help-toc__title::-webkit-details-marker {
  display: none;
}

.help-toc__title .icon {
  color: var(--ink-muted);
  transition: transform 0.15s ease;
}

.help-toc[open] .help-toc__title .icon {
  transform: rotate(180deg);
}

.help-toc__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px var(--space-4);
  margin: 10px 0 0;
  padding-left: 1.4em;
  color: var(--ink-muted);
  font-size: 14px;
}

.help-doc__section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  scroll-margin-top: 88px;
}

.help-doc__title {
  margin: var(--space-2) 0 0;
  font-size: 16px;
}

.help-doc__section .rp-text {
  font-size: 14px;
}

.help-doc__list {
  margin: 0;
  padding-left: 1.4em;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.8;
}

.help-table-box__title {
  margin: 0;
  padding: 14px 18px 4px;
  font-size: 15px;
}

.privacy-table tbody th {
  font-weight: 600;
}

.privacy-table td {
  color: var(--ink-muted);
}

.privacy-table__label {
  display: none;
}

.help-rights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.help-right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-1);
  padding: 14px var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.help-right__title {
  margin: 0;
  font-size: 14px;
}

.help-right .rp-note {
  font-size: 12px;
}

.help-right__link {
  font-size: 12px;
}

@media (max-width: 767px) {
  .settings-tabs__divider {
    display: none;
  }

  .privacy-table tr {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: var(--space-3) var(--space-4);
  }

  .privacy-table td {
    display: block;
    color: var(--ink);
    font-size: 13px;
  }

  .privacy-table__label {
    display: inline;
    margin-right: 8px;
    color: var(--ink-muted);
    font-weight: 600;
  }

  .help-points,
  .help-toc__list,
  .help-rights {
    grid-template-columns: minmax(0, 1fr);
  }
}
