/* Tienda — stock por talla y color (demo-modulos/tienda-stock.js). Theme tokens only: page (prospect's colour), Vidrio, Rapport. */

/* page: the product sheet */
#pdBody .opt input:disabled + label, #pdBody label.tst-off { opacity: .6; border-style: dashed; text-decoration: none; cursor: not-allowed; }
#pdBody label .tst-tag { font-size: .85em; font-weight: 600; }
.tst-linea { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; margin: 2px 0 6px; padding: 10px 12px; border-radius: 12px;
  background: color-mix(in srgb, var(--accent) 8%, transparent); border: 1px dashed color-mix(in srgb, var(--fg) 22%, transparent); color: var(--fg); font-size: 14px; line-height: 1.4; }
.tst-linea[data-poco="true"] .tst-txt { font-weight: 700; color: var(--accent-ink, var(--fg)); }
.tst-linea[hidden] { display: none; }
.tst-ul { margin: 0; padding-left: 18px; display: grid; gap: 2px; }

/* panel */
.tst-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 8px; }
.tst-head h3 { margin: 0; }
.tst-umbral { margin: 0; align-items: center; }
.tst-umbral .ndf-f { grid-template-columns: auto auto; align-items: center; gap: 8px; }
.tst-num { width: 84px; text-align: right; font-variant-numeric: tabular-nums; }
/* a long product name (the prospect's) would push the phone sideways: the picker shrinks to its row */
label[for="tstProd"] { grid-template-columns: minmax(0, 1fr); flex: 1 1 auto; }
#tstProd { width: 100%; max-width: 28rem; min-width: 0; text-overflow: ellipsis; }
.tst-st { --c: var(--accent-ink); display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); }
.tst-st[data-st="agotado"] { --c: #fca5a5; }
.tst-st[data-st="poco"], .tst-st[data-st="lento"] { --c: #fcd34d; }
.tst-st[data-st="quieto"] { --c: color-mix(in srgb, var(--fg) 72%, transparent); }
html:is([data-nd-panel="rapport"], [data-nd-panel="tablero"]) .tst-st[data-st="agotado"] { --c: #b42318; }
html:is([data-nd-panel="rapport"], [data-nd-panel="tablero"]) :is(.tst-st[data-st="poco"], .tst-st[data-st="lento"]) { --c: #92400e; }
.tst-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 8px; }
.tst-grid li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--fg) 12%, transparent); min-width: 0; }
.tst-grid label { display: grid; gap: 1px; min-width: 0; cursor: pointer; }
.tst-grid label b { font-size: 14px; overflow-wrap: anywhere; }
.tst-grid label small { color: var(--muted); font-size: 12px; }
.tst-table th:first-child { white-space: normal; }
@media (max-width: 480px) { .tst-table th, .tst-table td { padding: 8px 6px; } .tst-table tbody th { min-width: 0; } }

/* the panel's Hoy (panel.inicio): «Tallas que se acaban» (ropa) and «Tonos agotados» (belleza). Colours from the panel's
   --danger / --warn, measured at 4.5:1 in light and dark; the state is also said in words for screen readers */
/* the block's body may be a grid or flex item: the wrap holds its width, never the page */
.tst-hoy-wrap { margin: 0 0 8px; max-width: 100%; min-width: 0; }
[data-bloque="tienda-stock-tallas"], [data-bloque="tienda-stock-tallas"] > * { min-width: 0; }
.tst-hoy { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tst-hoy th, .tst-hoy td { padding: 6px 3px; text-align: center; border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); text-transform: none; letter-spacing: normal; }
.tst-hoy thead th { font-size: 12px; font-weight: 600; color: var(--muted); }
.tst-hoy tbody th { text-align: left; font-weight: 600; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.tst-hoy tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.tst-hoy-c { display: inline-block; min-width: 1.6em; font-weight: 700; color: color-mix(in srgb, var(--fg) 45%, transparent); }
/* a phone: a card per product (and colour) with only the sizes to restock as chips in words («S · Agotado», «M · Queda 1»);
   the grid hides (display: none also takes it from screen readers, so nothing is read twice) */
.tst-hoy-cards { display: none; list-style: none; margin: 0; padding: 0; }
@media (max-width: 599px) {
  .tst-hoy, .tst-hoy-ley { display: none; }
  .tst-hoy-cards { display: grid; }
  .tst-hoy-cards li { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid color-mix(in srgb, var(--fg) 10%, transparent); min-width: 0; }
  .tst-hoy-cards li:first-child { padding-top: 0; }
  .tst-hoy-cards b { font-size: 14px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
  .tst-hoy-cards b small { font-size: 13px; font-weight: 400; color: var(--muted); }
  .tst-hoy-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .tst-hoy-chip { --c: var(--fg); display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
    color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); background: color-mix(in srgb, var(--c) 8%, transparent); white-space: nowrap; }
  .tst-hoy-chip[data-st="agotado"] { --c: var(--danger, #b42318); }
  .tst-hoy-chip[data-st="poco"] { --c: var(--warn, #92400e); }
  .tst-hoy-k { color: var(--fg); }
}
.tst-hoy-c[data-st="agotado"] { color: var(--danger, #b42318); }
.tst-hoy-c[data-st="poco"] { color: var(--warn, #92400e); }
.tst-hoy-tonos { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 8px; font-size: 14px; line-height: 1.45; }
.tst-hoy-tonos li { display: grid; gap: 2px; }
.tst-hoy-t { white-space: nowrap; }
.tst-hoy-t .tst-hoy-c { min-width: 0; }
.tst-hoy-pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; margin: 0; font-size: 13px; color: var(--muted); }
.tst-hoy-ver { min-height: 44px; display: inline-flex; align-items: center; }
