/**
 * Bimber: colonna header (.g1-column.g1-dropable) e .g1-row-background
 * allineati al tema scuro dell’app (solo body.tarot-clash-royale-php.tc-theme-dark, route V2).
 * Header Builder (Bimber 5.x): stesse regole su #page > .g1-hb-row (non solo .g1-header legacy).
 * Righe orizzontali: bordi tema su .g1-row-layout-page e fascia .g1-row-background — attenuati qui, senza display:none globale.
 * Nascondere: body.tc-v2-bimber-hide-header-dropable (barra header Bimber intera: logo, menu, varianti layout) / row-background / page-title.
 * Layout: su V2 rimuovere la sidebar Bimber su tutte le larghezze (`#secondary`, `.g1-column-1of3`, ecc.);
 *   la classe `g1-column-1of3` riserva un terzo anche se il blocco è vuoto — va collassato e il main (`g1-column-2of3`) portato al 100%.
 */

/* --- Tema scuro: sfondi e testi (niente bianco “lite” sul header Bimber) --- */
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable {
  background-color: rgba(11, 13, 20, 0.97) !important;
  background-image: linear-gradient(180deg, rgba(19, 22, 36, 0.98) 0%, rgba(11, 13, 20, 0.99) 100%) !important;
  border-bottom: 1px solid rgba(110, 135, 255, 0.22) !important;
}

body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-bin,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-bin-inner,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-primary-nav,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-primary-nav-menu,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-bin,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-bin-inner,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-primary-nav,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-primary-nav-menu,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-bin,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-bin-inner,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-primary-nav,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-primary-nav-menu {
  background: transparent !important;
}

body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable a,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-drop-toggle,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-drop-toggle-text,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable a,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle-text,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable a,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle-text {
  color: rgba(244, 240, 255, 0.94) !important;
}

body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable a:hover,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-drop-toggle:hover,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable a:hover,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle:hover,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable a:hover,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-drop-toggle:hover {
  color: #fff !important;
}

body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .site-title,
body.tarot-clash-royale-php.tc-theme-dark .g1-header .g1-column.g1-dropable .g1-mega,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .site-title,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-row.g1-hb-row .g1-column.g1-dropable .g1-mega,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .site-title,
body.tarot-clash-royale-php.tc-theme-dark #page > .g1-sticky-top-wrapper .g1-row.g1-hb-row .g1-column.g1-dropable .g1-mega {
  color: rgba(244, 240, 255, 0.94) !important;
}

/* Faixa / strato sfondo riga Bimber: stesso tono del resto, senza fascia min-height che taglia il colore */
body.tarot-clash-royale-php.tc-theme-dark .g1-row-background {
  background-color: #121622 !important;
  background-image: linear-gradient(180deg, rgba(19, 22, 36, 0.95) 0%, #131624 100%) !important;
  min-height: 0 !important;
}

/* Linee tra sezioni: bordi del color scheme Bimber su righe full-width — resi quasi invisibili in app scura */
body.tarot-clash-royale-php.tc-theme-dark .g1-body-inner #page > .g1-row.g1-row-layout-page,
body.tarot-clash-royale-php.tc-theme-dark #primary .g1-row.g1-row-layout-page {
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
}

body.tarot-clash-royale-php.tc-theme-dark .g1-body-inner #page > .g1-row.g1-row-layout-page > .g1-row-inner,
body.tarot-clash-royale-php.tc-theme-dark #primary .g1-row.g1-row-layout-page > .g1-row-inner {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* --- Opzione header: Bimber può mettere logo/menu in .g1-bin / .g1-id, non solo in .g1-column.g1-dropable — nascondiamo tutto il blocco header tema --- */
/*
 * Bimber 5.x (Header Builder): header.php carica template-parts/header-builder/index.php —
 * righe .g1-row.g1-hb-row (e .g1-sticky-top-wrapper), senza wrapper .g1-header (quello resta su AMP / template legacy).
 */
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php #page > .g1-sticky-top-wrapper,
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php #page > .g1-row.g1-hb-row,
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php .g1-header,
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php .g1-header-sticky,
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php header[role="banner"].site-header,
body.tc-v2-bimber-hide-header-dropable.tarot-clash-royale-php .site-header {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.tc-v2-bimber-hide-row-background.tarot-clash-royale-php .g1-row-background {
  display: none !important;
}

/* Titolo pagina tema (Bimber: h1.g1-alpha.page-title, ecc.) — solo con opzione + route app */
body.tc-v2-bimber-hide-page-title.tarot-clash-royale-php h1.page-title,
body.tc-v2-bimber-hide-page-title.tarot-clash-royale-php .g1-alpha.page-title {
  display: none !important;
}

/* --- V2: rimuovere la sidebar Bimber su tutte le larghezze (#secondary + g1-column-1of3) --- */
body.tarot-clash-royale-php #secondary,
body.tarot-clash-royale-php #secondary.g1-sidebar,
body.tarot-clash-royale-php #secondary.g1-column.g1-column-1of3,
body.tarot-clash-royale-php .g1-sidebar.g1-column-1of3,
body.tarot-clash-royale-php .g1-sidebar,
body.tarot-clash-royale-php .g1-sidebar-normal,
body.tarot-clash-royale-php .g1-sidebar-padded,
body.tarot-clash-royale-php aside.g1-sidebar {
  display: none !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border-width: 0 !important;
  overflow: hidden !important;
  flex: 0 0 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.tarot-clash-royale-php .g1-main,
body.tarot-clash-royale-php .g1-main-inner,
body.tarot-clash-royale-php .g1-content,
body.tarot-clash-royale-php .g1-content-inner {
  max-width: 100% !important;
  min-width: 0 !important;
}

@supports selector(:has(*)) {
  body.tarot-clash-royale-php .g1-row-inner:has(.g1-sidebar),
  body.tarot-clash-royale-php .g1-row-inner:has(#secondary),
  body.tarot-clash-royale-php .g1-row-inner:has(aside.g1-sidebar),
  body.tarot-clash-royale-php .g1-canvas-row-inner:has(.g1-sidebar),
  body.tarot-clash-royale-php .g1-canvas-row-inner:has(#secondary) {
    grid-template-columns: minmax(0, 1fr) !important;
    column-gap: 0 !important;
    gap: 0 !important;
  }

  body.tarot-clash-royale-php .g1-row-inner:has(#secondary) > .g1-column-2of3,
  body.tarot-clash-royale-php .g1-canvas-row-inner:has(#secondary) > .g1-column-2of3,
  body.tarot-clash-royale-php .g1-row-inner:has(#secondary) .g1-column-2of3,
  body.tarot-clash-royale-php .g1-canvas-row-inner:has(#secondary) .g1-column-2of3,
  body.tarot-clash-royale-php .g1-row-inner:has(.g1-sidebar) .g1-main,
  body.tarot-clash-royale-php .g1-row-inner:has(.g1-sidebar) .g1-content,
  body.tarot-clash-royale-php .g1-row-inner:has(#secondary) .g1-main,
  body.tarot-clash-royale-php .g1-row-inner:has(#secondary) .g1-content {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.tarot-clash-royale-php .g1-row-inner:has(#secondary) .g1-column-2of3,
  body.tarot-clash-royale-php .g1-canvas-row-inner:has(#secondary) .g1-column-2of3 {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
}
