/**
 * Base Casino — review & comparison components.
 *
 * Token-driven so every site can re-skin by overriding the :root vars in its
 * own style.css. Class contract is shared with the legacy modern child themes
 * (toplist-offers__*, mini-reviews__*) plus the new bcr-* components.
 */

:root {
	--bcr-accent: #16a34a;
	--bcr-accent-dark: #15803d;
	--bcr-accent-contrast: #ffffff;
	--bcr-cta: #f59e0b;
	--bcr-cta-dark: #d97706;
	--bcr-bg: #ffffff;
	--bcr-bg-alt: #f7f8fa;
	--bcr-border: #e5e7eb;
	--bcr-text: #1f2937;
	--bcr-muted: #6b7280;
	--bcr-star: #f5b301;
	--bcr-radius: 12px;
	--bcr-radius-sm: 8px;
	--bcr-shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 6px 18px rgba(0, 0, 0, .05);
	--bcr-gap: 16px;
}

.bcr-rt,
.bcr-compare,
.bcr-matcher,
.mini-reviews { color: var(--bcr-text); }

/* ---------- Shared heading ---------- */
.bcr-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: var(--bcr-gap); }
.bcr-heading h2 { display: flex; align-items: center; gap: 10px; margin: 0; }
.bcr-heading__icon { width: 35px; height: 35px; object-fit: contain; }
.bcr-heading .affiliate-disclosure a { color: var(--bcr-muted); font-size: .82rem; text-decoration: none; }
.bcr-heading .affiliate-disclosure a:hover { color: var(--bcr-accent); }

/* ---------- Rating primitives ---------- */
.bcr-score { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 800; }
.bcr-score__num { font-size: 1.4rem; color: var(--bcr-accent-dark); line-height: 1; }
.bcr-score__max { font-size: .8rem; color: var(--bcr-muted); font-weight: 600; }
.bcr-stars { color: var(--bcr-star); letter-spacing: 1px; white-space: nowrap; }

/* ---------- Feature chips ---------- */
.bcr-feature-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.bcr-chip { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--bcr-bg-alt); border: 1px solid var(--bcr-border); color: var(--bcr-muted); }
.bcr-chip--licence { color: var(--bcr-accent-dark); }

/* =====================================================================
 * Reviews table (toplist) — shared row markup, layout modifiers below.
 * ================================================================== */
.toplist-offers { display: flex; flex-direction: column; gap: var(--bcr-gap); }
.toplist-offers__item {
	display: grid;
	grid-template-columns: minmax(150px, 1.1fr) 1.6fr auto;
	align-items: center;
	gap: var(--bcr-gap);
	background: var(--bcr-bg);
	border: 1px solid var(--bcr-border);
	border-radius: var(--bcr-radius);
	box-shadow: var(--bcr-shadow);
	padding: 16px 18px;
	position: relative;
}
.toplist-offers__item.is-featured { border-color: var(--bcr-accent); box-shadow: 0 0 0 2px rgba(22, 163, 74, .25), var(--bcr-shadow); }
.toplist-offers__brand { display: flex; align-items: center; gap: 12px; }
.toplist-offers__rank-number { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--bcr-accent); color: #fff; font-weight: 800; font-size: .85rem; }
.toplist-offers__logo img { display: block; border-radius: var(--bcr-radius-sm); }
.toplist-offers__logo a { display: inline-block; border-radius: var(--bcr-radius-sm); }
.toplist-offers__rating { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.toplist-offers__info { display: flex; flex-direction: column; gap: 4px; }
.toplist-offers__tagline { font-weight: 700; }
.toplist-offers__bonus { color: var(--bcr-muted); }
.toplist-offers__cta { display: flex; flex-direction: column; gap: 6px; align-items: stretch; min-width: 140px; }
.toplist-offers__btn {
	display: inline-block; text-align: center; font-weight: 800; text-transform: uppercase; letter-spacing: .3px;
	background: var(--bcr-cta); color: #fff; padding: 11px 18px; border-radius: var(--bcr-radius-sm); text-decoration: none;
	transition: background .15s ease, transform .15s ease;
}
.toplist-offers__btn:hover { background: var(--bcr-cta-dark); transform: translateY(-1px); color: #fff; }
.toplist-offers__review-link { text-align: center; font-size: .8rem; color: var(--bcr-muted); text-decoration: none; }
.toplist-offers__review-link:hover { color: var(--bcr-accent); }
.toplist-offers__terms-row { grid-column: 1 / -1; border-top: 1px dashed var(--bcr-border); padding-top: 8px; }
.toplist-offers__terms-toggle { background: none; border: 0; color: var(--bcr-muted); font-size: .78rem; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.toplist-offers__terms-toggle[aria-expanded="true"] .toplist-offers__terms-toggle-icon { transform: rotate(180deg); }
.toplist-offers__terms-toggle-icon { transition: transform .15s ease; }
.toplist-offers__terms { font-size: .78rem; color: var(--bcr-muted); margin-top: 8px; }

/* Layout: cards grid */
.bcr-rt--cards-grid .toplist-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.bcr-rt--cards-grid .toplist-offers__item { grid-template-columns: 1fr; text-align: center; }
.bcr-rt--cards-grid .toplist-offers__brand { flex-direction: column; }
.bcr-rt--cards-grid .toplist-offers__cta { min-width: 0; }

/* Layout: compact */
.bcr-rt--compact .toplist-offers__item { padding: 10px 14px; grid-template-columns: auto 1fr auto; box-shadow: none; }
.bcr-rt--compact .toplist-offers__logo img { width: 64px; height: auto; }

/* Layout: data-table (rows look tabular) */
.bcr-rt--data-table .toplist-offers__item { border-radius: 0; border-bottom: 0; box-shadow: none; }
.bcr-rt--data-table .toplist-offers__item:first-child { border-radius: var(--bcr-radius) var(--bcr-radius) 0 0; }
.bcr-rt--data-table .toplist-offers__item:last-child { border-bottom: 1px solid var(--bcr-border); border-radius: 0 0 var(--bcr-radius) var(--bcr-radius); }

/* ---------- View toggle ---------- */
.bcr-viewtoggle { display: inline-flex; gap: 4px; background: var(--bcr-bg-alt); border: 1px solid var(--bcr-border); border-radius: 999px; padding: 4px; margin-bottom: var(--bcr-gap); }
.bcr-viewtoggle__btn { border: 0; background: none; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--bcr-muted); }
.bcr-viewtoggle__btn.is-active { background: var(--bcr-accent); color: #fff; }

/* =====================================================================
 * Comparison table
 * ================================================================== */
.bcr-compare__filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: var(--bcr-gap); }
.bcr-filter { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--bcr-muted); }
.bcr-filter select { border: 1px solid var(--bcr-border); border-radius: var(--bcr-radius-sm); padding: 7px 10px; background: var(--bcr-bg); color: var(--bcr-text); }
.bcr-filter__reset { align-self: flex-end; border: 1px solid var(--bcr-border); background: var(--bcr-bg); border-radius: var(--bcr-radius-sm); padding: 7px 14px; cursor: pointer; }
.bcr-compare__count { align-self: flex-end; margin-left: auto; font-size: .8rem; color: var(--bcr-muted); }

.bcr-compare__scroll { overflow-x: auto; border-radius: var(--bcr-radius); border: 1px solid var(--bcr-border); }
.bcr-compare__table { width: 100%; border-collapse: collapse; min-width: 640px; background: var(--bcr-bg); }
.bcr-compare__table th, .bcr-compare__table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--bcr-border); vertical-align: middle; }
.bcr-compare__table thead th { background: var(--bcr-bg-alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--bcr-muted); white-space: nowrap; }
.bcr-compare__table tbody tr:hover { background: var(--bcr-bg-alt); }
.bcr-sort { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-transform: inherit; letter-spacing: inherit; }
.bcr-compare__table th.is-asc .bi-arrow-down-up::before { content: "\F12C"; }
.bcr-compare__table th.is-desc .bi-arrow-down-up::before { content: "\F128"; }
.bcr-compare__casino { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bcr-text); font-weight: 700; }
.bcr-compare__casino img { border-radius: var(--bcr-radius-sm); }
.bcr-pay-icons { display: flex; flex-wrap: wrap; gap: 4px; }
.bcr-pay-icon { font-size: .68rem; padding: 2px 6px; border: 1px solid var(--bcr-border); border-radius: 4px; color: var(--bcr-muted); white-space: nowrap; }
.bcr-compare__check { position: relative; display: inline-block; cursor: pointer; }
.bcr-compare__check input { position: absolute; opacity: 0; }
.bcr-compare__check span { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--bcr-border); border-radius: 5px; }
.bcr-compare__check input:checked + span { background: var(--bcr-accent); border-color: var(--bcr-accent); }
.bcr-compare__check input:checked + span::after { content: "\2713"; color: #fff; position: absolute; left: 4px; top: -1px; font-weight: 700; }

.bcr-btn { display: inline-block; text-decoration: none; border-radius: var(--bcr-radius-sm); padding: 9px 16px; font-weight: 800; text-align: center; }
.bcr-btn--cta { background: var(--bcr-cta); color: #fff; }
.bcr-btn--cta:hover { background: var(--bcr-cta-dark); color: #fff; }

.bcr-compare__bar { position: sticky; bottom: 12px; z-index: 5; display: flex; align-items: center; gap: 12px; background: var(--bcr-text); color: #fff; border-radius: 999px; padding: 8px 8px 8px 18px; box-shadow: var(--bcr-shadow); margin: 12px auto; width: fit-content; }
.bcr-compare__bar-btn { background: var(--bcr-cta); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; cursor: pointer; }
.bcr-compare__bar-clear { background: none; border: 0; color: rgba(255, 255, 255, .8); cursor: pointer; }
.bcr-compare__empty { text-align: center; color: var(--bcr-muted); padding: 20px; }

/* Compare modal */
.bcr-compare__modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0, 0, 0, .55); display: flex; align-items: center; justify-content: center; padding: 20px; }
.bcr-compare__modal[hidden] { display: none; }
.bcr-compare__modal-inner { background: var(--bcr-bg); border-radius: var(--bcr-radius); max-width: 900px; width: 100%; max-height: 90vh; overflow: auto; padding: 24px; position: relative; }
.bcr-compare__modal-close { position: absolute; top: 12px; right: 12px; border: 0; background: var(--bcr-bg-alt); border-radius: 50%; width: 34px; height: 34px; cursor: pointer; }
.bcr-compare__matrix { width: 100%; border-collapse: collapse; }
.bcr-compare__matrix th, .bcr-compare__matrix td { border: 1px solid var(--bcr-border); padding: 10px 12px; text-align: center; }
.bcr-compare__matrix tbody th { text-align: left; background: var(--bcr-bg-alt); white-space: nowrap; }
.bcr-compare__mh { display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* =====================================================================
 * Casino matcher
 * ================================================================== */
.bcr-matcher__intro { color: var(--bcr-muted); }
.bcr-matcher__form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; background: var(--bcr-bg-alt); border: 1px solid var(--bcr-border); border-radius: var(--bcr-radius); padding: 16px; margin-bottom: var(--bcr-gap); }
.bcr-matcher__submit { align-self: flex-end; border: 0; cursor: pointer; }
.bcr-matcher__status { font-weight: 700; margin-bottom: 12px; }

/* =====================================================================
 * Rating breakdown
 * ================================================================== */
.bcr-breakdown { background: var(--bcr-bg); border: 1px solid var(--bcr-border); border-radius: var(--bcr-radius); padding: 18px; }
.bcr-breakdown__overall { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.bcr-breakdown__overall-num { font-size: 2.4rem; font-weight: 800; color: var(--bcr-accent-dark); line-height: 1; }
.bcr-breakdown__overall-max { color: var(--bcr-muted); font-weight: 600; }
.bcr-breakdown__overall-stars { color: var(--bcr-star); margin-left: auto; }
.bcr-breakdown__row { display: grid; grid-template-columns: minmax(120px, 180px) 1fr auto; align-items: center; gap: 12px; margin-bottom: 10px; }
.bcr-breakdown__label { font-weight: 600; font-size: .9rem; }
.bcr-breakdown__track { height: 8px; background: var(--bcr-bg-alt); border-radius: 999px; overflow: hidden; }
.bcr-breakdown__fill { display: block; height: 100%; width: var(--bcr-bar, 0%); background: linear-gradient(90deg, var(--bcr-accent), var(--bcr-accent-dark)); border-radius: 999px; transition: width .6s ease; }
.bcr-breakdown__score { font-weight: 800; color: var(--bcr-accent-dark); min-width: 36px; text-align: right; }

/* =====================================================================
 * Pros & cons
 * ================================================================== */
.bcr-proscons { display: grid; grid-template-columns: 1fr 1fr; gap: var(--bcr-gap); }
.bcr-proscons__col { background: var(--bcr-bg); border: 1px solid var(--bcr-border); border-radius: var(--bcr-radius); padding: 16px; }
.bcr-proscons__title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.bcr-proscons__title--pros { color: var(--bcr-accent-dark); }
.bcr-proscons__title--cons { color: #dc2626; }
.bcr-proscons__list ul { margin: 0; padding-left: 1.1em; }
.bcr-proscons__list li { margin-bottom: 4px; }

/* =====================================================================
 * User vote widget
 * ================================================================== */
.bcr-vote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bcr-vote__label { font-weight: 600; }
.bcr-vote__stars { display: inline-flex; }
.bcr-vote__star { background: none; border: 0; cursor: pointer; font-size: 1.3rem; color: var(--bcr-star); padding: 0 2px; line-height: 1; }
.bcr-vote.is-voted .bcr-vote__star { cursor: default; }
.bcr-vote__summary { color: var(--bcr-muted); font-size: .9rem; }

/* =====================================================================
 * Mini reviews (carried class contract + light polish)
 * ================================================================== */
.mini-reviews { display: flex; flex-direction: column; gap: 28px; }
.mini-reviews__intro { color: var(--bcr-muted); }
.mini-reviews__card { background: var(--bcr-bg); border: 1px solid var(--bcr-border); border-radius: var(--bcr-radius); box-shadow: var(--bcr-shadow); padding: 24px; }
.mini-reviews__heading { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 0; }
.mini-reviews__number { color: var(--bcr-accent); font-weight: 800; }
.mini-reviews__remark { font-size: .8rem; background: var(--bcr-bg-alt); border-radius: 999px; padding: 3px 10px; color: var(--bcr-muted); }
.mini-reviews__badge { margin-left: auto; }
.mini-reviews__screenshot img { width: 100%; height: auto; border-radius: var(--bcr-radius-sm); margin: 12px 0; }
.review-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin: 16px 0; }
.review-meta-item { background: var(--bcr-bg-alt); border-radius: var(--bcr-radius-sm); padding: 10px 12px; }
.review-meta-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .4px; color: var(--bcr-muted); display: flex; align-items: center; gap: 4px; }
.review-meta-value { font-weight: 700; }
.review-meta-value.highlight { color: var(--bcr-accent-dark); }
.mini-reviews__bonus { background: rgba(22, 163, 74, .08); border: 1px solid rgba(22, 163, 74, .25); border-radius: var(--bcr-radius-sm); padding: 12px 14px; margin: 14px 0; }
.mini-reviews__bonus-label { font-weight: 800; display: block; font-size: .78rem; text-transform: uppercase; color: var(--bcr-accent-dark); }
.testing-notes { background: var(--bcr-bg-alt); border-left: 3px solid var(--bcr-accent); border-radius: var(--bcr-radius-sm); padding: 14px 16px; margin: 14px 0; }
.testing-notes h5 { margin-top: 0; }
.mini-reviews__best-for, .mini-reviews__not-ideal { margin: 8px 0; }
.mini-reviews__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.mini-reviews__btn-visit { background: var(--bcr-cta); color: #fff; padding: 11px 22px; border-radius: var(--bcr-radius-sm); text-decoration: none; font-weight: 800; }
.mini-reviews__btn-visit:hover { background: var(--bcr-cta-dark); color: #fff; }
.mini-reviews__terms { font-size: .78rem; color: var(--bcr-muted); margin-top: 12px; }

/* =====================================================================
 * Responsive
 * ================================================================== */
@media (max-width: 768px) {
	.toplist-offers__item { grid-template-columns: 1fr; text-align: center; }
	.toplist-offers__brand { flex-direction: column; }
	.toplist-offers__cta { min-width: 0; }
	.bcr-breakdown__row { grid-template-columns: 1fr auto; }
	.bcr-breakdown__label { grid-column: 1 / -1; }
	.bcr-proscons { grid-template-columns: 1fr; }
}

/* =====================================================================
 * Dark mode (parent theme toggles a data-bs-theme / .dark scope)
 * ================================================================== */
[data-bs-theme="dark"] {
	--bcr-bg: #1c2128;
	--bcr-bg-alt: #262d36;
	--bcr-border: #353d48;
	--bcr-text: #e6e8eb;
	--bcr-muted: #9aa4b2;
	--bcr-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}
