/* Бурж donor storefront — clean, fast, filterable catalog. Indigo бурж accent. */
.t1c-burzh { --bz: #4f46e5; --bz-soft: #eef2ff; --ink: #1f2937; --mut: #6b7280; --line: #e5e7eb;
  color: var(--ink); font-size: 14px; }
.t1c-burzh * { box-sizing: border-box; }

.t1c-burzh-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.t1c-burzh-head h2 { margin: 0; font-size: 22px; font-weight: 700; }
.t1c-burzh-sub { color: var(--mut); font-size: 13px; }
.t1c-burzh-sub b { color: var(--bz); }

/* toolbar — sticky: filters stay at hand while the table scrolls with the page.
   The thead sticks right below it (top offset = live toolbar height, set as
   --bz-stick by JS via ResizeObserver). */
.t1c-burzh-toolbar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center;
  padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  /* --bz-top = height of any OTHER fixed top bars (staging banner, admin bar) —
     measured live in JS so the sticky toolbar never slides under them. */
  position: sticky; top: var(--bz-top, 0px); z-index: 30; }
.t1c-burzh-search { flex: 1 1 220px; min-width: 180px; }
.t1c-burzh-search input { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.t1c-burzh-search input:focus { border-color: var(--bz); box-shadow: 0 0 0 3px var(--bz-soft); }

.t1c-burzh-fgroup { display: flex; flex-direction: column; gap: 4px; }
.t1c-burzh-fgroup > label { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .03em; font-weight: 600; }

/* facet dropdowns (Тематика / Тип) — chips in a scrollable panel */
.t1c-burzh-dd { position: relative; }
.t1c-burzh-dd-btn.active { border-color: var(--bz); color: var(--bz); font-weight: 600; }
.t1c-burzh-dd-count { display: none; margin-left: 5px; background: var(--bz); color: #fff;
  border-radius: 999px; padding: 1px 7px; font-size: 11px; font-style: normal; }
.t1c-burzh-dd-count.show { display: inline-block; }
.t1c-burzh-dd-panel { position: absolute; left: 0; top: 42px; z-index: 25; display: none; width: 400px;
  max-width: 86vw; max-height: 320px; overflow: auto; padding: 12px; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,24,40,.12); }
.t1c-burzh-dd-panel.open { display: block; }

.t1c-burzh-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.t1c-burzh-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border: 1px solid var(--line);
  border-radius: 999px; font-size: 12px; cursor: pointer; user-select: none; background: #fff; transition: all .12s; }
.t1c-burzh-chip:hover { border-color: var(--bz); }
.t1c-burzh-chip input { margin: 0; accent-color: var(--bz); }
.t1c-burzh-chip:has(input:checked) { background: var(--bz-soft); border-color: var(--bz); color: var(--bz); font-weight: 600; }
.t1c-burzh-chip span { color: var(--mut); font-size: 11px; }

.t1c-burzh-tools { margin-left: auto; display: flex; gap: 8px; position: relative; }
.t1c-burzh-btn { padding: 8px 12px; border: 1px solid var(--line); background: #fff; border-radius: 9px;
  font-size: 13px; cursor: pointer; color: var(--ink); transition: all .12s; }
.t1c-burzh-btn:hover { border-color: var(--bz); color: var(--bz); }
#t1c-burzh-colmenu { position: absolute; right: 0; top: 40px; z-index: 20; display: none; flex-direction: column;
  gap: 6px; padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(16,24,40,.12); min-width: 160px; }
#t1c-burzh-colmenu.open { display: flex; }
#t1c-burzh-colmenu label { font-size: 13px; display: flex; gap: 7px; align-items: center; cursor: pointer; }
#t1c-burzh-colmenu input { accent-color: var(--bz); }

/* ── Advanced filters: an inline builder between toolbar and table ── */
.t1c-burzh-advanced[hidden] { display: none !important; }
.t1c-burzh-advanced {
  margin: -4px 0 14px; padding: 16px; background: #fff; border: 1px solid #c7d2fe;
  border-radius: 12px; box-shadow: 0 8px 28px rgba(79,70,229,.10);
}
.t1c-burzh-advanced.open { animation: t1c-burzh-advanced-open 300ms cubic-bezier(.22,1,.36,1) both; }
@keyframes t1c-burzh-advanced-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .t1c-burzh-advanced.open { animation: none; }
}
.t1c-burzh-advanced-toggle { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.t1c-burzh-advanced-toggle.active,
.t1c-burzh-advanced-toggle[aria-expanded="true"] { border-color: var(--bz); color: var(--bz); font-weight: 600; background: var(--bz-soft); }
.t1c-burzh-advanced-arr { color: #64748b; }
.t1c-burzh-advanced-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.t1c-burzh-advanced-head h3 { margin: 0 0 3px; font-size: 16px; color: #1e293b; }
.t1c-burzh-advanced-head p { margin: 0; color: var(--mut); font-size: 12px; }
.t1c-burzh-advanced-close { border: 0; background: transparent; color: #94a3b8; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 2px; }
.t1c-burzh-advanced-close:hover { color: #334155; }
.t1c-burzh-advanced-grid { display: grid; grid-template-columns: minmax(260px, .65fr) minmax(640px, 1.35fr); gap: 18px; }
.t1c-burzh-advanced-section { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #fafbff; }
.t1c-burzh-advanced-section-title { display: flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 10px; }
.t1c-burzh-advanced-section-title strong { font-size: 13px; color: #334155; }
.t1c-burzh-advanced-section-title span { color: var(--mut); font-size: 11px; }
.t1c-burzh-advanced-section-title span.has-selection { color: var(--bz); font-weight: 600; }
.t1c-burzh-advanced-topics { max-height: 148px; overflow: auto; align-content: flex-start; padding-right: 3px; }
.t1c-burzh-advanced-subsection { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.t1c-burzh-advanced-languages { max-height: 270px; overflow: auto; align-content: flex-start; padding-right: 3px; }
.t1c-burzh-acceptor-filter[hidden] { display: none; }
.t1c-burzh-acceptor-filter summary { display: flex; align-items: center; gap: 8px; min-height: 30px; color: #334155; cursor: pointer; list-style: none; }
.t1c-burzh-acceptor-filter summary::-webkit-details-marker { display: none; }
.t1c-burzh-acceptor-filter summary::after { content: '▾'; margin-left: auto; color: #64748b; transition: transform .15s; }
.t1c-burzh-acceptor-filter[open] summary::after { transform: rotate(180deg); }
.t1c-burzh-acceptor-filter summary strong { font-size: 13px; }
.t1c-burzh-acceptor-filter summary span { color: var(--mut); font-size: 11px; }
.t1c-burzh-acceptor-filter summary span.has-selection { color: var(--bz); font-weight: 600; }
.t1c-burzh-acceptor-filter.has-selection summary { color: var(--bz); }
.t1c-burzh-acceptor-panel { padding-top: 9px; }
.t1c-burzh-acceptor-panel p { margin: 0 0 8px; color: var(--mut); font-size: 11px; line-height: 1.45; }
.t1c-burzh-acceptor-panel input[type="search"] { width: 100%; min-height: 34px; margin-bottom: 9px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #334155; font-size: 13px; }
.t1c-burzh-acceptor-panel input[type="search"]:focus { outline: none; border-color: var(--bz); box-shadow: 0 0 0 2px var(--bz-soft); }
.t1c-burzh-acceptors { max-height: 190px; overflow: auto; align-content: flex-start; padding-right: 3px; }
.t1c-burzh-acceptors [hidden] { display: none; }
.t1c-burzh-rules { display: flex; flex-direction: column; gap: 7px; }
.t1c-burzh-rule { display: grid; grid-template-columns: minmax(250px, 1.7fr) minmax(145px, .7fr) minmax(170px, .9fr); gap: 7px; align-items: center; }
.t1c-burzh-rule select,
.t1c-burzh-rule input,
.t1c-burzh-presets select,
.t1c-burzh-preset-name input { width: 100%; min-height: 34px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #334155; font-size: 13px; }
.t1c-burzh-rule select:focus,
.t1c-burzh-rule input:focus,
.t1c-burzh-presets select:focus,
.t1c-burzh-preset-name input:focus { outline: none; border-color: var(--bz); box-shadow: 0 0 0 2px var(--bz-soft); }
.t1c-burzh-advanced-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.t1c-burzh-presets { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.t1c-burzh-presets select { width: 210px; }
.t1c-burzh-preset-delete { color: #b91c1c; }
.t1c-burzh-preset-delete:disabled { opacity: .45; cursor: default; }
.t1c-burzh-preset-name { display: flex; align-items: center; gap: 6px; }
.t1c-burzh-preset-name[hidden] { display: none; }
.t1c-burzh-preset-name input { width: 210px; }
.t1c-burzh-preset-status { min-height: 18px; color: #047857; font-size: 12px; }
.t1c-burzh-preset-status.error { color: #b91c1c; }
.t1c-burzh-advanced-actions { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.t1c-burzh-advanced-found { color: var(--mut); font-size: 12px; white-space: nowrap; }
.t1c-burzh-advanced-found b { color: var(--bz); font-size: 13px; }
.t1c-burzh-filter-reset { border-color: #a5b4fc; background: var(--bz-soft); color: var(--bz); font-weight: 600; }
.t1c-burzh-filter-reset:hover { border-color: var(--bz); background: #e0e7ff; color: #3730a3; }

/* table
   No inner vertical scroll: the wheel always scrolls the PAGE (an inner scroller
   trapped the wheel when the cursor was over the table). overflow:visible also
   lets the sticky thead stick to the viewport while the page scrolls; narrow
   screens fall back to horizontal overflow only (media query below). */
.t1c-burzh-table-wrap { border: 1px solid var(--line); border-radius: 12px; overflow: visible; background: #fff;
  box-shadow: 0 1px 2px rgba(16,24,40,.04); }
@media (max-width: 900px) {
  .t1c-burzh-table-wrap { overflow-x: auto; }
}
.t1c-burzh-table { width: max-content; border-collapse: separate; border-spacing: 0; }
/* Every column starts at its intrinsic nowrap width. JS measures the resulting
   table and turns spare wrapper width into the SAME left/right gutter for every
   visible column. Thus Тематика grows only when its text needs it; on a wide
   screen the breathing room is shared evenly instead of accumulating beside one
   column. When content is wider than the viewport the fallback stays compact. */
.t1c-burzh-table { --bz-cell-pad: 8px; }
.t1c-burzh-table thead th { position: sticky; top: var(--bz-stick, 0px); z-index: 5; background: #f9fafb; text-align: left;
  padding: 11px var(--bz-cell-pad); font-size: 13px; font-weight: 600; color: #475569; text-transform: none; letter-spacing: 0;
  border-bottom: 1px solid var(--line); white-space: nowrap; }
.t1c-burzh-th[data-sort] { cursor: pointer; user-select: none; }
.t1c-burzh-th[data-sort]:hover { color: var(--bz); }
.t1c-burzh-arr { color: var(--bz); }
/* Column with a tooltip: dotted underline as the affordance (hover the header
   to see the data-source explanation via the native title tooltip). */
.t1c-burzh-lbl.has-tip { text-decoration: underline dotted rgba(100,116,139,.5); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.t1c-burzh-th:hover .t1c-burzh-lbl.has-tip { text-decoration-color: var(--bz); }
.t1c-burzh-dash { color: #cbd5e1; }
.t1c-burzh-yes { color: #16a34a; font-weight: 700; }
/* «Банковский» money style (вариант 13): prices and cart total — bold,
   near-black, tight tracking, tabular figures. */
.t1c-burzh-money { font-weight: 700; color: #0f172a; letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.t1c-burzh-table th.num, .t1c-burzh-table td.num { text-align: right; }
.t1c-burzh-table th.cen, .t1c-burzh-table td.cen { text-align: center; }
.t1c-burzh-table { font-variant-numeric: tabular-nums lining-nums; }
.t1c-burzh-table tbody td { padding: 11px var(--bz-cell-pad); border-bottom: 1px solid #f3f4f6; white-space: nowrap; vertical-align: middle; }
.t1c-burzh-table tbody tr:hover { background: #fafaff; }
.t1c-burzh-table tbody tr:last-child td { border-bottom: none; }

.t1c-burzh-did { font-weight: 700; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--ink);
  letter-spacing: .01em; cursor: help; }
.t1c-burzh-metric { display: inline-block; min-width: 30px; text-align: center; padding: 2px 7px; border-radius: 6px;
  font-weight: 700; font-size: 13px; }
.t1c-burzh-metric.hi { background: #dcfce7; color: #166534; }
.t1c-burzh-metric.mid { background: #fef9c3; color: #854d0e; }
.t1c-burzh-metric.lo { background: #f3f4f6; color: #6b7280; }
.t1c-burzh-tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--bz-soft);
  color: var(--bz); font-size: 12px; font-weight: 600; }
/* Language code — quieter than the thematic pill: it is a two-letter tag, not a
   label to read. Monospace-ish tracking keeps the column visually aligned. */
.t1c-burzh-lang { display: inline-block; font-size: 12px; font-weight: 600;
  letter-spacing: .04em; color: #475569; cursor: help; }
.t1c-burzh-slots { font-weight: 600; }

.t1c-burzh-act { text-align: right; }
.t1c-burzh-th-act { text-align: right !important; padding-top: 5px !important; padding-bottom: 5px !important; }
.t1c-burzh-th-act #t1c-burzh-addall { padding: 7px 12px; white-space: nowrap; }
/* Same blue as the quick-order (.t1c-op-btn) «В корзину» buttons — one CTA color everywhere. */
.t1c-burzh-buy { padding: 7px 13px; border: none; border-radius: 8px; background: #3b82f6; color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .12s, transform .05s; }
.t1c-burzh-buy:hover { background: #2563eb; }
.t1c-burzh-buy:active { transform: translateY(1px); }
.t1c-burzh-buy:disabled { opacity: .6; cursor: default; }

/* states */
.t1c-burzh-status { display: none; padding: 40px 16px; text-align: center; color: var(--mut); }
.t1c-burzh[data-status=loading] .t1c-burzh-status,
.t1c-burzh[data-status=error] .t1c-burzh-status,
.t1c-burzh[data-status=empty] .t1c-burzh-status,
.t1c-burzh[data-status=noresults] .t1c-burzh-status { display: block; }
.t1c-burzh[data-status=loading] .t1c-burzh-status::before { content: 'Загружаем площадки…'; }
.t1c-burzh[data-status=empty] .t1c-burzh-status::before { content: 'Пока нет доступных площадок.'; }
.t1c-burzh[data-status=noresults] .t1c-burzh-status::before { content: 'Ничего не найдено — измените фильтры.'; }
.t1c-burzh[data-status=loading] .t1c-burzh-table-wrap,
.t1c-burzh[data-status=error] .t1c-burzh-table-wrap,
.t1c-burzh[data-status=empty] .t1c-burzh-table-wrap { display: none; }

/* mobile */
@media (max-width: 640px) {
  .t1c-burzh-tools { margin-left: 0; width: 100%; }
  .t1c-burzh-table { min-width: 0; }
  .t1c-burzh-head h2 { font-size: 19px; }
}

@media (max-width: 1050px) {
  .t1c-burzh-advanced-grid { grid-template-columns: 1fr; }
}

/* «+ Все в корзину» in the table action header + live count badge */
.t1c-burzh-btn-primary { background: #3b82f6; color: #fff; border-color: #3b82f6; font-weight: 600; }
.t1c-burzh-btn-primary:hover { background: #2563eb; border-color: #2563eb; color: #fff; }
.t1c-burzh-btn-primary:disabled { opacity: .6; cursor: default; }
#t1c-burzh-addall-n { font-weight: 700; }

/* per-row cart toggle: added state */
.t1c-burzh-buy.in-cart { background: #ecfdf5; border-color: #34d399; color: #047857; }
.t1c-burzh-buy.in-cart:hover { background: #fef2f2; border-color: #fca5a5; color: #b91c1c; }

/* floating cart bar (bottom-right) */
#t1c-burzh-cartbar { position: fixed; right: 18px; bottom: 18px; z-index: 90;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(16,24,40,.18); font-size: 14px; }
#t1c-burzh-cartbar[hidden] { display: none; }
.t1c-burzh-cartbar-ico { font-size: 18px; }
#t1c-burzh-cartbar-info b { color: var(--bz); }
.t1c-burzh-cartbar-go { padding: 8px 16px; border-radius: 10px; font-weight: 700; color: #fff !important;
  background: linear-gradient(135deg, #667eea, #22c55e); text-decoration: none !important; white-space: nowrap; }
.t1c-burzh-cartbar-go:hover { opacity: .92; }
.t1c-burzh-cartbar-clear { padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
  color: var(--mut); font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.t1c-burzh-cartbar-clear:hover { border-color: #ef4444; color: #ef4444; background: #fef2f2; }
.t1c-burzh-cartbar-clear.armed { border-color: #ef4444; color: #fff; background: #ef4444; }
.t1c-burzh-cartbar-clear:disabled { opacity: .6; cursor: default; }

/* corner toasts */
#t1c-burzh-toasts { position: fixed; right: 18px; bottom: 84px; z-index: 95;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.t1c-burzh-toast { max-width: 360px; padding: 10px 14px; background: #111827; color: #f9fafb;
  border-radius: 10px; font-size: 13px; line-height: 1.45; box-shadow: 0 8px 24px rgba(16,24,40,.25);
  opacity: 0; transform: translateY(6px); transition: opacity .18s, transform .18s; }
.t1c-burzh-toast.show { opacity: 1; transform: translateY(0); }
.t1c-burzh-toast b { color: #6ee7b7; }
.t1c-burzh-toast.warn b { color: #fcd34d; }

/* mobile filter toggle — desktop never sees it */
.t1c-burzh-mtoggle { display: none; }
.t1c-burzh-mtoggle .t1c-burzh-dd-count { margin-left: 5px; }

/* ─── Mobile (≤768px): compact sticky strip [поиск][Фильтры ▾] ── */
@media (max-width: 768px) {
  .t1c-burzh-toolbar { padding: 8px 10px; gap: 8px; }
  .t1c-burzh-mtoggle { display: inline-flex; align-items: center; white-space: nowrap; }
  /* collapsed by default: only search + toggle stay visible */
  .t1c-burzh-toolbar:not(.open) .t1c-burzh-dd,
  .t1c-burzh-toolbar:not(.open) .t1c-burzh-advanced-toggle,
  .t1c-burzh-toolbar:not(.open) .t1c-burzh-tools { display: none; }
  .t1c-burzh-toolbar.open .t1c-burzh-tools { margin-left: 0; width: 100%; flex-wrap: wrap; }
  .t1c-burzh-search { flex: 1 1 120px; min-width: 0; }
  .t1c-burzh-search input { padding: 8px 10px; font-size: 16px; } /* 16px = no iOS zoom */
  .t1c-burzh-head { margin-bottom: 10px; }
  .t1c-burzh-dd-panel { width: min(400px, 92vw); }
  .t1c-burzh-advanced { padding: 12px; }
  .t1c-burzh-rule { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
  .t1c-burzh-rule select[data-rule-part="field"] { grid-column: 1 / -1; }
  .t1c-burzh-advanced-foot, .t1c-burzh-presets, .t1c-burzh-preset-name { align-items: stretch; }
  .t1c-burzh-presets, .t1c-burzh-preset-name { width: 100%; }
  .t1c-burzh-presets select, .t1c-burzh-preset-name input { flex: 1 1 180px; width: auto; }
  .t1c-burzh-advanced-actions { width: 100%; justify-content: space-between; margin-left: 0; }

  /* floating cart bar: full-width strip, nothing overflows the viewport */
  #t1c-burzh-cartbar { left: 10px; right: 10px; bottom: 10px; padding: 10px 12px;
    gap: 8px; font-size: 13px; justify-content: space-between; }
  #t1c-burzh-cartbar-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t1c-burzh-cartbar-go { padding: 8px 12px; }
  #t1c-burzh-toasts { left: 10px; right: 10px; bottom: 66px; align-items: stretch; }
  .t1c-burzh-toast { max-width: none; }
}

@media (max-width: 520px) {
  .t1c-burzh-advanced-section-title { flex-wrap: wrap; }
}

/* ── Guest storefront bar (logged-out visitors, t1c_geo_guest_enabled) ── */
.t1c-burzh-guestbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
    margin: 0 0 18px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
}
.t1c-burzh-guestbar a {
    font-weight: 600;
    white-space: nowrap;
}

/* Tagline under the catalog title: what is sold + placement term. */
.t1c-burzh-tagline {
    margin: 2px 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
}

/* Per-facet reset button inside a dropdown panel (языки). */
.t1c-burzh-facet-clear {
    display: block;
    width: 100%;
    margin-top: 8px;
    text-align: center;
}

/* Slot held by another client: the row stays (scarcity sells), the buy button
   becomes a live countdown. */
.t1c-burzh-reserved {
    display: inline-block;
    padding: 4px 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.t1c-burzh-slots.is-reserved { color: #94a3b8; }
