/**
 * FOUC: скрыть «Просмотренные» до ag-growth.js (defer).
 * Подключайте в Tilda в <head> БЕЗ defer, до контента страницы:
 * <link rel="stylesheet" href="https://ag-store-portal.vercel.app/ag-recent-fouc.css?v=1" />
 *
 * Показ: скрипт вешает на <html> класс .ag-recent-ui-on при ≥4 SKU.
 */
a[name="ag-recent-intro"],
a[name="nedavnoprosm-intro"] {
  display: none !important;
}

a[name="ag-recent-intro"] + .t-rec,
a[name="nedavnoprosm-intro"] + .t-rec {
  display: none !important;
}

.t-rec:has([data-ag-widget="recent"]) {
  display: none !important;
}

#nedavnoprosm {
  display: none !important;
}

/* Если Tilda когда-нибудь повесит id на запись */
#ag-recent-intro.t-rec,
#ag-recent-intro.r.t-rec,
.t-rec#ag-recent-intro {
  display: none !important;
}

html.ag-recent-ui-on a[name="ag-recent-intro"],
html.ag-recent-ui-on a[name="nedavnoprosm-intro"] {
  display: revert !important;
}

html.ag-recent-ui-on a[name="ag-recent-intro"] + .t-rec,
html.ag-recent-ui-on a[name="nedavnoprosm-intro"] + .t-rec {
  display: revert !important;
}

html.ag-recent-ui-on .t-rec:has([data-ag-widget="recent"]) {
  display: revert !important;
}

html.ag-recent-ui-on #nedavnoprosm {
  display: revert !important;
}

html.ag-recent-ui-on #ag-recent-intro.t-rec,
html.ag-recent-ui-on #ag-recent-intro.r.t-rec,
html.ag-recent-ui-on .t-rec#ag-recent-intro {
  display: revert !important;
}
