/* Phone pricing accordion: table-row inside a block tbody stacks/ghosts. */

#grid tbody > tr.is-collapsed {
  display: none !important;
}

@media (max-width: 760px) {
  #grid.price-narrow > tbody > tr.is-collapsed {
    display: none !important;
  }
  #grid.price-narrow > tbody > tr {
    display: block;
    position: relative;
    isolation: isolate;
    width: 100%;
    box-sizing: border-box;
    background: var(--tg-theme-bg-color, #fff);
  }
  #grid.price-narrow > tbody > .pr-fee-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 2px 10px;
    border-bottom: 1px solid rgba(127, 127, 127, .14);
  }
  #grid.price-narrow > tbody > .pr-fee-row > td {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  #grid.price-narrow .led-inline-table {
    display: block;
    width: 100%;
    min-width: 0;
  }
  #grid.price-narrow .led-inline-table thead {
    display: none;
  }
  #grid.price-narrow .led-inline-table tbody,
  #grid.price-narrow .led-inline-table tr.ftrow {
    display: block;
    width: 100%;
  }
  #grid.price-narrow .led-inline-table tr.ftrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) 36px;
    gap: 4px;
    margin: 0 0 6px;
  }
  #grid.price-narrow .pr-row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  #grid.price-narrow > tbody > .pr-data-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 8px;
    padding: 8px 4px 10px;
  }
  #grid.price-narrow > tbody > .pr-data-row > td.txt,
  #grid.price-narrow > tbody > .pr-data-row > td.acts {
    grid-column: 1 / -1;
  }
  #grid.price-narrow .pr-provenance { display: block; margin-top: 2px; }
  #deal-form-modal #form .nf-preview-bar { pointer-events:none; position:relative; z-index:1; }
  #deal-form-modal #form .nf-actions-sticky {
    position: fixed; left: 8px; right: 8px;
    bottom: env(safe-area-inset-bottom, 0px);
    margin: 0; padding: 8px;
    z-index: 12;
    pointer-events: auto;
  }
}

@media (max-width: 420px) {
  body.lite .wallet-card .ui-actions,
  body.pro .wallet-card .ui-actions,
  .wallet-card .ui-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
  }
  .wallet-card .ui-actions > button,
  .wallet-card .ui-actions > .rk,
  .wallet-card .ui-actions > .del {
    width: auto;
    min-width: 0;
    max-width: none;
  }
}
