/* onec-products.css: «Товари (1С)» (web/onec-products.js) and one shop's day (web/onec-day.js). Built on the kit (ea-ui.css): switch, chips, hero,
   stats, panels, delta pills, sheet. This file keeps the page's own: filters row, big number, tappable lines with
   a bar, the folder path, product rows, the search field. Designed for 440 and 427 CSS px (README). */
:is(#onec-products-root, #onec-day-root) .op-filters { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin: 2px 0 12px; }
/* the chips arrive with the first answer: their row is held so nothing below jumps */
:is(#onec-products-root, #onec-day-root) .op-shops { align-self: stretch; min-width: 0; margin-bottom: 0; min-height: 34px; max-height: 44px; opacity: 1; }
:is(#onec-products-root, #onec-day-root).op-off .ea-switch-wrap, :is(#onec-products-root, #onec-day-root).op-off .op-filters { display: none; }
:is(#onec-products-root, #onec-day-root) .op-body, :is(#onec-products-root, #onec-day-root) .op-top { display: flex; flex-direction: column; gap: 12px; }
:is(#onec-products-root, #onec-day-root) .op-body { transition: opacity 0.2s; }
:is(#onec-products-root, #onec-day-root) .op-body--busy { opacity: 0.55; pointer-events: none; }
:is(#onec-products-root, #onec-day-root) .op-sk { height: 256px; border-radius: var(--ea-r-hero, 22px); background: rgba(255, 255, 255, 0.04); animation: eaFade 0.6s ease both; }
:is(#onec-products-root, #onec-day-root) .op-sk--list { height: 320px; border-radius: 18px; }

:is(#onec-products-root, #onec-day-root) .op-stale { padding: 8px 12px; border-radius: 12px; font-size: 13px; color: var(--ea-watch); background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.28); }
/* the Магазини cards' recipe: a vivid 500 shade at 12 % → 3 % with a 28 % border (a chosen shop tints it) */
:is(#onec-products-root, #onec-day-root) .op-hero {
    --op-t: #06b6d4;
    background: linear-gradient(160deg, color-mix(in srgb, var(--op-t) 12%, transparent), color-mix(in srgb, var(--op-t) 3%, transparent)), var(--ea-hero-bg);
    border-color: color-mix(in srgb, var(--op-t) 28%, transparent);
}
:is(#onec-products-root, #onec-day-root) .op-hero .ea-kicker { min-width: 0; line-height: 1.35; }
:is(#onec-products-root, #onec-day-root) .op-big { margin-top: 10px; font-size: 34px; font-weight: 750; letter-spacing: -0.025em; line-height: 1.05; white-space: nowrap; font-variant-numeric: tabular-nums; }
:is(#onec-products-root, #onec-day-root) .op-cmp { margin-top: 4px; min-height: 18px; font-size: 13px; color: var(--ea-ink-3); }
:is(#onec-products-root, #onec-day-root) .op-split { margin-top: 12px; }
:is(#onec-products-root, #onec-day-root) .ea-stat__v small { margin-left: 4px; }

/* a tappable ranked line: name · (pill) · value · chevron, a sub line, a thin bar */
:is(#onec-products-root, #onec-day-root) .op-lines { margin-top: 4px; }
:is(#onec-products-root, #onec-day-root) .op-line { display: block; width: 100%; text-align: left; padding: 10px 0; border-top: 1px solid var(--ea-line); background: none; color: inherit; }
:is(#onec-products-root, #onec-day-root) .op-line:first-child { border-top: 0; }
:is(#onec-products-root, #onec-day-root) .op-line__top { display: flex; align-items: center; gap: 8px; }
:is(#onec-products-root, #onec-day-root) .op-line__name { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.25; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
:is(#onec-products-root, #onec-day-root) .op-line__val { font-size: 15px; font-weight: 700; white-space: nowrap; }
:is(#onec-products-root, #onec-day-root) .op-line__sub { display: block; margin: 2px 0 6px; font-size: 12px; color: var(--ea-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:is(#onec-products-root, #onec-day-root) .op-chev { flex-shrink: 0; color: var(--ea-ink-4); }
:is(#onec-products-root, #onec-day-root) .op-line:active, :is(#onec-products-root, #onec-day-root) button.op-prod:active { opacity: 0.7; }
:is(#onec-products-root, #onec-day-root) .op-line .ea-row__bar { display: block; margin-top: 0; height: 3px; }
:is(#onec-products-root, #onec-day-root) .op-line .ea-row__fill { display: block; }
/* a folder tap lands the panel just under the stuck switch and the glass header */
:is(#onec-products-root, #onec-day-root) #op-folders { scroll-margin-top: 112px; }
:is(#onec-products-root, #onec-day-root) .ea-stat__s .ea-delta { font-size: 11px; }

:is(#onec-products-root, #onec-day-root) .op-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 4px 0 2px -6px; font-size: 13px; }
:is(#onec-products-root, #onec-day-root) .op-crumb { min-height: 36px; padding: 6px; border-radius: 8px; color: #fbbf24; font-weight: 600; background: none; text-align: left; }
:is(#onec-products-root, #onec-day-root) .op-crumb:disabled { color: var(--ea-ink); cursor: default; }
:is(#onec-products-root, #onec-day-root) .op-crumb__sep { color: var(--ea-ink-4); }

:is(#onec-products-root, #onec-day-root) .op-tools { display: flex; flex-direction: column; gap: 10px; margin: 10px 0 4px; }
:is(#onec-products-root, #onec-day-root) .op-sorts { display: flex; }
:is(#onec-products-root, #onec-day-root) .op-sorts .ea-seg__btn { flex: 1; padding: 6px 4px; }
:is(#onec-products-root, #onec-day-root) .op-search { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--ea-line); background: rgba(255, 255, 255, 0.04); color: var(--ea-ink-3); }
:is(#onec-products-root, #onec-day-root) .op-search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--ea-ink); font-size: 16px; /* 16 px: no iOS zoom on focus */ }

:is(#onec-products-root, #onec-day-root) .op-prod { display: block; width: 100%; padding: 10px 0; text-align: left; border-top: 1px solid var(--ea-line); }
:is(#onec-products-root, #onec-day-root) .op-prod:first-child { border-top: 0; }
:is(#onec-products-root, #onec-day-root) .op-prod__top { display: flex; align-items: flex-start; gap: 10px; }
:is(#onec-products-root, #onec-day-root) .op-prod__name { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; line-height: 1.3; }
:is(#onec-products-root, #onec-day-root) .op-prod__val { font-size: 14px; font-weight: 700; white-space: nowrap; }
:is(#onec-products-root, #onec-day-root) .op-prod__sub { display: block; margin-top: 3px; font-size: 12px; line-height: 1.5; color: var(--ea-ink-2); }
:is(#onec-products-root, #onec-day-root) .op-prod__sub .ea-delta { margin-left: 4px; vertical-align: 1px; }
:is(#onec-products-root, #onec-day-root) .op-prod--neg .op-prod__val { color: var(--ea-bad); }
:is(#onec-products-root, #onec-day-root) .op-foot { text-align: center; margin: 4px 8px 24px; }

/* the one-product sheet */
.op-sheet .ea-sheet__title { font-size: 18px; line-height: 1.25; }
.op-sheet .op-sk--sheet { height: 240px; border-radius: 16px; background: rgba(255, 255, 255, 0.04); animation: eaFade 0.6s ease both; }
.op-sheet .op-sheet__meta { font-size: 12px; line-height: 1.4; color: var(--ea-ink-3); }
.op-sheet .op-sheet__h { margin-top: 20px; font-size: 13px; font-weight: 650; color: var(--ea-ink-2); }
.op-sheet .ea-row__val { font-size: 14px; }
.op-sheet .ea-stat__v small { margin-left: 3px; }

/* one shop's day: the message when a day has no sales yet */
#onec-day-root .ea-msg { padding: 26px 18px; text-align: center; font-size: 13px; line-height: 1.5; color: var(--ea-ink-2); }
#onec-day-root .ea-msg b { color: var(--ea-ink); font-size: 15px; }

/* The day as a dark till receipt (Sasha 01.11, option A after trying the cream paper): torn top and bottom edges */
#onec-day-root .rc {
    --p: #161a24; --ink: #f1f2f5; --mut: rgba(255, 255, 255, 0.55); --line: rgba(255, 255, 255, 0.2); --acc: #22d3ee;
    position: relative;
    margin-top: 14px;
    padding: 7px 0;
    color: var(--ink);
    animation: eaRise 0.4s var(--ea-ease, ease) both;
}
#onec-day-root .rc, #onec-day-root .rc * { font-family: Menlo, 'Droid Sans Mono', 'DejaVu Sans Mono', monospace; /* only faces with Cyrillic: a Latin-only first face mixes two fonts in one line */ }
#onec-day-root .rc::before,
#onec-day-root .rc::after { content: ''; position: absolute; left: 0; right: 0; height: 7px; background-size: 14px 14px; background-repeat: repeat-x; }
#onec-day-root .rc::before { top: 0; background-image: linear-gradient(135deg, transparent 50%, var(--p) 50%), linear-gradient(-135deg, transparent 50%, var(--p) 50%); }
#onec-day-root .rc::after { bottom: 0; background-image: linear-gradient(45deg, transparent 50%, var(--p) 50%), linear-gradient(-45deg, transparent 50%, var(--p) 50%); background-position: 0 -7px; }
#onec-day-root .rc__in { padding: 20px 18px 18px; background: var(--p); }
#onec-day-root .rc__h { text-align: center; font-size: 12.5px; line-height: 1.55; color: var(--mut); }
#onec-day-root .rc__h b { display: block; margin-bottom: 3px; font-size: 17px; letter-spacing: 0.14em; color: var(--ink); }
#onec-day-root .rc__d { margin: 13px 0; border-top: 1.5px dashed var(--line); }
#onec-day-root .rc__r { padding: 6px 0; }
/* the right side stays free for the price column: a long name wraps to its second line before reaching it */
#onec-day-root .rc__n { padding-right: 84px; font-size: 13px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; color: #fff; }
#onec-day-root .rc__l { display: flex; align-items: baseline; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--mut); }
#onec-day-root .rc__l i { flex: 1; min-width: 12px; border-bottom: 1.5px dotted var(--line); transform: translateY(-3px); }
#onec-day-root .rc__l b { font-weight: 700; white-space: nowrap; color: var(--ink); }
#onec-day-root .rc__p { margin-top: 2px; font-size: 12px; color: var(--mut); }
#onec-day-root .rc__r--neg .rc__l b { color: #f87171; }
#onec-day-root .rc__t { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; font-size: 13px; color: var(--mut); }
#onec-day-root .rc__g { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 9px; font-size: 21px; font-weight: 800; }
#onec-day-root .rc__g span:last-child { white-space: nowrap; color: var(--acc); }
#onec-day-root .rc__f { text-align: center; font-size: 12px; color: var(--mut); }
@media (prefers-reduced-motion: reduce) { #onec-day-root .rc { animation: none; } }
