/*
 * CHEXX Casino avis — tetherparissportifs.com/articles/chexx-casino-avis/
 * Тема Sports-theme (PariPeg): светлая и тёмная схемы по prefers-color-scheme.
 * Светлая: фон #f9f9f9, секции #efefef, текст #282828, красный акцент #d2382d;
 * тёмная: фон #1c1e21, секции #2a2d32, рамки #414346, текст #d1d1d1, ссылки #e6a8a4.
 * Подключается только на этой странице: is_page( 263 ).
 * Корень изоляции: .chexx-avis-page — класс на обёртке <article class="cx-review"> из архива:
 * у <body> этой темы нет классов (page-id-N не выводится).
 * Кнопка — красная темы с белым текстом в обеих схемах. Шрифты и цвета обычных ссылок не переопределяются.
 */

.chexx-avis-page {
  /* светлая схема темы (по умолчанию); тёмная — ниже, в prefers-color-scheme: dark, как у самой темы */
  --cxf-card: #ffffff;
  --cxf-muted-bg: #efefef;                       /* фон секций-карточек темы */
  --cxf-border: #dcdcdc;
  --cxf-border-strong: #b9b9b9;
  --cxf-text: #282828;
  --cxf-head: #2b323b;
  --cxf-muted: #555b63;                          /* 6.6:1 на #efefef */
  --cxf-accent: #b8302a;                         /* красный акцент темы для текста: 5.9:1 на белом */
  --cxf-red: #d2382d;                            /* красный темы — фон кнопки и номеров, рамки; белый на нём 4.8:1 */
  --cxf-red-hover: #b8302a;
  --cxf-on-red: #ffffff;
  --cxf-accent-soft: rgba(210, 56, 45, .07);
  --cxf-pos: #2f7d4a;
  --cxf-neg: #c0392b;
  --cxf-pos-soft: rgba(93, 185, 122, .1);
  --cxf-neg-soft: rgba(210, 56, 45, .07);
  --cxf-warn: #e0a800;
  --cxf-warn-soft: rgba(252, 211, 77, .12);       /* как .warning-box темы */
  --cxf-radius: 8px;                             /* как у секций темы */
  --cxf-radius-sm: 3px 8px 8px 3px;              /* как у info/warning-box темы */
  --cxf-shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 6px 20px rgba(17, 17, 17, .06);

  display: block;
  color: var(--cxf-text);
}

@media (prefers-color-scheme: dark) {
  .chexx-avis-page {
    --cxf-card: #2a2d32;                         /* секции темы в тёмной схеме */
    --cxf-muted-bg: #24272b;
    --cxf-border: #414346;
    --cxf-border-strong: #5a5d61;
    --cxf-text: #d1d1d1;
    --cxf-head: #f0f0f0;
    --cxf-muted: #a9adb3;                        /* 6.4:1 на #2a2d32 */
    --cxf-accent: #e6a8a4;                       /* светло-красный (цвет ссылок темы в тёмной схеме): 7.3:1 */
    --cxf-accent-soft: rgba(219, 96, 87, .1);
    --cxf-pos: #7cc795;
    --cxf-neg: #e8837b;
    --cxf-pos-soft: rgba(93, 185, 122, .1);
    --cxf-neg-soft: rgba(219, 96, 87, .1);
  }
}

/* Тема задаёт «article * { font-weight: 400 }» — возвращаем жирность смысловым элементам */
.chexx-avis-page strong,
.chexx-avis-page b { font-weight: 700; }
/* …и цвет текста: тема красит каждый элемент статьи («article * { color }») */
.chexx-avis-page :where(p, li, td, th, span, small, summary, label, caption, figcaption, strong, b) { color: var(--cxf-text); }

/* ---------- Ритм ---------- */
.chexx-avis-page p { margin: 0 0 1rem; }
.chexx-avis-page h2 { scroll-margin-top: 90px; }
.chexx-avis-page h3 { margin: 1.75rem 0 .75rem; }
.chexx-avis-page ul,
.chexx-avis-page ol { margin: 0 0 1.25rem; padding-left: 1.4rem; }
.chexx-avis-page li { margin-bottom: .45rem; }
.chexx-avis-page li::marker { color: var(--cxf-accent); }
.chexx-avis-page small { color: var(--cxf-muted); font-size: .85em; }

/* ---------- Шапка ---------- */
.chexx-avis-page .cx-hero {
  margin: 0 0 1.5rem;
  padding: 1.5rem 1.5rem .75rem;
  background: linear-gradient(135deg, var(--cxf-accent-soft), transparent 60%), var(--cxf-card);
  border: 1px solid var(--cxf-border);
  border-radius: var(--cxf-radius);
  box-shadow: var(--cxf-shadow);
}
.chexx-avis-page .cx-lead { font-size: 1.08em; line-height: 1.65; }
.chexx-avis-page .cx-score {
  display: inline-flex;
  align-items: baseline;
  gap: .5rem;
  padding: .35rem 1rem;
  border-radius: 999px;
  background: var(--cxf-accent-soft);
  color: var(--cxf-text);
}
.chexx-avis-page .cx-score strong { color: var(--cxf-accent); font-size: 1.2em; }
.chexx-avis-page .cx-hero ul { list-style: none; padding-left: 0; margin-bottom: .75rem; }
.chexx-avis-page .cx-hero li { position: relative; padding-left: 1.6rem; }
.chexx-avis-page .cx-hero li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--cxf-pos);
  font-weight: 700;
}

/* ---------- CTA ---------- */
.chexx-avis-page .cx-cta { margin: 1.5rem 0 2rem; text-align: center; }
/* Кнопка — не обычная ссылка: белый текст на красном темы */
.chexx-avis-page a.cx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 240px;
  padding: .75rem 2rem;
  margin-bottom: .4rem;
  border-radius: 999px;
  background: var(--cxf-red);
  color: var(--cxf-on-red);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(210, 56, 45, .25);
  transition: background-color .18s ease, transform .18s ease;
}
.chexx-avis-page a.cx-btn:hover { background: var(--cxf-red-hover); color: var(--cxf-on-red); transform: translateY(-1px); }
.chexx-avis-page a.cx-btn:focus-visible { outline: 3px solid var(--cxf-accent); outline-offset: 3px; }
.chexx-avis-page .cx-cta small { display: inline-block; }

/* ---------- Выноски ---------- */
.chexx-avis-page .cx-takeaways,
.chexx-avis-page .cx-tip,
.chexx-avis-page aside.cx-note {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem .35rem;
  background: var(--cxf-muted-bg);
  border: 1px solid var(--cxf-border);
  border-left: 4px solid var(--cxf-red);
  border-radius: var(--cxf-radius-sm);
}
.chexx-avis-page .cx-takeaways > p:first-child strong,
.chexx-avis-page .cx-tip > p:first-child strong { color: var(--cxf-accent); }
.chexx-avis-page .cx-takeaways ul { margin-bottom: .75rem; }
.chexx-avis-page aside.cx-note {
  border-left-color: var(--cxf-warn);
  background: linear-gradient(90deg, var(--cxf-warn-soft), transparent 70%), var(--cxf-muted-bg);
}

.chexx-avis-page p.cx-note { color: var(--cxf-muted); font-size: .9em; line-height: 1.6; }
.chexx-avis-page > p.cx-note {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cxf-border);
}

/* ---------- Таблицы (в духе таблиц темы: белая карточка, тонкие рамки) ---------- */
.chexx-avis-page .cx-table-wrap {
  margin: 1.25rem 0 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--cxf-border);
  border-radius: var(--cxf-radius-sm);
  background: var(--cxf-card);
}
.chexx-avis-page table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: collapse;
  font-size: .93rem;
  line-height: 1.5;
}
.chexx-avis-page caption {
  padding: .8rem 1rem;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid var(--cxf-border);
}
.chexx-avis-page th,
.chexx-avis-page td {
  padding: .65rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--cxf-border);
}
.chexx-avis-page thead th {
  background: var(--cxf-muted-bg);
  color: var(--cxf-muted);
  font-size: .82em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
}
.chexx-avis-page tbody tr:last-child > * { border-bottom: 0; }
.chexx-avis-page tbody tr:hover { background: var(--cxf-accent-soft); }
.chexx-avis-page tbody th[scope="row"] { width: 40%; color: var(--cxf-muted); font-weight: 600; }

/* ---------- Оценки по категориям ---------- */
.chexx-avis-page .cx-scorecard {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.75rem;
}
.chexx-avis-page .cx-scorecard li {
  margin: 0;
  padding: .8rem .95rem;
  background: var(--cxf-card);
  border: 1px solid var(--cxf-border);
  border-radius: var(--cxf-radius-sm);
  font-size: .88em;
  line-height: 1.4;
  color: var(--cxf-muted);
}
.chexx-avis-page .cx-scorecard strong { color: var(--cxf-accent); font-size: 1.45em; }

/* ---------- Шаги ---------- */
.chexx-avis-page .cx-steps { counter-reset: cxf-step; list-style: none; padding: 0; margin: 1rem 0 1.5rem; }
.chexx-avis-page .cx-steps > li {
  counter-increment: cxf-step;
  position: relative;
  margin: 0;
  padding: 0 0 1.1rem 3.1rem;
  min-height: 2.2rem;
}
.chexx-avis-page .cx-steps > li::before {
  content: counter(cxf-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.2rem;
  height: 2.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--cxf-red);
  color: var(--cxf-on-red);
  font-weight: 700;
  font-size: .92em;
}
.chexx-avis-page .cx-steps > li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: calc(1.1rem - 1px);
  top: 2.45rem;
  bottom: .25rem;
  width: 2px;
  background: var(--cxf-border);
}

/* ---------- Плюсы / минусы ---------- */
.chexx-avis-page .cx-two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.chexx-avis-page .cx-pos,
.chexx-avis-page .cx-neg {
  padding: 1.1rem 1.25rem .4rem;
  border: 1px solid var(--cxf-border);
  border-top: 4px solid var(--cxf-pos);
  border-radius: var(--cxf-radius-sm);
  background: linear-gradient(180deg, var(--cxf-pos-soft), transparent 55%), var(--cxf-card);
}
.chexx-avis-page .cx-neg {
  border-top-color: var(--cxf-neg);
  background: linear-gradient(180deg, var(--cxf-neg-soft), transparent 55%), var(--cxf-card);
}
.chexx-avis-page .cx-h { margin-bottom: .6rem; }
.chexx-avis-page .cx-pos .cx-h strong { color: var(--cxf-pos); }
.chexx-avis-page .cx-neg .cx-h strong { color: var(--cxf-neg); }
.chexx-avis-page .cx-pos ul,
.chexx-avis-page .cx-neg ul { list-style: none; padding-left: 0; }
.chexx-avis-page .cx-pos li,
.chexx-avis-page .cx-neg li { position: relative; padding-left: 1.5rem; font-size: .95em; }
.chexx-avis-page .cx-pos li::before,
.chexx-avis-page .cx-neg li::before { position: absolute; left: 0; top: 0; font-weight: 700; }
.chexx-avis-page .cx-pos li::before { content: "✓"; color: var(--cxf-pos); }
.chexx-avis-page .cx-neg li::before { content: "✕"; color: var(--cxf-neg); }

/* ---------- Картинки ---------- */
.chexx-avis-page figure { margin: 1.5rem 0; }
/* Тема обрезает картинки статей до 16:9 (object-fit: cover) — здесь показываем кадр целиком */
.chexx-avis-page figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  border: 1px solid var(--cxf-border);
  border-radius: var(--cxf-radius-sm);
}
.chexx-avis-page figcaption {
  margin-top: .5rem;
  font-size: .86em;
  line-height: 1.5;
  color: var(--cxf-muted);
  text-align: center;
}

/* ---------- Инструменты ---------- */
.chexx-avis-page .cx-tool {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem .6rem;
  background: var(--cxf-card);
  border: 1px solid var(--cxf-border);
  border-top: 4px solid var(--cxf-red);
  border-radius: var(--cxf-radius);
  box-shadow: var(--cxf-shadow);
}
.chexx-avis-page .cx-tool > h3 { margin-top: 0; }
.chexx-avis-page .cx-tool > h3 + p { color: var(--cxf-muted); }

/* Оценка по приоритетам — чипы с чекбоксами */
.chexx-avis-page .cx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
  padding: 0;
  margin: .75rem 0 1rem;
}
.chexx-avis-page .cx-chips li { margin: 0; }
.chexx-avis-page .cx-chips label {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .45rem 1rem;
  border: 1px solid var(--cxf-border-strong);
  border-radius: 999px;
  background: var(--cxf-card);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, opacity .18s ease;
}
.chexx-avis-page .cx-chips label:hover { border-color: var(--cxf-accent); }
.chexx-avis-page .cx-chips input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--cxf-accent); cursor: pointer; }
.chexx-avis-page .cx-chips input:focus-visible { outline: 2px solid var(--cxf-accent); outline-offset: 2px; }
.chexx-avis-page .cx-chips label:has(input:checked) { border-color: var(--cxf-accent); background: var(--cxf-accent-soft); color: var(--cxf-accent); }
.chexx-avis-page .cx-chips label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.chexx-avis-page .cx-chips label:has(input:disabled) input { cursor: not-allowed; }
.chexx-avis-page .cx-out [data-out="base"] { color: var(--cxf-muted); }
.chexx-avis-page .cx-out [data-out="you"] { color: var(--cxf-accent); font-size: 1.15em; }

/* «Vrai ou mythe» */
.chexx-avis-page .cx-myth {
  margin: 0 0 .75rem;
  padding: .9rem 1.1rem .2rem;
  background: var(--cxf-muted-bg);
  border: 1px solid var(--cxf-border);
  border-left: 4px solid var(--cxf-border-strong);
  border-radius: var(--cxf-radius-sm);
  transition: border-color .18s ease;
}
.chexx-avis-page .cx-myth > p:first-child { margin-bottom: .6rem; }
.chexx-avis-page .cx-myth > p:nth-child(2) { display: flex; flex-wrap: wrap; gap: .5rem; }
.chexx-avis-page .cx-myth button {
  min-height: 44px;
  min-width: 120px;
  padding: .45rem 1.2rem;
  border: 1px solid var(--cxf-accent);
  border-radius: 999px;
  background: transparent;
  color: var(--cxf-accent);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.chexx-avis-page .cx-myth button:hover:not(:disabled) { background: var(--cxf-red); border-color: var(--cxf-red); color: var(--cxf-on-red); }
.chexx-avis-page .cx-myth button:focus-visible { outline: 2px solid var(--cxf-accent); outline-offset: 2px; }
.chexx-avis-page .cx-myth button:disabled { cursor: default; opacity: .55; }
.chexx-avis-page .cx-myth button[aria-pressed="true"] { opacity: 1; background: var(--cxf-red); border-color: var(--cxf-red); color: var(--cxf-on-red); }
.chexx-avis-page .cx-myth.is-right { border-left-color: var(--cxf-pos); }
.chexx-avis-page .cx-myth.is-wrong { border-left-color: var(--cxf-neg); }
.chexx-avis-page .cx-ans { padding-top: .6rem; border-top: 1px dashed var(--cxf-border); }
.chexx-avis-page .cx-ans[hidden] { display: none; }
.chexx-avis-page .is-right .cx-ans [data-ans] { color: var(--cxf-pos); }
.chexx-avis-page .is-wrong .cx-ans [data-ans] { color: var(--cxf-neg); }
.chexx-avis-page p.cx-out { margin: .25rem 0 .5rem; padding-top: 0; border-top: 0; }
.chexx-avis-page p.cx-out [data-out="score"] { color: var(--cxf-accent); font-size: 1.05em; }

/* ---------- FAQ ---------- */
.chexx-avis-page .cx-faq {
  margin: 1rem 0 2rem;
  border: 1px solid var(--cxf-border);
  border-radius: var(--cxf-radius-sm);
  background: var(--cxf-card);
  overflow: hidden;
}
.chexx-avis-page .cx-faq details { border-bottom: 1px solid var(--cxf-border); }
.chexx-avis-page .cx-faq details:last-child { border-bottom: 0; }
.chexx-avis-page .cx-faq summary {
  position: relative;
  display: block;
  min-height: 44px;
  padding: .9rem 3rem .9rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  line-height: 1.45;
}
.chexx-avis-page .cx-faq summary::-webkit-details-marker { display: none; }
.chexx-avis-page .cx-faq summary::after {
  content: "+";
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.35em;
  line-height: 1;
  color: var(--cxf-accent);
  transition: transform .18s ease;
}
.chexx-avis-page .cx-faq details[open] > summary::after { transform: translateY(-50%) rotate(45deg); }
.chexx-avis-page .cx-faq summary:hover { background: var(--cxf-accent-soft); }
.chexx-avis-page .cx-faq summary:focus-visible { outline: 2px solid var(--cxf-accent); outline-offset: -2px; }
.chexx-avis-page .cx-faq details > p { margin: 0; padding: 0 1.25rem 1.1rem; color: var(--cxf-muted); }

/* ---------- Итог (тема оформляет все article section — тень снимаем, фон и рамки свои) ---------- */
.chexx-avis-page section.cx-verdict {
  box-shadow: none;
  margin: 1.5rem 0 1rem;
  padding: 1.25rem 1.5rem .5rem;
  background: linear-gradient(135deg, var(--cxf-accent-soft), transparent 60%), var(--cxf-card);
  border: 1px solid var(--cxf-border);
  border-left: 4px solid var(--cxf-red);
  border-radius: var(--cxf-radius);
}
.chexx-avis-page section.cx-verdict > p:first-child strong { color: var(--cxf-accent); font-size: 1.2em; }

/* ---------- Адаптив ---------- */
@media (max-width: 860px) {
  .chexx-avis-page .cx-scorecard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chexx-avis-page .cx-tool { padding: 1.1rem 1.1rem .5rem; }
}

@media (max-width: 600px) {
  .chexx-avis-page .cx-hero { padding: 1.1rem 1rem .5rem; }
  .chexx-avis-page .cx-two { grid-template-columns: 1fr; }
  .chexx-avis-page .cx-scorecard li { padding: .7rem .8rem; }
  .chexx-avis-page a.cx-btn { width: 100%; min-width: 0; }
  .chexx-avis-page th,
  .chexx-avis-page td { padding: .55rem .75rem; }
  .chexx-avis-page thead th { white-space: normal; }
  .chexx-avis-page .cx-steps > li { padding-left: 2.8rem; }
  .chexx-avis-page .cx-chips li { flex: 1 1 100%; }
  .chexx-avis-page .cx-chips label { width: 100%; }
  .chexx-avis-page .cx-myth button { flex: 1 1 0; min-width: 0; }
  .chexx-avis-page .cx-takeaways,
  .chexx-avis-page .cx-tip,
  .chexx-avis-page aside.cx-note { padding: 1rem 1rem .25rem; }
}

/* «Уменьшить движение»: !important нужен, чтобы одним правилом снять transition со всех элементов страницы */
@media (prefers-reduced-motion: reduce) {
  .chexx-avis-page *,
  .chexx-avis-page *::before,
  .chexx-avis-page *::after { transition: none !important; }
}
