/* Responsive data views: cards (mobile) + scrollable tables (tablet/desktop) */

.bn-responsive-data {
  width: 100%;
}

.bn-data-cards,
.bn-user-ads__cards {
  display: none;
  gap: 12px;
}

.bn-data-card,
.bn-user-ads__card {
  display: block;
  padding: 14px 16px;
  border: 1px solid #262626;
  border-radius: 12px;
  background: #0a0a0a;
  color: #fff;
}

.bn-data-card.is-own,
.bn-user-ads__card.is-own {
  border-color: rgba(190, 94, 250, 0.35);
}

.bn-data-card__head,
.bn-user-ads__card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.bn-data-card__who {
  min-width: 0;
}

.bn-data-card__title,
.bn-user-ads__card-pair {
  display: block;
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  word-break: break-word;
}

.bn-data-card__rate strong {
  display: block;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.bn-data-card__label,
.bn-data-card__field > span,
.bn-user-ads__card-field span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7e8fa0;
  margin-bottom: 2px;
}

.bn-data-card__grid,
.bn-user-ads__card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-bottom: 12px;
}

.bn-data-card__field strong,
.bn-data-card__field em,
.bn-user-ads__card-field strong,
.bn-user-ads__card-field em {
  display: block;
  font-style: normal;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: #e7e5e4;
  word-break: break-word;
}

.bn-data-card__actions,
.bn-user-ads__card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bn-data-card__actions .btn,
.bn-user-ads__card-actions .btn {
  flex: 1 1 auto;
  min-width: min(100%, 8rem);
}

.bn-data-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  color: #a8a29e;
  font-size: 0.875rem;
}

.bn-data-table-wrap,
.bn-user-ads__table {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.bn-table-scroll > .table,
.bn-table-scroll > table,
.bn-table-scroll .custom--table {
  width: 100%;
  margin-bottom: 0;
  border-collapse: collapse;
}

.bn-table-scroll .custom--table thead th,
.bn-table-scroll table thead th {
  white-space: nowrap;
  vertical-align: middle;
}

.bn-table-scroll .custom--table tbody td,
.bn-table-scroll table tbody td {
  white-space: nowrap;
  vertical-align: middle;
}

.bn-ads-cell--payment {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bn-ads-cell--rate,
.bn-user-ads__mono {
  font-variant-numeric: tabular-nums;
}

.bn-market-ads__table { min-width: 720px; }

.bn-market-ads__table thead th,
.bn-market-ads__table tbody td {
  vertical-align: middle;
}

.bn-market-ads__table thead th:last-child,
.bn-market-ads__table tbody td.bn-market-ads__action {
  width: 1%;
  text-align: center;
}

.bn-market-ads__action .p2p-dash__btn,
.bn-market-ads__action .btn--base,
.bn-data-card__actions .p2p-dash__btn--primary,
.bn-data-card__actions .p2p-dash__btn--sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  min-height: 34px;
}
.bn-profile-ads .custom--table { min-width: 580px; }
.bn-trd-list-table { min-width: 880px; }
.bn-user-ads__grid-table { min-width: 920px; }
.wlfi-table-wrap.bn-table-scroll .custom--table { min-width: 640px; }

/* Mobile: cards */
@media (max-width: 767px) {
  .bn-responsive-data .bn-data-cards,
  .bn-responsive-data .bn-user-ads__cards {
    display: grid;
  }

  .bn-responsive-data .bn-data-table-wrap,
  .bn-responsive-data .bn-user-ads__table {
    display: none !important;
  }

  .bn-data-card__grid,
  .bn-user-ads__card-grid {
    grid-template-columns: 1fr;
  }
}

/* Tablet: compact scrollable tables */
@media (min-width: 768px) and (max-width: 1023px) {
  .bn-responsive-data .bn-data-cards,
  .bn-responsive-data .bn-user-ads__cards {
    display: none !important;
  }

  .bn-table-scroll .custom--table thead th,
  .bn-table-scroll .custom--table tbody td {
    padding: 10px 12px !important;
    font-size: 0.8125rem !important;
  }
}

/* Desktop: full tables */
@media (min-width: 768px) {
  .bn-responsive-data .bn-data-cards,
  .bn-responsive-data .bn-user-ads__cards {
    display: none !important;
  }

  .bn-responsive-data .bn-data-table-wrap,
  .bn-responsive-data .bn-user-ads__table {
    display: block !important;
  }
}

/* Prevent legacy stacked-table mode from breaking layout */
@media (max-width: 991px) {
  body.pw-app-site .bn-table-scroll thead,
  body.pw-app .bn-table-scroll thead {
    display: table-header-group !important;
  }

  body.pw-app-site .bn-table-scroll tbody tr,
  body.pw-app .bn-table-scroll tbody tr {
    display: table-row !important;
  }

  body.pw-app-site .bn-table-scroll tr th,
  body.pw-app-site .bn-table-scroll tr td,
  body.pw-app .bn-table-scroll tr th,
  body.pw-app .bn-table-scroll tr td {
    display: table-cell !important;
    padding-left: inherit !important;
    text-align: left !important;
  }
}

/* Trade list mobile cards */
.trd-list-cards {
  display: none;
  gap: 12px;
}

.trd-list-card {
  padding: 14px 16px;
  border: 1px solid #262626;
  border-radius: 12px;
  background: rgba(10, 10, 10, 0.95);
}

.trd-list-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.trd-list-card__user {
  font-weight: 700;
  color: #fff;
}

.trd-list-card__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.trd-list-card__field span {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #7e8fa0;
  margin-bottom: 2px;
}

.trd-list-card__field strong {
  display: block;
  font-size: 0.8125rem;
  color: #e7e5e4;
  word-break: break-word;
}

.trd-list-card__actions {
  display: flex;
  gap: 8px;
}

.trd-list-card__actions .btn {
  flex: 1;
}

@media (max-width: 767px) {
  .trd-list-responsive .trd-list-cards {
    display: grid;
  }

  .trd-list-responsive .trd-list-table-wrap {
    display: none !important;
  }

  .trd-list-card__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) {
  .trd-list-responsive .trd-list-cards {
    display: none !important;
  }

  .trd-list-responsive .trd-list-table-wrap {
    display: block !important;
  }
}
