.clp-listing {
  --clp-bg: #f7faf9;
  --clp-surface: #ffffff;
  --clp-text: #102a2a;
  --clp-muted: #5d7272;
  --clp-border: #c7dbd7;
  --clp-accent: #006b5c;
  --clp-accent-soft: #d8f1eb;
  --clp-cta: #d7263d;
  --clp-cta-hover: #b91f33;
  background:
    radial-gradient(circle at 0 0, #e5f5ef 0, #f7faf9 44%),
    linear-gradient(145deg, #f7faf9, #eef6f3);
  border: 1px solid var(--clp-border);
  border-radius: 20px;
  padding: 24px;
  font-family: Manrope, Segoe UI, Helvetica, Arial, sans-serif;
  color: var(--clp-text);
}

/* ── Header ── */

.clp-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.clp-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.clp-subtitle {
  margin: 8px 0 0;
  color: var(--clp-muted);
  max-width: 65ch;
}

.clp-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #315454;
  background: var(--clp-accent-soft);
  border: 1px solid #b5dacc;
  border-radius: 12px;
  padding: 10px 12px;
  flex-shrink: 0;
}

/* ── Controls ── */

.clp-controls {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.clp-search {
  flex: 1 1 180px;
  min-width: 0;
}

.clp-license-filter {
  flex: 0 0 150px;
}

.clp-sort-group {
  flex: 1 1 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clp-search,
.clp-license-filter {
  min-height: 42px;
  border: 1px solid #b8cbc8;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--clp-text);
  font-size: 14px;
}

.clp-search:focus,
.clp-license-filter:focus,
.clp-sort-btn:focus,
.clp-button:focus {
  outline: 2px solid #0f8d77;
  outline-offset: 1px;
}

.clp-sort-btn {
  border: 1px solid #b8cbc8;
  border-radius: 999px;
  background: #fff;
  color: var(--clp-text);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 12px;
  cursor: pointer;
  white-space: nowrap;
}

.clp-sort-btn.is-active {
  background: var(--clp-accent);
  border-color: var(--clp-accent);
  color: #fff;
}

/* ── Results count ── */

.clp-results {
  margin: 10px 0 0;
  font-size: 13px;
  color: #375b5b;
}

/* ── Casino list ── */

.clp-casino-list {
  margin-top: 10px;
  display: grid;
  gap: 12px;
}

/* ── Casino card — 3-area grid ──
   [main   | action]
   [metrics| action]
   Action spans both rows on the right.
── */

.clp-casino-card {
  background: var(--clp-surface);
  border: 1px solid var(--clp-border);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto;
  grid-template-areas:
    "main   action"
    "metrics action";
  column-gap: 20px;
  row-gap: 12px;
  align-items: start;
  box-shadow: 0 4px 14px rgba(10, 36, 36, 0.04);
}

/* ── Main area: rank+logo stacked left, brand info right ── */

.clp-main {
  grid-area: main;
  display: grid;
  grid-template-columns: 90px 1fr;
  grid-template-rows: auto 1fr;
  column-gap: 14px;
  row-gap: 6px;
  min-width: 0;
}

.clp-rank-badge {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #ecf4f1;
  border: 1px solid #c6ddd7;
  color: #0c3a33;
  font-size: 14px;
}

.clp-logo-wrap {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90px;
  height: 52px;
  background: #fff;
  border: 1px solid var(--clp-border);
  border-radius: 10px;
  overflow: hidden;
  padding: 5px 7px;
  flex-shrink: 0;
  text-decoration: none;
}

.clp-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.clp-brand {
  grid-column: 2;
  grid-row: 1 / 3;
  align-self: center;
  min-width: 0;
}

.clp-brand h3 {
  margin: 0;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.clp-brand p {
  margin: 4px 0 0;
  color: #4c6663;
  font-size: 13px;
}

.clp-license-tag {
  display: inline-block;
  margin-top: 7px;
  font-size: 11px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0f5f52;
  border: 1px solid #9ecfbf;
  border-radius: 999px;
  padding: 5px 8px;
  background: #e8f7f1;
}

/* ── Metrics — 4 boxes in a horizontal row ── */

.clp-metrics {
  grid-area: metrics;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.clp-metric {
  background: #f8fcfb;
  border: 1px solid #d4e5e1;
  border-radius: 10px;
  padding: 10px;
}

/* Direct child only — prevents bleeding into .clp-stars spans */
.clp-metric > span {
  display: block;
  font-size: 11px;
  color: #4a6260;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.clp-metric strong {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  gap: 4px !important;
  font-size: 14px;
  line-height: 1.3;
}

/* ── Stars ── */

.clp-stars {
  display: inline-flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 1px !important;
  align-items: center !important;
  vertical-align: middle !important;
}

.clp-star {
  display: inline !important;
  font-size: 15px !important;
  line-height: 1 !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
}

.clp-star-full {
  color: #f5a623;
}

.clp-star-half {
  background: linear-gradient(to right, #f5a623 50%, #c8c8c8 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.clp-star-empty {
  color: #c8c8c8;
}

.clp-rating-num {
  font-size: 13px;
  font-weight: 700;
  color: var(--clp-muted);
}

/* ── Action — bonus + CTA, right column spanning both rows ── */

.clp-action {
  grid-area: action;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  align-self: stretch;
  min-width: 145px;
}

.clp-bonus {
  margin: 0;
  font-size: 13px;
  text-align: right;
  font-weight: 700;
  color: #153f3a;
  line-height: 1.4;
}

.clp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--clp-cta);
  background: var(--clp-cta);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 12px;
  white-space: nowrap;
}

.clp-button:hover {
  background: var(--clp-cta-hover);
  border-color: var(--clp-cta-hover);
  color: #fff;
}

/* ── Disclosure ── */

.clp-disclosure {
  margin: 14px 0 0;
  color: #506a66;
  font-size: 12px;
  line-height: 1.5;
}

/* ── Utility ── */

.clp-hidden {
  display: none;
}

/* ══════════════════════════════════════════
   RESPONSIVE
   720px  — sidebar layout / narrow content
   480px  — mobile
══════════════════════════════════════════ */

/* At 720px the sidebar squeezes the content area enough that
   the 4-metric row gets cramped. Switch to 2×2 grid and
   stack the action below. */
@media (max-width: 720px) {
  .clp-listing {
    padding: 16px;
  }

  .clp-title {
    font-size: 24px;
  }

  /* Card: single column, metrics + action stacked below main */
  .clp-casino-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    grid-template-areas:
      "main"
      "metrics"
      "action";
    row-gap: 12px;
  }

  /* Metrics: 2×2 */
  .clp-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Action: horizontal row (bonus left, button right) */
  .clp-action {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    align-self: auto;
  }

  .clp-bonus {
    text-align: left;
    flex: 1;
    padding-right: 12px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .clp-listing {
    padding: 12px;
    border-radius: 14px;
  }

  .clp-title {
    font-size: 21px;
  }

  .clp-main {
    grid-template-columns: 72px 1fr;
  }

  .clp-rank-badge {
    width: 100%;
  }

  .clp-logo-wrap {
    width: 72px;
    height: 44px;
  }

  .clp-brand h3 {
    font-size: 16px;
  }

  /* Action: stack vertically on very small screens */
  .clp-action {
    flex-direction: column;
    align-items: stretch;
  }

  .clp-bonus {
    text-align: center;
    padding-right: 0;
  }

  .clp-button {
    width: 100%;
    justify-content: center;
  }
}
