/* Casino listing page */
.casino-list-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.casino-list-toolbar select {
  padding: 8px 14px;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  font-size: 14px;
  background: var(--white);
}

/* Rating stars display */
.stars {
  display: inline-flex;
  gap: 2px;
  color: var(--warning);
  font-size: 16px;
}
.stars .star-empty { color: var(--light-gray); }

/* Casino description */
.casino-description {
  color: var(--gray);
  font-size: 15px;
  line-height: 1.7;
}

/* Geo card states — consolidated here as the single definition.
   Two conflicting duplicates previously existed in main.css; removed
   (see removal log). Matches the only states controllers.js and
   casino_grid.html actually generate: allowed / blocked / unknown. */
.geo-allowed { color: var(--success); font-weight: 600; }
.geo-blocked { color: var(--danger); font-weight: 600; }
.geo-unknown { color: var(--gray); font-weight: 600; }

/* Bonus override badge */
.bonus-override {
  background: var(--success);
  color: var(--white);
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  margin-top: 8px;
  display: inline-block;
}

/* Reviews list on casino page */
.review-item {
  background: var(--bg);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
}
.review-item h4 { margin-bottom: 6px; }
.review-item .review-rating { color: var(--warning); font-size: 14px; }
.review-item .review-excerpt { color: var(--gray); font-size: 14px; margin-top: 6px; }

/* ============================================================
   CASINO GRID + CASINO CARD
   Single source of truth for the casino listing component.
   Namespace: .casino-grid / .casino-card / .casino-card__*
   Consumed by: en/templates/components/casino_grid.html,
                en/templates/pages/category.html, country.html, home.html,
                en/worker/controllers.js (buildCasinoCards,
                buildReviewCasinoCards, and the compact review-card
                variant used on the all-reviews and author pages).
   Do NOT duplicate these selectors in any other stylesheet.

   NOTE: two card shapes share this namespace —
     Full card:    geo-badge + bookmark + __header (logo, rating)
                    + __body (bonus box, geo status) + __actions
     Compact card: __body only (h3 title link, rating, excerpt)
                    + __actions with a single action
   Nothing below assumes __header/__logo exist, so both render
   correctly from the same rules.
   ============================================================ */

/* ---------- Grid ---------- */

.casino-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(16px, 2.5vw, 24px);
  align-items: stretch;
}

@media (min-width: 768px) {
  .casino-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .casino-grid { grid-template-columns: repeat(3, 1fr); }
}

.casino-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 6%, var(--white)) 0%, var(--white) 45%, color-mix(in srgb, var(--primary) 4%, var(--white)) 100%);
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--light-gray));
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05), var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.casino-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--primary) 25%, transparent), var(--shadow-lg);
  border-color: var(--primary);
}
/*.casino-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.casino-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}*/

@media (prefers-reduced-motion: reduce) {
  .casino-card { transition: none; }
  .casino-card:hover { transform: none; }
}

/* Opt-in state badges — not wired to any data field today (no
   featured/verified/editor's-choice column exists in the schema).
   Purely additive: adding class="casino-card casino-card--featured"
   in a future template/controller change is all that's needed to
   activate one. Safe no-op until then. */
.casino-card--featured { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary), var(--shadow); }
.casino-card--verified::after,
.casino-card--featured::after,
.casino-card--editors-choice::after,
.casino-card--new::after {
  content: attr(data-badge-label);
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--white);
}
.casino-card--verified::after     { content: "Verified";        background: var(--success); }
.casino-card--featured::after     { content: "Editor's Choice";  background: var(--primary); }
.casino-card--new::after          { content: "New";              background: var(--secondary, var(--primary)); }

/* ---------- Header: logo + name + rating ---------- */


.casino-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 18px 0;
}

.casino-card__logo-wrap {
  flex-shrink: 0;
  width: 140px;
  height: 140px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
}

.casino-card__logo {
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.casino-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg);
}
.casino-card__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/*.casino-card__title-group { min-width: 0; }*/
.casino-card__title-group {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.casino-card__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 2px;
  color: var(--dark);
}

/* Compact review cards put the title straight in an <h3>, no __header */
.casino-card__body > h3 {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 8px;
  color: var(--dark);
}
.casino-card__body > h3 a { color: inherit; text-decoration: none; }
.casino-card__body > h3 a:hover { color: var(--primary); text-decoration: underline; }

.casino-card__rating {
  color: var(--warning);
  font-size: 14px;
  letter-spacing: 1px;
}

/* ---------- Body: bonus + geo status ---------- */

.casino-card__body {
  padding: 14px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1 0 auto;
}

.bonus-title {
  color: #596579;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bonus-value {
  min-width: 0;
  color: #4f3cc9;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.01em;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.casino-card__bonus {
  background: var(--bg);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* ---------- Multiple, click-to-expand bonus rows ----------
   Replaces the single always-visible .casino-card__bonus block when
   a casino has more than one active Offer (1st deposit, 2nd deposit,
   cashback, ...). Only one row's .bonus-value is visible unless the
   row carries .is-open -- toggled by the delegated click handler in
   casino-cards.js via .js-bonusToggle. */
.casino-card__bonus-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bonus-row {
  background: var(--bg);
  border-radius: 8px;
  overflow: hidden;
}

.bonus-row__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.bonus-row__title {
  color: #596579;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.bonus-row__chevron {
  color: var(--gray);
  font-size: 14px;
  line-height: 1;
  transition: transform .15s ease;
  flex-shrink: 0;
}
.bonus-row.is-open .bonus-row__chevron { transform: rotate(180deg); }

.bonus-row__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height .2s ease, padding .2s ease;
  padding: 0 12px;
}
.bonus-row.is-open .bonus-row__details {
  max-height: 120px;
  padding: 0 12px 10px;
}
.bonus-row__details .bonus-value {
  -webkit-line-clamp: unset;
}

/* ---------- Payment method icon row ---------- */
.casino-card__payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payment-method-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.payment-method-icon img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.casino-card__geo-status {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.casino-card__geo-status.geo-allowed { color: var(--success); }
.casino-card__geo-status.geo-blocked { color: var(--danger); }
.casino-card__geo-status.geo-unknown { color: var(--gray); }

/* Compliance / operator disclosure rows (18+, T&Cs, operator name) */
.compliance-row {
  font-size: 12px;
  color: var(--gray);
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.compliance-label { font-weight: 600; color: var(--dark); }
.compliance-value { color: var(--gray); }
.compliance-link { color: var(--primary); text-decoration: underline; }

/* ---------- Actions ---------- */

.casino-card__actions {
  display: flex;
  gap: 8px;
  padding: 16px 18px 18px;
  margin-top: auto;
}
.casino-card__actions .btn { flex: 1; }

/* ---------- Badges: bookmark / promo / geo ---------- */

.geo-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.geo-badge__flag {
  font-size: 26px;
  line-height: 1;
}

.geo-badge__icon {
  position: absolute;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  text-shadow: 0 0 4px #fff, 0 0 4px #fff, 0 0 4px #fff;
}

.geo-badge--allowed .geo-badge__icon { color: var(--success, #00b894); }
.geo-badge--blocked .geo-badge__icon { color: var(--danger, #e74c3c); }
.geo-badge--unknown .geo-badge__icon { color: var(--gray, #64748b); }

/* Rank number -- sits flush in the card's top-left corner (not inset
   like the bookmark/geo badges) so it reads as a list position, not
   another action button. */
.casino-card__number {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  color: var(--dark);
  font-size: 13px;
  font-weight: 700;
  border-radius: 0 0 8px 0;
  box-shadow: var(--shadow);
}

.casino-card__bookmark {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .15s ease;
}
.casino-card__bookmark:hover { transform: scale(1.08); }
.casino-card__bookmark:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.bookmark-icon { font-size: 16px; color: var(--dark); line-height: 1; }

/* JS (app.js) toggles both is-bookmarked and aria-pressed together
   on save/unsave — matched here for safety, only one will ever fire. */
.casino-card__bookmark.is-bookmarked .bookmark-icon,
.casino-card__bookmark[aria-pressed="true"] .bookmark-icon {
  color: var(--danger);
}

/* ---------- Content safety net (long names/bonuses never overflow) ----------
   Fix: the ':is(' selector opener was missing here, making this whole
   rule invalid CSS — browsers silently dropped it, so long casino
   names/bonus text had no overflow protection in production. Restored
   and scoped to the casino card, matching the original intent. */
.casino-card :is(h3, span, div, a, strong, small, label) {
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ---------- Small mobile refinement ---------- */

@media (max-width: 480px) {
  .casino-card__header { padding: 14px 14px 0; }
  .casino-card__body { padding: 12px 14px 6px; }
  .casino-card__actions { padding: 12px 14px 14px; }
}



/* ---------- Accessibility ---------- */

.casino-card:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

