/* MON-227: the hint next to a filter value, the bar of the mobile filter panel, values with (0) grey and inactive. */
.mon227-hint { position: absolute; z-index: 1060; display: flex; align-items: center; font-family: inherit; pointer-events: auto; }
.mon227-hint[hidden] { display: none; }
.mon227-hint::before { content: ""; position: absolute; left: -6px; top: 50%; margin-top: -6px; border-style: solid; border-width: 6px 6px 6px 0; border-color: transparent #fff transparent transparent; filter: drop-shadow(-1px 0 0 rgba(0,0,0,.08)); }
.mon227-hint.is-found::before { border-right-color: #363636; filter: none; }
.mon227-hint__add { padding: 8px 14px; border-radius: 6px; background: #fff; color: #363636; font-size: 13px; line-height: 1.3; white-space: nowrap; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.mon227-hint__apply { display: none; padding: 9px 16px; border: 0; border-radius: 6px; background: #363636; color: #fff; font-size: 13px; font-weight: 600; line-height: 1.3; white-space: nowrap; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: background .2s; }
.mon227-hint__apply:hover, .mon227-hint__apply:focus-visible { background: var(--accent-1, #fa8072); }
.mon227-hint.is-found .mon227-hint__add { display: none; }
.mon227-hint.is-found .mon227-hint__apply { display: block; }
.mon227-hint.is-loading .mon227-hint__apply { opacity: .65; cursor: progress; }

/* The hint replaces OCFilter's "Show N products" buttons (popover and the static one in the panel). */
html.mon227-filters .ocf-search-btn-static { display: none !important; }
/* OCFilter's "Cancel" under the filters (chosen, not applied yet): the theme's dark button of «You chose: …». The block
   is gone while nothing is chosen and when «You chose: …» shows its own "Cancel" (as after a reload). */
html.mon227-filters .ocf-footer [data-ocf-discard="*"] { padding: 5px 15px; border: 0; border-radius: 5px; background: var(--osnovniy-tekst); color: var(--osnovniy-fon); font-size: 13px; font-weight: 400; line-height: 1.5; text-decoration: none; cursor: pointer; }
html.mon227-filters .ocf-footer:not(:has([data-ocf-discard="*"]:enabled)),
html.mon227-filters .ocf-content:has(> .ocf-body > .filter-header) .ocf-footer { display: none; }

/* The count in brackets, in the theme's look (not OCFilter's grey pill). The brackets go with the number: a chosen
   value has none (OCFilter leaves it empty or hides it), and then no empty "()" is left. */
.checkbox__title-amount .ocf-value-count { display: inline; padding: 0; background: none; border-radius: 0; font: inherit; color: inherit; }
.checkbox__title-amount .ocf-value-count::before { content: "("; }
.checkbox__title-amount .ocf-value-count::after { content: ")"; }
.ocf-selected .checkbox__title-amount .ocf-value-count, .checkbox__title-amount .ocf-value-count:empty { display: none; }
/* Values with (0): grey and inactive (no click, no hint); a chosen value can still be unchosen. */
.ocf-value.ocf-disabled:not(.ocf-selected), .ocf-value.ocf-disabled:not(.ocf-selected):hover { cursor: not-allowed; color: #aeb5bd; }
.ocf-value.ocf-disabled:not(.ocf-selected) .checkbox__title, .ocf-value.ocf-disabled:not(.ocf-selected) .checkbox__title-amount { color: #aeb5bd; }
.ocf-value.ocf-disabled:not(.ocf-selected) .ocf-value-input { border-color: #dfe3e8; }

/* The filter panel (phones, tablets): "Found n results" and "Reset" stay at the bottom over the filters. */
.mon227-bar { display: none; }
@media (max-width: 1220px) {
  .catalog-wrap > .filter.active { padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
  .catalog-wrap > .filter.active .mon227-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1001; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom, 0px)); background: var(--osnovniy-fon, #fff); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
  .mon227-bar__apply, .mon227-bar__reset { min-height: 46px; padding: 0 14px; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; }
  .mon227-bar__apply { border: 1px solid #363636; background: #363636; color: #fff; }
  .mon227-bar__apply.is-loading { opacity: .65; cursor: progress; }
  .mon227-bar__reset { border: 1px solid #363636; background: #fff; color: #363636; }
  /* OCFilter's own panel footer ("Cancel" + "Show N products") is replaced by the bar. */
  html.mon227-filters .catalog-wrap > .filter .ocf-footer { display: none !important; }
  .mon227-hint { display: none !important; }
}

/* The panel opens with the button «Filters» (the label stays on phones too). */
@media (max-width: 720px) {
  html.mon227-filters .catalog-header { grid-template-areas: "item1 item1 item1 item3 item3" "item2 item2 item2 item2 item2" "item4 item4 item5 item5 item5"; }
  html.mon227-filters .catalog-header__filter-open { width: 100%; max-width: none; height: 40px; padding: 0 10px; font-size: 13px; gap: 8px; }
  html.mon227-filters .catalog-header__filter-open svg { min-width: 20px; width: 20px; height: 20px; }
}

/* Applying without a reload: the results dim while they load. */
html.mon227-loading .catalog-wrap > .catalog { opacity: .5; transition: opacity .2s; pointer-events: none; }
