/* ============================================================================
   Casino Summary — [section cpt="casino-review|casino-bonus" type="summary"]
   Full-bleed LIGHT section. Mobile-first; breakpoints 768 / 1280.
   Layout: left group [logo + CTA | name/rating/excerpt] beside a right group
   [key figures + facts/features table].
     · Desktop  = left row beside right (2 columns).
     · Tablet   = left row above the right group (1 column).
     · Mobile   = logo + name/rating in a row, excerpt full-width, CTA full-width,
                  then the right group.
   All values map to design tokens (no hard-coded values, no new tokens).
   ============================================================================ */

/* ── Full-bleed shell + Brizy edge-to-edge resets ─────────────────────────── */
.cs {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  box-sizing: border-box;
  background-color: var(--color-base-bluish-white);
  background-image: url("../images/summary-bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: var(--spacing-25) 0;                 /* py-25 = 100 top/bottom (all breakpoints) */
  font-family: var(--font-family-paragraph);
}
.cs *, .cs *::before, .cs *::after { box-sizing: border-box; }
.cs h2, .cs p { margin: 0; }

.brz-wrapper:has(.cs) { margin-top: 0 !important; margin-bottom: 0 !important; }
.brz-section__content:has(.cs) { padding-top: 0 !important; padding-bottom: 0 !important; }

/* ── Inner ────────────────────────────────────────────────────────────────── */
.cs__inner {
  max-width: 1023px;
  margin: 0 auto;
  padding: 0 var(--spacing-5);                  /* mobile px-5 = 20 */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-6);                        /* 24 left ↔ right (mobile/tablet) */
}

/* ── Left group (mobile: logo+name row, then excerpt, then CTA) ───────────── */
.cs__left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--spacing-4);                        /* 16 */
  text-align: left;
}
.cs__brand { display: contents; }               /* mobile: unwrap so logo & CTA reorder freely */
.cs__text { display: contents; }                /* mobile: unwrap so heading & excerpt reorder */

.cs__logo {
  order: 1;
  flex: 0 0 auto;
  width: 140px;                                 /* mobile/tablet 140 (Figma) */
  height: 140px;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.cs__logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

.cs__heading {
  order: 2;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-2);                        /* 8 name ↔ rating */
}
.cs__name {
  font-family: var(--font-family-header);
  font-size: var(--font-size-h3);               /* mobile H3 34 (desktop/tablet override to H2) */
  line-height: var(--line-height-h3);
  font-weight: var(--font-weight-bold);
  color: var(--color-default-text);
}
.cs__rating {
  font-family: var(--font-family-header);
  font-size: var(--font-size-h4);               /* 22 / 24 / 30 */
  line-height: var(--font-size-h4);             /* tight (Figma: lh = font-size) */
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary-dark);
}

.cs__summary {
  order: 3;
  flex-basis: 100%;
  width: 100%;
  font-size: var(--font-size-p2-base);          /* 14 / 15 / 16 */
  line-height: var(--line-height-p2-base);
  color: var(--color-default-text-light);
}

/* CTA button (blue gradient) */
.cs-btn {
  order: 4;
  flex-basis: 100%;
  width: 100%;                                  /* mobile: full width (tablet/desktop pin to the logo width) */
  min-height: 77px;                             /* mobile h-77 (Figma BUT-002) */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-2);
  padding: var(--spacing-4) var(--spacing-13);  /* 16 / 52 (nominal; the fixed button width caps it, as in Figma) */
  white-space: nowrap;                          /* keep "VISIT CASINO" on one line */
  background: var(--gradient-button-default);
  border-radius: var(--radius-xl);
  font-family: var(--font-family-header);
  font-size: var(--font-size-button);           /* 12 / 14 / 16 */
  line-height: var(--line-height-button);
  font-weight: var(--font-weight-bold);
  color: var(--color-base-white);
  text-decoration: none;
}
.cs-btn:hover, .cs-btn:focus, .cs-btn:active, .cs-btn:visited {
  color: var(--color-base-white);
  text-decoration: none;
}
/* Hover: flat left→right darker gradient, no shadow. Composed from color tokens —
   no left/right blue→dark token exists (--gradient-default is top/bottom). */
.cs-btn:hover { background-image: linear-gradient(to right, var(--color-primary), var(--color-primary-dark)); }
.cs-btn__chevron { font-weight: var(--font-weight-bold); flex: 0 0 auto; }

/* ── Right group ──────────────────────────────────────────────────────────── */
.cs__right {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-5);                        /* 20 key figures ↔ table */
}

/* Key figures */
.cs__keyfigures {
  display: flex;
  gap: var(--spacing-7);                        /* mobile/tablet 28 */
}
.cs-kf { display: flex; flex-direction: column; flex: 0 0 auto; }
.cs-kf__label {
  font-family: var(--font-family-header);
  font-size: var(--font-size-h7);               /* 13 / 14 / 16 */
  line-height: var(--line-height-h7);
  font-weight: var(--font-weight-semibold);
  color: var(--color-default-text-light);
  white-space: nowrap;
}
.cs-kf__value {
  font-family: var(--font-family-header);
  font-size: var(--font-size-h3);               /* 34 / 36 / 38 */
  line-height: var(--line-height-h3);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  white-space: nowrap;
}

/* Facts + features stacked table */
.cs__table { display: flex; flex-direction: column; }

.cs__facts {
  background: var(--color-base-bluish-white);   /* mobile/tablet (desktop → daisy-white) */
  border: var(--border-width-thin) solid var(--color-base-gray);
  border-bottom: 0;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;   /* mobile/tablet 16 (desktop → 12) */
  padding: var(--spacing-5) var(--spacing-4);   /* 20 / 16 */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);                        /* 12 */
}
.cs-fact { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-4); }
.cs-fact__label {
  font-size: var(--font-size-p3-caption);
  line-height: var(--line-height-p3-caption);
  color: var(--color-default-text-light);
}
.cs-fact__value {
  font-family: var(--font-family-header);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-p3-caption);
  line-height: var(--line-height-p3-caption);
  color: var(--color-default-text-light);
  text-align: right;
}
.cs-fact__divider { height: var(--border-width-thin); background: var(--color-base-gray); }

.cs__features {
  background: var(--color-callout-info);
  border: var(--border-width-thin) solid var(--color-base-gray);
  border-top: 0;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);    /* 12 */
  padding: var(--spacing-5) var(--spacing-4);   /* 20 / 16 */
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);                        /* 12 */
}
.cs-feature { display: flex; align-items: center; justify-content: space-between; gap: var(--spacing-4); }
.cs-feature__name {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-1);
  font-size: var(--font-size-p3-caption);
  line-height: var(--line-height-p3-caption);
  color: var(--color-primary);
}
.cs-feature__icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}
.cs__features .cs-feature:nth-child(1) .cs-feature__icon { background-image: url("../images/icons/vip.svg"); }
.cs__features .cs-feature:nth-child(2) .cs-feature__icon { background-image: url("../images/icons/loyalty.svg"); }
.cs__features .cs-feature:nth-child(3) .cs-feature__icon { background-image: url("../images/icons/chip.svg"); }

.cs-feature__badge {
  min-width: 41px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--spacing-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-family-header);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-size-p3-caption);
  line-height: var(--line-height-p3-caption);
  color: var(--color-base-white);
}
.cs-feature__badge--yes { background: var(--color-semantic-success); }
.cs-feature__badge--no { background: var(--color-semantic-error); }

/* ── Tablet ≥768 ──────────────────────────────────────────────────────────── */
@media (min-width: 768px) {
  .cs__inner { padding: 0 var(--spacing-11); }              /* px-11 = 44 */

  /* Left becomes a [brand | text] row; unwrap the mobile reflow */
  .cs__left {
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: var(--spacing-7);                                  /* 28 */
  }
  .cs__brand {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);                                  /* 16 logo ↔ CTA */
    flex: 0 0 140px;
  }
  .cs__text {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-4);                                  /* 16 heading ↔ excerpt */
    flex: 1 1 auto;
    min-width: 0;
  }

  /* reset the mobile order / basis */
  .cs__logo { order: 0; }
  .cs__heading { order: 0; flex: 0 0 auto; }
  .cs__summary { order: 0; flex-basis: auto; width: auto; }
  .cs-btn { order: 0; flex-basis: auto; width: 140px; min-height: 60px; } /* tablet: 140 wide (= logo), h-60 */

  .cs__name { font-size: var(--font-size-h2); line-height: var(--line-height-h2); }  /* 42 tablet */

  /* Background: shift the crop right so the roulette wheel reads on the right edge */
  .cs { background-position: 95% center; }
}

/* ── Desktop ≥1280 ────────────────────────────────────────────────────────── */
@media (min-width: 1280px) {
  .cs__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: var(--spacing-12);                                 /* 48 left ↔ right */
    padding: 0;                                             /* max-width centers the 1023 content */
  }

  .cs__left { flex: 1 1 auto; }
  .cs__brand { flex: 0 0 171px; }                           /* desktop logo/CTA column 171 */
  .cs__logo { width: 171px; height: 171px; }
  .cs__text { gap: var(--spacing-6); }                      /* 24 heading ↔ excerpt */
  .cs-btn { width: 171px; min-height: 77px; }               /* desktop: 171 wide (= logo), h-77 */
  .cs__name { line-height: var(--line-height-h2); }         /* H2 48 desktop (size via token) */

  .cs__right { flex: 0 0 318px; }

  .cs__keyfigures { gap: var(--spacing-4); }                /* 16 */

  /* Desktop facts panel: daisy-white bg, tighter top radius */
  .cs__facts {
    background: var(--color-base-daisy-white);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;   /* 12 */
  }
}
