/* Как Mantine Table fz="xs" (12px) — alpine по умолчанию 13px */
.ag-theme-alpine,
.ag-theme-alpine-dark {
  --ag-font-size: 12px;
  --ag-font-family: inherit;
  font-size: 12px;
}

.ag-theme-alpine .ag-header-cell,
.ag-theme-alpine-dark .ag-header-cell {
  display: flex;
  align-items: center;
}

.ag-theme-alpine .ag-header-cell-text,
.ag-theme-alpine-dark .ag-header-cell-text {
  font-size: 12px;
  font-weight: 600;
}

.ag-theme-alpine .ag-cell,
.ag-theme-alpine-dark .ag-cell {
  font-size: 12px;
  display: flex;
  align-items: center;
  line-height: normal;
}

.ag-theme-alpine .ag-cell-wrapper,
.ag-theme-alpine-dark .ag-cell-wrapper {
  display: flex;
  align-items: center;
  height: 100%;
  width: 100%;
}

/* AG Grid: флаги доступа (зелёный ● / серый ✕) */
.ag-flag-on {
  color: #40c057 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  text-align: center;
}

.ag-flag-off {
  color: #868e96 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-align: center;
}

/* AG Grid на всю высоту слота list-страницы (без ScrollArea) */
.cx-table-paper-fill .ag-theme-alpine,
.cx-ag-fill,
.cx-ag-fill .ag-theme-alpine {
  height: 100% !important;
  min-height: 0;
  flex: 1 1 auto;
}

/* Рейтинги Яндекс: оценка / badge сервиса / точки категорий */
.ya-score-ok {
  color: #40c057;
  font-weight: 700;
}
.ya-score-mid {
  color: #fab005;
  font-weight: 700;
}
.ya-score-bad {
  color: #fa5252;
  font-weight: 700;
}

.ag-theme-alpine .ag-cell.ya-score-n1::after,
.ag-theme-alpine .ag-cell.ya-score-n2::after,
.ag-theme-alpine .ag-cell.ya-score-n3::after,
.ag-theme-alpine .ag-cell.ya-score-n4::after,
.ag-theme-alpine .ag-cell.ya-score-n5::after {
  letter-spacing: 1px;
  margin-left: 4px;
  font-weight: 700;
  white-space: nowrap;
}
.ag-theme-alpine .ag-cell.ya-score-n1::after { content: "\2605"; }
.ag-theme-alpine .ag-cell.ya-score-n2::after { content: "\2605\2605"; }
.ag-theme-alpine .ag-cell.ya-score-n3::after { content: "\2605\2605\2605"; }
.ag-theme-alpine .ag-cell.ya-score-n4::after { content: "\2605\2605\2605\2605"; }
.ag-theme-alpine .ag-cell.ya-score-n5::after { content: "\2605\2605\2605\2605\2605"; }

.ag-theme-alpine .ag-header-cell.ya-categ-hdr,
.ag-theme-alpine .ya-categ-hdr .ag-header-cell-label {
  justify-content: center;
}

/* Пиктограммы категорий YaRatings (tabler) — CSS, без headerComponent */
.ag-theme-alpine .ag-header-cell.ya-categ-hdr {
  background-repeat: no-repeat;
  background-position: center;
  background-size: 14px 14px;
}
.ag-theme-alpine .ag-header-cell.ya-categ-hdr .ag-header-cell-text {
  opacity: 0;
  width: 14px;
  overflow: hidden;
}
.ag-theme-alpine .ag-cell.ya-categ-pos,
.ag-theme-alpine .ag-cell.ya-categ-neg {
  justify-content: center;
}
.ag-theme-alpine .ag-cell.ya-categ-pos::after,
.ag-theme-alpine .ag-cell.ya-categ-neg::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}
.ag-theme-alpine .ag-cell.ya-categ-pos::after { background: #40c057; }
.ag-theme-alpine .ag-cell.ya-categ-neg::after { background: #fa5252; }

/* Яндекс / Деливери — pill как Mantine Badge light (без React cellRenderer) */
.ag-theme-alpine .ag-cell.ya-svc-cell-eats > *,
.ag-theme-alpine .ag-cell.ya-svc-cell-dc > * {
  display: none;
}
.ag-theme-alpine .ag-cell.ya-svc-cell-eats::after,
.ag-theme-alpine .ag-cell.ya-svc-cell-dc::after {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.ag-theme-alpine .ag-cell.ya-svc-cell-eats::after {
  content: "Яндекс";
  color: #b45309;
  background-color: #fef3c7;
}
.ag-theme-alpine .ag-cell.ya-svc-cell-dc::after {
  content: "Деливери";
  color: #2b8a3e;
  background-color: rgba(64, 192, 87, 0.15);
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categTaste {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M4%2011h16a1%201%200%200%201%201%201v.5c0%201.5-2.517%205.573-4%206.5v1a1%201%200%200%201-1%201H8a1%201%200%200%201-1-1v-1c-1.687-1.054-4-5-4-6.5V12a1%201%200%200%201%201-1m8-7a2.4%202.4%200%200%200-1%202a2.4%202.4%200%200%200%201%202m4-4a2.4%202.4%200%200%200-1%202a2.4%202.4%200%200%200%201%202M8%204a2.4%202.4%200%200%200-1%202a2.4%202.4%200%200%200%201%202%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categLook {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cg%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%3E%3Cpath%20d%3D%22M10%2012a2%202%200%201%200%204%200a2%202%200%200%200-4%200%22/%3E%3Cpath%20d%3D%22M21%2012q-3.6%206-9%206t-9-6q3.6-6%209-6t9%206%22/%3E%3C/g%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categTemp {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M10%2013.5a4%204%200%201%200%204%200V5a2%202%200%200%200-4%200zM10%209h4%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categSpeed {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M3%2012a9%209%200%201%200%2018%200a9%209%200%201%200-18%200m9%200l3%202m-3-7v5%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categPackage {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22m12%203l8%204.5v9L12%2021l-8-4.5v-9zm0%209l8-4.5M12%2012v9m0-9L4%207.5m12-2.25l-8%204.5%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categFork {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M19%203v12h-5c-.023-3.681.184-7.406%205-12m0%2012v6h-1v-3M8%204v17M5%204v3a3%203%200%201%200%206%200V4%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categWrong {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M12%209v4m-1.637-9.409L2.257%2017.125a1.914%201.914%200%200%200%201.636%202.871h16.214a1.914%201.914%200%200%200%201.636-2.87L13.637%203.59a1.914%201.914%200%200%200-3.274%200M12%2016h.01%22/%3E%3C/svg%3E");
}

.ag-theme-alpine .ag-header-cell.ya-hdr-categCommunication {
  background-image: url("data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2724%27%20height%3D%2724%27%20viewBox%3D%270%200%2024%2024%27%20fill%3D%27none%27%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%23868e96%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20stroke-width%3D%222%22%20d%3D%22M8%209h8m-8%204h6m4-9a3%203%200%200%201%203%203v8a3%203%200%200%201-3%203h-5l-5%203v-3H6a3%203%200%200%201-3-3V7a3%203%200%200%201%203-3z%22/%3E%3C/svg%3E");
}
