.membership-status.payment_failed,
.membership-status.expired {
  background: rgba(204, 77, 77, .1);
  color: #b54747;
}

.membership-status.pending,
.membership-status.processing {
  background: rgba(217, 135, 40, .12);
  color: #9b651d;
}

.attempt-row > span:nth-child(4) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attempt-row > span:nth-child(4) small {
  white-space: normal;
}

.membership-attempt-dialog {
  width: min(720px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(6, 13, 25, .3);
}

.membership-attempt-dialog::backdrop {
  background: rgba(8, 16, 29, .6);
  backdrop-filter: blur(3px);
}

.membership-attempt-dialog > section {
  padding: 24px;
}

.membership-attempt-dialog header,
.membership-attempt-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.membership-attempt-dialog header {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.membership-attempt-dialog header h2 {
  margin: 4px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}

.membership-attempt-dialog header button {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
  font-size: 20px;
}

.membership-attempt-dialog footer {
  justify-content: flex-end;
  padding-top: 18px;
}

.attempt-detail-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 0;
}

.attempt-detail-status > span {
  color: var(--muted);
  font-size: 11px;
}

.attempt-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow: hidden;
}

.attempt-detail-grid > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.attempt-detail-grid > div:nth-child(2n) {
  border-right: 0;
}

.attempt-detail-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.attempt-detail-grid span,
.attempt-detail-grid strong,
.attempt-detail-grid small,
.attempt-detail-grid code {
  display: block;
}

.attempt-detail-grid span,
.attempt-failure span {
  color: var(--muted);
  font-size: 10px;
}

.attempt-detail-grid strong,
.attempt-detail-grid code {
  margin-top: 6px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.attempt-detail-grid small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.attempt-detail-grid code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.attempt-failure {
  margin-top: 12px;
  padding: 14px;
  border-radius: 7px;
  background: var(--surface-muted);
}

.attempt-failure p {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 620px) {
  .attempt-detail-status {
    align-items: flex-start;
    flex-direction: column;
  }

  .attempt-detail-grid {
    grid-template-columns: 1fr;
  }

  .attempt-detail-grid > div {
    border-right: 0;
  }

  .attempt-detail-grid > div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
}

.membership-payment-attempts {
  margin-top: 14px;
  padding: 21px;
}

.membership-payment-attempts .section-toolbar {
  margin-bottom: 14px;
}

.membership-payment-attempts .section-toolbar p:last-child {
  margin: 6px 0 0;
  font-size: 11px;
}

.membership-attempt-list {
  display: grid;
  gap: 8px;
}

.membership-attempt-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-muted);
}

.membership-attempt-list article > div {
  min-width: 0;
}

.membership-attempt-list strong,
.membership-attempt-list small,
.membership-attempt-list code {
  display: block;
}

.membership-attempt-list strong {
  margin-top: 8px;
  font-size: 13px;
}

.membership-attempt-list small,
.membership-attempt-list code,
.membership-attempt-list p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.membership-attempt-list code {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.membership-attempt-list p {
  margin-bottom: 0;
  color: #a85d35;
}

.membership-attempt-list .button {
  flex: 0 0 auto;
}

.attempt-processing-note {
  flex: 0 0 auto;
  color: #9b651d;
  font-size: 11px;
  font-weight: 700;
}

@media (max-width: 620px) {
  .membership-attempt-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .membership-attempt-list .button {
    width: 100%;
  }
}
