/* The wide store logo must leave room for all three mobile header controls. */
.store-logo { width: clamp(6.2rem, calc(100vw - 15rem), 11.25rem); }
.signin-card { max-width: 25rem; }
#sections { --bs-offcanvas-width: min(18rem, 85vw); }
[data-bs-theme="light"] .theme-dark-icon, [data-bs-theme="dark"] .theme-light-icon { display: none; }

/* Reserve space for photos and charts while their contents load. */
.stock-trend { width: 144px; height: 48px; }
.product-thumb { width: 3rem; height: 3rem; }
.product-picture { width: 10rem; height: 10rem; }
.product-cell { min-width: 14rem; max-width: 28rem; }
.chart-container { height: clamp(15rem, 32vw, 21rem); }
.chart-container.compact { height: 15rem; }
.table { font-variant-numeric: tabular-nums; }

/* Keep small labels legible and outline buttons readable in both color modes. */
.badge { --bs-badge-font-size: .875rem; }
.btn-outline-secondary { --bs-btn-color: var(--bs-secondary-color); }
[data-bs-theme="dark"] .btn-outline-danger { --bs-btn-color: var(--bs-danger-text-emphasis); }
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: var(--bs-link-color); }

.highlight-list { max-height: 21rem; }

.app-main { min-width: 0; }
.app-content { max-width: 100rem; }
.settings-content { max-width: 64rem; }
.app-main .card {
  --bs-card-cap-bg: var(--bs-card-bg);
  --bs-card-cap-padding-y: .875rem;
}
.app-main .table > :not(caption) > * > :first-child { padding-inline-start: 1rem; }
.app-main .table > :not(caption) > * > :last-child { padding-inline-end: 1rem; }
.app-main .table > thead > tr > th { background-color: var(--bs-tertiary-bg); vertical-align: middle; }
.app-main .table > tbody > tr > td { padding-block: .75rem; }
/* The adjoining pager or card provides the table's bottom edge. */
.card > .table-responsive > .table > tbody > tr:last-child > td { border-bottom-width: 0; }
.catalog-table :is(th, td):nth-child(n+3):nth-child(-n+5),
.catalog-table :is(th, td):nth-child(7),
.catalog-table :is(th, td):nth-child(8) { text-align: end; }
@media (min-width: 992px) and (max-width: 1399.98px) {
  .catalog-table > :not(caption) > tr > :is(th, td) { padding-inline: .25rem; }
}
.sort-link { display: inline-flex; align-items: center; gap: .25rem; text-decoration: none; }
.sort-link:hover, .sort-link:focus-visible { text-decoration: underline; }
.app-main summary:hover { background-color: rgba(var(--bs-emphasis-color-rgb), .06); }
.app-main summary:focus-visible { outline: 2px solid var(--bs-emphasis-color); outline-offset: -2px; }
/* Keep the native marker alongside a two-column label. */
.competitor-summary {
  display: inline-grid;
  width: calc(100% - 1.5em);
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: .75rem;
  vertical-align: top;
}
@media (min-width: 992px) {
  .app-sidebar { width: 11rem; flex-shrink: 0; border-inline-end: var(--bs-border-width) solid var(--bs-border-color); }
  .app-main .card {
    --bs-card-spacer-x: 1.5rem;
    --bs-card-spacer-y: 1.25rem;
    --bs-card-cap-padding-x: 1.5rem;
  }
}

[data-bs-theme="light"] .app-main {
  --bs-link-color-rgb: var(--bs-link-hover-color-rgb);
}
[data-bs-theme="light"] .app-main .btn-outline-primary { --bs-btn-color: var(--bs-link-hover-color); }
