/*
  Top Japanese Casinos — Trust Index v2.5
  Colour palette matched to topjapanesecasinos.com:
  - Site bg:        #edeaf5  (light lavender)
  - Purple dark:    #6b5fc7  (nav, accents)
  - Purple mid:     #8b7fd4
  - Pink accent:    #f472b6  (gradient end)
  - Green:          #22c55e  (rank badges, CTAs, positive)
  - White cards with purple-tinted borders
*/

/* ── Outer wrap ──────────────────────────────────────────────
   Matches site's lavender page background.
   Gradient header strip echoes the pink→purple site header. */
.cme-cti-wrap {
  max-width: 1100px;
  margin: 24px auto;
  padding: 0 !important;
  border-radius: 22px;
  background: #edeaf5 !important;
  color: #2d1f6e !important;
  box-shadow: 0 8px 32px rgba(107,95,199,0.14);
  overflow: hidden;
}

/* ── Hero — pink→purple gradient strip ──────────────────────*/
.cme-cti-hero {
  text-align: center;
  padding: 32px 28px 28px;
  background: linear-gradient(135deg, #f472b6 0%, #a78bfa 50%, #6b5fc7 100%) !important;
  color: #fff !important;
}

.cme-cti-pill {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.40);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .3px;
  margin-bottom: 14px;
}

.cme-cti-title {
  margin: 12px 0 10px;
  font-size: clamp(26px, 3.3vw, 42px);
  line-height: 1.12;
  color: #fff !important;
  font-weight: 800;
}

.cme-cti-title-accent { color: #fde68a !important; } /* warm yellow — readable on gradient */

.cme-cti-sub {
  margin: 0 auto 18px;
  max-width: 760px;
  color: rgba(255,255,255,0.88);
  font-size: 15px;
  line-height: 1.6;
}

/* ── KPI cards ───────────────────────────────────────────────*/
.cme-cti-kpis {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 18px 0 8px;
}

.cme-cti-kpi {
  min-width: 200px;
  padding: 14px 20px;
  border-radius: 16px;
  background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.35);
  text-align: left;
}

.kpi-label {
  color: rgba(255,255,255,0.80);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.kpi-val {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}

.cme-cti-updated {
  text-align: center;
  margin: 10px 0 4px;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
}

/* ── Table shell ─────────────────────────────────────────────*/
.cme-cti-table-wrap {
  margin: 0;
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  border-top: 3px solid #a78bfa;
}

.cme-cti-table {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  background: #fff !important;
  color: #2d1f6e !important;
}

/* ── Table header ────────────────────────────────────────────*/
.cme-cti-table thead th {
  text-align: center;
  padding: 14px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #6b5fc7 !important;
  background: #f3f0fc !important;
  border-bottom: 2px solid #ddd6fe;
  position: sticky;
  top: 0;
  z-index: 2;
  white-space: nowrap;
}

/* ── Table rows ──────────────────────────────────────────────*/
.cme-cti-table tbody tr:hover { background: #f8f5ff; }

.cme-cti-table td {
  padding: 16px;
  border-top: 1px solid #ede9fe;
  vertical-align: middle;
  text-align: center;
}

/* ── Casino name cell ────────────────────────────────────────*/
.casino-name  { font-weight: 700; font-size: 16px; color: #2d1f6e; }
.casino-domain{ color: #8b7fd4; margin-top: 3px; font-size: 13px; }

/* ── Rank badge — green circles like the site ───────────────*/
.rank-cell { width: 56px; }

.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: #22c55e !important;
  color: #fff !important;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 3px 10px rgba(34,197,94,0.35);
}

@media (max-width: 640px) {
  .rank-cell { width: 64px; }
  .cme-cti-table .rank-badge { min-width: 38px; height: 38px; padding: 0 12px; }
}

/* ── Trust score + sparkline ─────────────────────────────────*/
.trust-flex  { display: flex; align-items: center; gap: 12px; }
.trust-badge {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: rgba(107,95,199,0.10);
  border: 1.5px solid rgba(107,95,199,0.30);
  color: #6b5fc7;
  font-weight: 800;
  font-size: 17px;
}
.spark-wrap { color: #8b7fd4; }
.spark { display: block; }

/* ── Delta trend ─────────────────────────────────────────────*/
.center-cell { text-align: center; }
.trend       { font-weight: 800; font-size: 15px; }
.trend.pos   { color: #22c55e; }
.trend.neg   { color: #ef4444; }
.trend.neu   { color: #9ca3af; }

/* ── Generic pill ────────────────────────────────────────────*/
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 80px;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
}
.pill-risk { background: transparent; color: #2d1f6e; }
.pill-wd   { background: transparent; color: #2d1f6e; }

/* ── Live status pills ───────────────────────────────────────*/
.pill-live { min-width: 90px; }
.pill-live.stable {
  background: #dcfce7;
  border: 1px solid #86efac;
  color: #166534;
}
.pill-live.mixed {
  background: #fef9c3;
  border: 1px solid #fde047;
  color: #854d0e;
}
.pill-live.risk {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #7f1d1d;
}

/* ── Traffic-light pills ─────────────────────────────────────*/
.pill-level-low,
.pill-level-good  { background: #dcfce7; border: 1px solid #86efac; color: #166534; }

.pill-level-medium,
.pill-level-mixed { background: #fef9c3; border: 1px solid #fde047; color: #854d0e; }

.pill-level-high,
.pill-level-bad   { background: #fee2e2; border: 1px solid #fca5a5; color: #7f1d1d; }

/* ── CTA button — green like "カジノへGO" ──────────────────*/
.cta-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  color: #fff;
  background: var(--cta-bg, var(--cme-cta-default, #22c55e));
  box-shadow: 0 3px 12px rgba(34,197,94,0.35);
  transition: filter .15s ease, transform .05s ease;
}
.cta-btn:hover  { filter: brightness(0.92); transform: translateY(-1px); }
.cta-btn:active { transform: translateY(0); }
.cta-btn.disabled { opacity: .55; cursor: not-allowed; }

/* ── Best-for tags ───────────────────────────────────────────*/
.bestfor-cell { text-align: center; }
.cme-cti-tag {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #ddd6fe;
  background: #f3f0fc;
  color: #6b5fc7;
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.cme-cti-tag-sep { display: inline-block; margin: 0 5px; color: #a78bfa; font-weight: 800; }
.cme-cti-dash    { color: #c4b5fd; font-weight: 800; }

/* ── Mobile ──────────────────────────────────────────────────*/
@media (max-width: 820px) {
  .cme-cti-wrap  { max-width: 100%; width: 100%; margin: 14px 0; border-radius: 14px; }
  .cme-cti-wrap, .cme-cti-wrap * { box-sizing: border-box; }
  .cme-cti-hero  { padding: 22px 16px 20px; }
  .cme-cti-kpis  { gap: 10px; }
  .cme-cti-kpi   { min-width: 0; width: 100%; }
  .cme-cti-table-wrap { max-width: 100%; }
}
