/* Loaded only by base_v2.html. The existing pages keep app.css untouched.
   Two jobs: point Tabler at the self-hosted font, and the handful of shell
   rules Tabler has no class for. Nothing here restyles a page's contents. */

@font-face {
  font-family: "Vazirmatn";
  /* One variable file covers 100-900, which is fewer bytes than three cuts. */
  src: url("/static/vendor/vazirmatn/vazirmatn-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --tblr-font-family-sans-serif: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  /* Persian text sits low in the line box; a touch more leading makes long
     Persian labels readable without changing any Tabler spacing scale. */
  --tblr-body-line-height: 1.7;
}

body {
  font-family: var(--tblr-font-family-sans-serif);
}

/* Persian and Arabic digits render with Latin-ish figures in some fallbacks;
   keep numerals tabular so counts in the sidebar do not jitter as they change. */
.badge, .navbar-vertical .nav-link-title {
  font-variant-numeric: tabular-nums;
}

/* The sidebar group headers are buttons, not links: strip the affordances a
   link carries so they do not read as destinations of their own. */
.nav-group-toggle {
  background: none;
  border: 0;
  width: 100%;
  text-align: start;
}

/* The chevron points at the group and turns when it opens. */
.nav-group-toggle .nav-group-caret {
  transition: transform .15s ease-in-out;
}
.nav-group-toggle[aria-expanded="true"] .nav-group-caret {
  transform: rotate(90deg);
}

/* ── Tables that stack instead of scrolling ───────────────────────────────
   A table on a phone can shrink until it is unreadable or scroll sideways so
   the row's actions fall off the edge. Below md each row becomes a card and
   each cell carries its column name, which the `cell` macro puts in
   data-label. Above md it is an ordinary table and none of this applies. */

.ui-table-wrap { width: 100%; }

@media (max-width: 767.98px) {
  .ui-table, .ui-table tbody, .ui-table tr, .ui-table td { display: block; width: 100%; }
  .ui-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .ui-table .ui-row {
    border: 1px solid var(--tblr-border-color);
    border-radius: var(--tblr-border-radius);
    margin-bottom: .75rem;
    padding: .25rem .75rem;
  }
  .ui-table .ui-cell {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border: 0;
    border-bottom: 1px solid var(--tblr-border-color-light);
    padding: .5rem 0;
  }
  /* The column name, shown only in the stacked layout. */
  .ui-table .ui-cell::before {
    content: attr(data-label);
    color: var(--tblr-secondary);
    font-size: .8125rem;
    flex: 0 0 auto;
  }
  .ui-table .ui-cell[data-label=""]::before { content: none; }
  /* Actions become the card's footer rather than a labelled field. */
  .ui-table .ui-cell-actions { border-bottom: 0; justify-content: flex-start; }
  .ui-table .ui-cell-actions > div { justify-content: flex-start !important; }
  .ui-table .ui-row .ui-cell:last-child { border-bottom: 0; }
}

/* The receipt thumbnail on the review queue: same size it has always been. */
.ui-receipt {
  max-width: 120px;
  max-height: 120px;
  border-radius: var(--tblr-border-radius);
  border: 1px solid var(--tblr-border-color);
  display: block;
}

/* Icon sizes as classes rather than an inline style, so no page or macro in
   the new layer writes `style="…"` at all. */
.ui-icon-sm { width: 16px; height: 16px; }
.ui-icon-md { width: 20px; height: 20px; }
.ui-icon-lg { width: 40px; height: 40px; }

/* A bank SMS or a regular expression, shown verbatim. It wraps instead of
   scrolling, because on a phone a sideways-scrolling message is unreadable. */
.ui-code {
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--tblr-bg-surface-secondary);
  border-radius: var(--tblr-border-radius);
  padding: .5rem .75rem;
  font-size: .8125rem;
}

/* The hour and minute boxes on the cron screen: wide enough for two digits
   and no wider, so the two sit either side of the colon as one control. */
.ui-time { width: 5rem; }
