/* =========================================================
   CHEXX Casino Review
   Scope: только внутри .cx-review
   Шрифты и цвета ссылок наследуются от темы WordPress.
   ========================================================= */

.cx-review {
    --chexx-review-space: 1.25rem;
    --chexx-review-space-sm: 0.75rem;
    --chexx-review-radius: 12px;
    --chexx-review-radius-sm: 8px;
    --chexx-review-border: 1px solid color-mix(in srgb, currentColor 18%, transparent);
    --chexx-review-surface: color-mix(in srgb, currentColor 4%, transparent);
    --chexx-review-surface-strong: color-mix(in srgb, currentColor 8%, transparent);
    --chexx-review-content-width: 100%;

    box-sizing: border-box;
    width: 100%;
    max-width: var(--chexx-review-content-width);
    min-width: 0;
    line-height: 1.75;
    overflow-wrap: break-word;
}

.cx-review *,
.cx-review *::before,
.cx-review *::after {
    box-sizing: border-box;
}

.cx-review > :first-child {
    margin-top: 0;
}

.cx-review > :last-child {
    margin-bottom: 0;
}

/* Заголовки */

.cx-review h1,
.cx-review h2,
.cx-review h3,
.cx-review h4,
.cx-review h5,
.cx-review h6 {
    line-height: 1.3;
    overflow-wrap: break-word;
    scroll-margin-top: 2rem;
}

.cx-review h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.cx-review h2 {
    margin: 3rem 0 1rem;
    padding-bottom: 0.65rem;
    border-bottom: var(--chexx-review-border);
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.cx-review h3 {
    margin: 2rem 0 0.75rem;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
}

.cx-review h4,
.cx-review h5,
.cx-review h6 {
    margin: 1.5rem 0 0.65rem;
    font-size: 1.05rem;
}

.cx-review p {
    margin: 0 0 1rem;
}

.cx-review ul,
.cx-review ol {
    margin: 0 0 1.5rem;
    padding-left: 1.5rem;
}

.cx-review li {
    padding-left: 0.2rem;
}

.cx-review li + li {
    margin-top: 0.4rem;
}

.cx-review li > ul,
.cx-review li > ol {
    margin-top: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Вступительный блок */

.cx-review .cx-hero {
    margin-bottom: 1.5rem;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius);
    background: var(--chexx-review-surface);
}

.cx-review .cx-hero .cx-lead {
    font-size: 1.1rem;
    line-height: 1.8;
}

.cx-review .cx-score {
    margin: 1rem 0;
    padding: 0.85rem 1rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    background: var(--chexx-review-surface-strong);
}

.cx-review .cx-hero > ul {
    margin-bottom: 0;
}

/* CTA-кнопки */

.cx-review .cx-cta {
    margin: 1.5rem 0;
    text-align: center;
}

.cx-review .cx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 0.75rem 1.5rem;
    border: 1px solid currentColor;
    border-radius: var(--chexx-review-radius-sm);
    text-align: center;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cx-review .cx-btn:hover {
    opacity: 0.82;
}

.cx-review .cx-btn:active {
    transform: translateY(1px);
}

.cx-review .cx-cta small {
    display: block;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Общие информационные блоки */

.cx-review .cx-takeaways,
.cx-review .cx-tip,
.cx-review .cx-note {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border: var(--chexx-review-border);
    border-left: 4px solid currentColor;
    border-radius: var(--chexx-review-radius-sm);
    background: var(--chexx-review-surface);
}

.cx-review .cx-takeaways > p:first-child,
.cx-review .cx-tip > p:first-child,
.cx-review .cx-note > p:first-child {
    margin-bottom: 0.65rem;
}

.cx-review .cx-takeaways > :last-child,
.cx-review .cx-tip > :last-child,
.cx-review .cx-note > :last-child {
    margin-bottom: 0;
}

/* Оглавление */

.cx-review .cx-toc {
    margin: 2rem 0;
    padding: 1.25rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius);
    background: var(--chexx-review-surface);
}

.cx-review .cx-toc > p:first-child {
    margin-bottom: 0.75rem;
}

.cx-review .cx-toc ol {
    margin-bottom: 0;
    padding-left: 1.5rem;
}

.cx-review .cx-toc li {
    padding: 0.2rem 0;
}

.cx-review .cx-toc a {
    overflow-wrap: anywhere;
}

/* Изображения и подписи */

.cx-review figure {
    margin: 1.75rem 0;
    min-width: 0;
}

.cx-review figure img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: var(--chexx-review-radius);
}

.cx-review figcaption {
    margin-top: 0.6rem;
    font-size: 0.9rem;
    line-height: 1.55;
    opacity: 0.8;
}

/* Таблицы */

.cx-review .cx-table-wrap {
    width: 100%;
    max-width: 100%;
    margin: 1.5rem 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    -webkit-overflow-scrolling: touch;
}

.cx-review table {
    width: 100%;
    min-width: 520px;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.95rem;
    line-height: 1.55;
}

.cx-review table caption {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    caption-side: top;
}

.cx-review table th,
.cx-review table td {
    padding: 0.8rem 1rem;
    border: 0;
    border-bottom: var(--chexx-review-border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.cx-review table thead th {
    background: var(--chexx-review-surface-strong);
    font-weight: 700;
}

.cx-review table tbody th {
    font-weight: 650;
}

.cx-review table tbody tr:nth-child(even) {
    background: var(--chexx-review-surface);
}

.cx-review table tbody tr:last-child th,
.cx-review table tbody tr:last-child td {
    border-bottom: 0;
}

/* Сводка оценок */

.cx-review .cx-scorecard {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0;
    list-style: none;
}

.cx-review .cx-scorecard li {
    margin: 0;
    padding: 1rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    background: var(--chexx-review-surface);
}

/* Пошаговые инструкции */

.cx-review .cx-steps {
    display: grid;
    gap: 0.75rem;
    padding-left: 1.75rem;
    counter-reset: cx-step;
}

.cx-review .cx-steps > li {
    padding: 1rem 1rem 1rem 0.5rem;
    border-bottom: var(--chexx-review-border);
}

.cx-review .cx-steps > li:last-child {
    border-bottom: 0;
}

.cx-review .cx-steps strong {
    display: inline-block;
    margin-bottom: 0.25rem;
}

/* Плюсы и минусы */

.cx-review .cx-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.cx-review .cx-pos,
.cx-review .cx-neg {
    min-width: 0;
    padding: 1.25rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius);
    background: var(--chexx-review-surface);
}

.cx-review .cx-h {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
}

.cx-review .cx-pos > :last-child,
.cx-review .cx-neg > :last-child {
    margin-bottom: 0;
}

/* Интерактивные инструменты */

.cx-review .cx-tool {
    min-width: 0;
    margin: 1.75rem 0;
    padding: clamp(1rem, 3vw, 1.5rem);
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius);
    background: var(--chexx-review-surface);
}

.cx-review .cx-tool > h3:first-child {
    margin-top: 0;
}

.cx-review .cx-day,
.cx-review .cx-promo,
.cx-review .cx-q {
    min-width: 0;
}

.cx-review .cx-promo {
    margin: 0.75rem 0;
    padding: 1rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    background: var(--chexx-review-surface-strong);
}

.cx-review .cx-q {
    margin: 1rem 0;
    padding: 1rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
}

.cx-review .cx-q > p:first-child {
    font-weight: 650;
}

.cx-review .cx-q label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 44px;
    margin-right: 0.75rem;
    cursor: pointer;
}

.cx-review input[type="radio"],
.cx-review input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: auto;
}

.cx-review select,
.cx-review input[type="text"],
.cx-review input[type="email"],
.cx-review input[type="number"],
.cx-review input[type="url"],
.cx-review input[type="search"],
.cx-review textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 44px;
    padding: 0.65rem 0.75rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    background: transparent;
    color: inherit;
    font: inherit;
}

.cx-review textarea {
    min-height: 120px;
    resize: vertical;
}

.cx-review .cx-out {
    margin-top: 1.25rem;
    padding: 1rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
}

.cx-review .cx-res {
    margin-bottom: 0;
}

.cx-review [hidden] {
    display: none !important;
}

/* FAQ / нативные аккордеоны */

.cx-review .cx-faq {
    margin: 1.5rem 0;
}

.cx-review .cx-faq details {
    margin: 0 0 0.75rem;
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius-sm);
    background: var(--chexx-review-surface);
}

.cx-review .cx-faq summary {
    position: relative;
    min-height: 44px;
    padding: 1rem 2.75rem 1rem 1rem;
    cursor: pointer;
    font-weight: 650;
    line-height: 1.5;
    overflow-wrap: anywhere;
    list-style-position: outside;
}

.cx-review .cx-faq details[open] summary {
    border-bottom: var(--chexx-review-border);
}

.cx-review .cx-faq details > p {
    margin: 0;
    padding: 1rem;
}

.cx-review .cx-faq summary::marker {
    color: currentColor;
}

/* Заключение и дисклеймеры */

.cx-review .cx-conclusion {
    margin: 2rem 0;
    padding: clamp(1.25rem, 3vw, 2rem);
    border: var(--chexx-review-border);
    border-radius: var(--chexx-review-radius);
    background: var(--chexx-review-surface-strong);
}

.cx-review .cx-conclusion > :first-child {
    margin-top: 0;
}

.cx-review .cx-conclusion > :last-child {
    margin-bottom: 0;
}

.cx-review > .cx-note {
    font-size: 0.9rem;
}

/* Фокус клавиатуры */

.cx-review a:focus-visible,
.cx-review button:focus-visible,
.cx-review summary:focus-visible,
.cx-review select:focus-visible,
.cx-review input:focus-visible,
.cx-review textarea:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Средние экраны */

@media (max-width: 860px) {
    .cx-review .cx-two {
        gap: 0.75rem;
    }

    .cx-review .cx-pos,
    .cx-review .cx-neg {
        padding: 1rem;
    }

    .cx-review .cx-table-wrap {
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
    }

    .cx-review table th,
    .cx-review table td {
        padding: 0.7rem 0.8rem;
    }
}

/* Мобильные экраны */

@media (max-width: 600px) {
    .cx-review {
        line-height: 1.7;
    }

    .cx-review h2 {
        margin-top: 2.25rem;
    }

    .cx-review .cx-hero {
        padding: 1rem;
    }

    .cx-review .cx-hero .cx-lead {
        font-size: 1rem;
    }

    .cx-review .cx-two,
    .cx-review .cx-scorecard {
        grid-template-columns: minmax(0, 1fr);
    }

    .cx-review .cx-takeaways,
    .cx-review .cx-tip,
    .cx-review .cx-note {
        padding: 0.9rem 1rem;
    }

    .cx-review .cx-tool {
        padding: 1rem;
    }

    .cx-review .cx-q {
        padding: 0.8rem;
    }

    .cx-review .cx-q label {
        margin-right: 0.4rem;
    }

    .cx-review .cx-cta {
        width: 100%;
    }

    .cx-review .cx-btn {
        width: 100%;
    }

    .cx-review table {
        font-size: 0.875rem;
    }

    .cx-review .cx-faq summary {
        padding: 0.85rem 1rem;
    }
}

/* Учитываем настройку уменьшения анимации */

@media (prefers-reduced-motion: reduce) {
    .cx-review .cx-btn {
        transition: none;
    }
}