/*
 * Local CSS fixes for factory pages on the LuckyStar theme.
 *
 * Originally content-only (the theme resets every list to list-style:none
 * and padding-left:0 so its navigation renders as bare rows, and never
 * restores list styling inside post content -- an ordered list of steps
 * otherwise renders with no numbers at all, invisible in the HTML and only
 * visible in a browser). Most of what's below is still scoped to the content
 * column for exactly that reason.
 *
 * The "header" section near the end is the one deliberate exception: a
 * theme-chrome layout bug (see its own comment) that isn't specific to any
 * one page's content, so it can't be fixed by scoping to the content column.
 */

/* --- lists: give content lists their markers and indent back -------------- */

.games-info__cnt ul.wp-block-list,
.games-info__cnt ol.wp-block-list {
  padding-left: 1.5em;
  margin: 0 0 18px;
}

.games-info__cnt ul.wp-block-list {
  list-style: disc outside;
}

.games-info__cnt ol.wp-block-list {
  list-style: decimal outside;
}

.games-info__cnt ul.wp-block-list > li,
.games-info__cnt ol.wp-block-list > li {
  display: list-item;
  list-style: inherit;
  margin-bottom: 0.45em;
  padding: 0;
}

.games-info__cnt ul.wp-block-list > li::before,
.games-info__cnt ol.wp-block-list > li::before {
  content: none; /* the theme adds pseudo-element bullets for nav rows */
}

/* --- tables: scroll inside the figure instead of pushing the column ------- */

.games-info__cnt figure.wp-block-table {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 18px;
  -webkit-overflow-scrolling: touch;
}

.games-info__cnt figure.wp-block-table table {
  width: 100%;
  margin: 0;
}

.games-info__cnt figure.wp-block-table th,
.games-info__cnt figure.wp-block-table td {
  text-align: left;
  vertical-align: top;
}

/* --- headings: a little more air above a new section ---------------------- */

.games-info__cnt h2.wp-block-heading {
  margin-top: 32px;
}

.games-info__cnt h3.wp-block-heading,
.games-info__cnt h4.wp-block-heading {
  margin-top: 24px;
}

/* --- links in body copy should look like links ---------------------------- */

.games-info__cnt p a,
.games-info__cnt li a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* --- the plugin's own heading overshoots its container by a few pixels ---- */

.ez-toc-title-container {
  max-width: 100%;
}

/* --- narrow screens: make a two-column table fit rather than scroll ------- */

@media (max-width: 640px) {
  .games-info__cnt figure.wp-block-table table {
    table-layout: fixed;
    font-size: 12px;
  }

  .games-info__cnt figure.wp-block-table th,
  .games-info__cnt figure.wp-block-table td {
    padding: 6px 7px;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
  }
}

/* --- the TOC plugin's header box ignores its own padding ------------------ */

.ez-toc-title-container,
.ez-toc-title-container * {
  box-sizing: border-box;
}

/* --- header: the nav row must not push the page wider than the viewport --- */
/*
 * Confirmed by measuring the live DOM, not guessed from the stylesheet:
 * header, .header__wrap, .header__main and .menu-cnt (#menu-100cuci) are
 * all flex containers with flex-wrap: nowrap, and their flex children default to
 * min-width: auto, which stops flex-shrink from ever engaging below the
 * children's own intrinsic width -- the standard flexbox overflow trap. At
 * ordinary desktop widths the nav items plus the Login/Register buttons
 * together want more width than the viewport has, so the buttons get pushed
 * past the right edge and the whole page gains a horizontal scrollbar.
 *
 * Letting the row wrap onto a second line, instead of trying to make every
 * item shrink, is the minimal fix: it needs no font-size change, no JS, and
 * no restructuring of the theme's own flex/min-width chain, which would risk
 * side effects this file can't verify without a live browser.
 */
header .header__wrap,
header .header__main,
header .menu-cnt {
  flex-wrap: wrap;
}

/* --- factory image pipeline ------------------------------------------------
 * wp-page.php expands manifest-driven <!-- wp:factory/image --> placeholders
 * into real Gutenberg <figure class="wp-block-image ... factory-image ..."/>
 * markup. Kept deliberately small and scoped to the same content container
 * as everything else in this file, instead of touching the theme.
 *
 *   factory-image--wide    a standalone image, centered, capped to a
 *                          readable width rather than running full bleed.
 *
 * A "side" image is never a bare float: md2blocks.py always pairs it with
 * one real paragraph inside a two-column .factory-media-text flex block
 * (image + text as a single unit), because a float with no guaranteed
 * trailing text to wrap looked like an orphaned box shoved to one side with
 * a blank gap under it. Both columns are a fixed, matching size regardless
 * of which side the image sits on, so image sizing reads as one consistent
 * size across the page rather than varying per placement.
 */
.games-info__cnt .factory-image {
  margin: 24px 0;
}

.games-info__cnt .factory-image img {
  display: block;
  height: auto;
  max-width: 100%;
}

.games-info__cnt .factory-image--wide {
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Fallback only: a side-layout image that found no paragraph to pair with
 * (a section made entirely of lists/tables) falls back to a standalone
 * placeholder from wp-page.php -- rare, but still capped so it can't render
 * at full bleed width. */
.games-info__cnt .factory-image--side {
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.games-info__cnt .factory-media-text {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 28px 0;
}

.games-info__cnt .factory-media-text--right {
  flex-direction: row-reverse;
}

.games-info__cnt .factory-media-text__media {
  flex: 0 0 380px;
  max-width: 380px;
}

.games-info__cnt .factory-media-text__media .factory-image {
  margin: 0;
}

.games-info__cnt .factory-media-text__media img {
  border-radius: 4px;
}

.games-info__cnt .factory-media-text__text {
  flex: 1 1 0;
  min-width: 0;
}

.games-info__cnt .factory-media-text__text p {
  margin: 0;
}

@media (max-width: 782px) {
  .games-info__cnt .factory-media-text,
  .games-info__cnt .factory-media-text--right {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .games-info__cnt .factory-media-text__media {
    flex-basis: auto;
    max-width: 100%;
  }

  .games-info__cnt .factory-image--wide {
    max-width: 100%;
  }
}

/* --- footer/theme demo-content removal ---------------------------------
 * The base theme ships with unsupported demo content baked directly into
 * footer.php, unconditionally (not driven by any Carbon Fields option, so
 * it renders regardless of what's configured): fabricated support emails
 * built from the site's own domain, sports-federation badges (UEFA, UFC,
 * WTA, FIBA, NHL, ATP, ITF, FIFA) with no actual sponsorship, crypto/
 * unsupported payment icons that don't match this project's documented
 * cashier channels, a Windows app download badge with no real app, and a
 * PWA promo banner promising "$100 to the bonus account" that no reviewed
 * page content supports. None of this is approved 100CUCI content, and
 * there is no legitimate replacement to invent, so it is hidden rather
 * than edited into the shared theme file (footer.php is used by other
 * site-factory projects on this same theme copy) -- reversible, scoped to
 * this project only via the same host-gated project.css this file already
 * is, and leaves the approved footer navigation (Customer Service,
 * Responsible Gaming, Privacy, Terms) untouched.
 */
footer .footer__suporte,
footer .footer__cnt_info,
footer .wt-partner-badges,
footer .footer__for_windows,
footer .v-abs {
  display: none !important;
}

footer svg[icon="payment-full/btc"],
footer svg[icon="payment-full/qiwi"],
footer svg[icon="payment-full/ethereum"],
footer svg[icon="payment-full/tether"] {
  display: none !important;
}
