/* Local responsive layer for the stock-monitor instance.
   It intentionally applies only to narrow phones and tablets. */
@media (max-width: 980px) {
  body.blueprint-watchlist section.content {
    padding-left: .4rem;
    padding-right: .4rem;
  }

  #add-watch-ui,
  #new-watch-form {
    width: 100%;
    box-sizing: border-box;
  }

  #add-watch-ui #add-watch-url-row {
    flex-wrap: wrap;
    gap: .6rem;
  }

  #add-watch-ui #add-watch-url-row > label {
    width: 100%;
  }

  #add-watch-ui #add-watch-go,
  .watch-table .cdio-btn,
  .watch-table .bare-btn {
    min-height: 42px;
  }

  .watch-table thead {
    display: none;
  }

  .watch-table,
  .watch-table tbody {
    display: block;
    width: 100%;
  }

  .watch-table tbody tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto auto auto;
    gap: .55rem .75rem;
    margin: .65rem 0;
    padding: .8rem;
    border: 1px solid var(--color-border-table-cell);
    border-radius: var(--common-round-border);
    background: var(--color-table-background);
  }

  .watch-table tbody tr > td {
    display: block;
    padding: 0 !important;
    border: 0;
    background: transparent !important;
  }

  .watch-table tbody tr > td.checkbox-uuid,
  .watch-table tbody tr > td.watch-processor,
  .watch-table tbody tr > td.last-changed {
    display: none;
  }

  .watch-table tbody tr > td.title-col {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .watch-table tbody tr > td.title-col .watch-title {
    font-size: 1rem;
    line-height: 1.35;
  }

  .watch-table tbody tr > td.restock-and-price {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: center;
  }

  .watch-table tbody tr > td.last-checked {
    grid-column: 1 / -1;
    grid-row: 3;
    align-self: center;
    color: var(--color-text-input-description);
    font-size: .82rem;
    text-align: left;
  }

  .watch-table tbody tr > td.last-checked::before {
    content: attr(data-label) ": ";
  }

  .watch-table tbody tr > td.buttons {
    grid-column: 1;
    grid-row: 4;
  }

  .watch-table tbody tr > td.buttons > div {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
  }

  .watch-table tbody tr > td.watch-controls {
    grid-column: 2;
    grid-row: 4;
    align-self: center;
  }

  .watch-table tbody tr > td.watch-controls button {
    padding: .55rem;
  }
}

@media (max-width: 480px) {
  .status-pill {
    height: 28px;
    padding: 0 9px;
  }

  #top-right-menu {
    gap: .45rem;
  }

  .watch-table tbody tr {
    padding: .7rem;
  }
}
