/* Classic-template bridge. These rules replace layout primitives normally emitted by a block theme. */
:root {
  --wp--preset--color--ink: #01070a;
  --wp--preset--color--charcoal: #041217;
  --wp--preset--color--bone: #eaecec;
  --wp--preset--color--toxic: #a0f912;
  --wp--preset--color--magenta: #ff2571;
  --wp--preset--color--purple: #76198f;
}

html { color-scheme: dark; }

body.zch-classic-theme {
  margin: 0;
  color: var(--zc-bone);
  font-family: var(--zc-body);
  font-size: 16px;
  line-height: 1.6;
}

.has-ink-background-color { background-color: var(--zc-ink) !important; }
.has-charcoal-background-color { background-color: var(--zc-charcoal) !important; }
.has-bone-color { color: var(--zc-bone) !important; }
.has-toxic-background-color { background-color: var(--zc-toxic) !important; color: var(--zc-ink) !important; }
.has-magenta-background-color { background-color: var(--zc-magenta) !important; color: #fff !important; }
.has-purple-background-color { background-color: var(--zc-purple) !important; color: #fff !important; }

.alignwide,
.zch-shell { width: min(1440px, calc(100% - clamp(2rem, 8vw, 8rem))); margin-right: auto; margin-left: auto; }
.alignfull { width: 100%; max-width: none; }

.site-header__inner,
.site-footer__main,
.site-footer__legal { display: flex; align-items: center; justify-content: space-between; }

.site-header__inner { gap: 1.25rem; }
.brand-lockup { display: flex; align-items: center; }
.brand-lockup__text { min-width: 0; }
.custom-logo-link,
.zch-fallback-logo { display: block; flex: 0 0 auto; }
.custom-logo,
.zch-fallback-logo img { display: block; width: auto; height: 52px; }
.brand-lockup__name a { color: var(--zc-bone); text-decoration: none; }

.primary-nav { min-width: 0; margin-left: auto; }
.primary-nav__list,
.primary-nav .menu,
.footer-nav__list,
.footer-nav .menu {
  display: flex;
  align-items: center;
  gap: clamp(.65rem, 1.25vw, 1.25rem);
  margin: 0;
  padding: 0;
  list-style: none;
}
.primary-nav a { color: var(--zc-bone); font-family: var(--zc-mono); font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-decoration: none; text-transform: uppercase; }
.primary-nav li { position: relative; }
.primary-nav li.current-menu-item::after,
.primary-nav li:hover::after { position: absolute; right: 0; bottom: .95rem; left: 0; height: 2px; content: ""; background: var(--zc-toxic); }

.header-actions { display: flex; align-items: center; gap: .75rem; flex: 0 0 auto; }
.header-actions .zc-social-links { display: none; }
.zch-join-button,
.wp-block-button__link,
.zc-form__button {
  display: inline-flex;
  min-height: 44px;
  padding: .72rem 1rem;
  align-items: center;
  justify-content: center;
  border: 0;
  clip-path: var(--zc-cut);
  background: var(--zc-magenta);
  color: #fff;
  font-family: var(--zc-mono);
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-decoration: none;
  text-transform: uppercase;
}

.zch-menu-toggle { display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--zc-line); background: transparent; color: var(--zc-bone); font-size: 1.3rem; }

.site-main:not(.site-main--dashboard) { width: 100%; }
.zch-content-shell { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }

/*
 * Dashboard layout bridge
 *
 * The homepage pattern originally lived in a block theme. On conventional
 * WordPress installs, legacy theme/plugin styles can leave <main> constrained
 * to a content column or override the Group block's display property. Keep the
 * dashboard in its own full-width formatting context and make the desktop row
 * grids explicit here, in the final stylesheet in the cascade.
 */
body.zch-dashboard-page .site-main--dashboard {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

body.zch-dashboard-page .z-home-dashboard {
  width: min(1440px, 100%) !important;
  max-width: 1440px !important;
  margin-right: auto !important;
  margin-left: auto !important;
}

body.zch-dashboard-page .z-dashboard-grid {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
}

/* WordPress adds this compatibility wrapper around Group block contents when
 * they are rendered by a classic theme. Let its children remain the actual
 * grid items instead of turning the entire row into one item in column one. */
body.zch-dashboard-page :is(.z-home-dashboard, .z-dashboard-grid, .z-dashboard-stack) > .wp-block-group__inner-container {
  display: contents !important;
}

body.zch-dashboard-page :is(
  .z-dashboard-panel--results,
  .z-dashboard-panel--news,
  .z-dashboard-panel--teams,
  .z-dashboard-panel--partners
) > .wp-block-group__inner-container {
  display: contents !important;
}

body.zch-dashboard-page .z-dashboard-panel--join > .wp-block-group__inner-container {
  height: 100%;
  min-height: 100%;
}

.zch-team-profile__roster {
  width: min(1060px, 100%);
  margin-top: clamp(3rem, 6vw, 6rem);
}

.zch-team-profile__roster .zc-roster-wrap {
  display: block;
}

.zch-team-profile__roster .zc-roster-intro {
  min-height: 0;
  padding: clamp(1.25rem, 3vw, 2rem);
  border-bottom: 1px solid var(--zc-line);
}

.zch-team-profile__roster .zc-roster-intro h2 {
  margin: 0.35rem 0 0.5rem;
  font-size: clamp(2.4rem, 5vw, 4.25rem);
  line-height: 0.92;
}

.zch-team-profile__roster .zc-roster-intro p:last-child {
  max-width: 720px;
  margin-bottom: 0;
}

.zch-team-profile__roster .zc-roster-intro > .text-link {
  display: none;
}

.zch-team-profile__roster .zc-roster-grid {
  display: grid;
  overflow: visible;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.zch-team-profile__roster .zc-player-card {
  min-width: 0;
  min-height: 0;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  border-left: 0;
  border-right: 1px solid var(--zc-line);
  box-shadow: none;
  transform: none;
}

.zch-team-profile__roster .zc-player-card:last-child {
  border-right: 0;
}

.zch-team-profile__roster .zc-player-card__body {
  padding: 0.85rem;
}

.zch-team-profile__roster .zc-player-card__handle {
  margin-top: 3rem;
  font-size: clamp(1.25rem, 2vw, 1.8rem);
}

.zch-team-profile__roster .zc-player-card__name,
.zch-team-profile__roster .zc-player-card__role {
  font-size: 0.55rem;
}

@media (max-width: 700px) {
  .zch-team-profile__roster .zc-roster-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .zch-team-profile__roster .zc-player-card:nth-child(2n) {
    border-right: 0;
  }
}

/* Reuse the crest portion of the official logo lockup for the club-side match
 * marks. The full lockup remains cached for the header; the square mark simply
 * clips the wordmark portion outside its bounds. */
body.zch-dashboard-page .zc-result-row__mark,
body.zch-dashboard-page .z-dashboard-panel--up-next .zc-snapshot__teams > .zc-team-mark:not(.zc-team-mark--opponent),
body.zch-matches-page .zc-result-row__mark,
body.zch-matches-page .zc-snapshot__teams > .zc-team-mark:not(.zc-team-mark--opponent) {
  overflow: hidden;
  color: transparent !important;
  background-color: transparent !important;
  background-image: url("../images/zomblers-official-logo.png?v=20260802");
  background-position: left center;
  background-size: auto 95%;
  background-repeat: no-repeat;
  clip-path: none;
  font-size: 0 !important;
}

@media (min-width: 1241px) {
  body.zch-dashboard-page .z-home-dashboard {
    display: grid !important;
    grid-template-rows: minmax(0, 37.7fr) minmax(0, 43.3fr) minmax(0, 19fr) !important;
  }

  body.zch-dashboard-page .z-dashboard-grid--top {
    grid-template-columns: minmax(0, 53%) minmax(0, 19.5%) minmax(0, 27.5%) !important;
  }

  body.zch-dashboard-page .z-dashboard-grid--middle {
    grid-template-columns: minmax(0, 41.5%) minmax(0, 58.5%) !important;
  }

  body.zch-dashboard-page .z-dashboard-stack--club {
    display: grid !important;
    min-width: 0;
    min-height: 0;
    height: 100%;
    grid-template-rows: minmax(0, 61.2%) minmax(0, 38.8%);
  }

  body.zch-dashboard-page .z-dashboard-stack--club > .z-dashboard-panel {
    min-width: 0;
    min-height: 0;
    height: 100%;
  }

  body.zch-dashboard-page .z-dashboard-panel--join {
    background-position: center !important;
    background-size: cover !important;
  }

  body.zch-dashboard-page .z-dashboard-panel--partners .zc-sponsor-grid {
    display: flex !important;
    width: 100%;
    align-items: stretch;
  }

  body.zch-dashboard-page .z-dashboard-panel--partners .zc-sponsor {
    min-width: 0;
    padding-right: clamp(0.65rem, 1.2vw, 1rem);
    padding-left: clamp(0.65rem, 1.2vw, 1rem);
    flex: 1 1 0;
  }

  body.zch-dashboard-page .z-dashboard-panel--partners .zc-sponsor img {
    width: auto;
    max-width: 100%;
    max-height: 42px;
    object-fit: contain;
  }

  body.zch-dashboard-page .z-dashboard-grid--closing {
    grid-template-columns: minmax(0, 35%) minmax(0, 30%) minmax(0, 35%) !important;
  }

  body.zch-dashboard-page .z-dashboard-grid > * {
    min-width: 0;
  }

  body.zch-dashboard-page .z-dashboard-panel--join .zc-community .wp-block-button__link {
    top: auto !important;
    right: 1rem !important;
    bottom: 0.7rem !important;
    left: auto !important;
    display: inline-flex;
    width: max-content !important;
    height: 28px !important;
    max-height: 28px;
    min-height: 28px !important;
    padding: 0.42rem 0.68rem !important;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    border-radius: 0 !important;
    clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%) !important;
    font-size: 0.46rem !important;
    line-height: 1 !important;
  }
}

@media (min-width: 1241px) and (max-height: 1100px) {
  body.zch-dashboard-page .z-home-dashboard {
    grid-template-rows: minmax(0, 35fr) minmax(0, 48fr) minmax(0, 17fr) !important;
  }

  body.zch-dashboard-page .z-dashboard-stack--club {
    grid-template-rows: minmax(0, 61%) minmax(0, 39%);
  }
}

@media (min-width: 1241px) and (max-height: 850px) {
  body.zch-dashboard-page .z-home-dashboard {
    grid-template-rows: minmax(0, 34.5fr) minmax(0, 44.5fr) minmax(0, 21fr) !important;
  }

  body.zch-dashboard-page .z-dashboard-stack--club {
    grid-template-rows: minmax(0, 57.3%) minmax(0, 42.7%);
  }
}

@media (max-width: 1240px) {
  body.zch-dashboard-page .z-home-dashboard {
    display: block !important;
    height: auto !important;
  }

  body.zch-dashboard-page .z-dashboard-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  body.zch-dashboard-page .z-dashboard-stack--club {
    display: contents !important;
  }

  body.zch-dashboard-page .z-dashboard-panel--join .zc-community .wp-block-button__link {
    top: auto !important;
    left: auto !important;
    display: inline-flex;
    width: max-content !important;
    height: 40px !important;
    max-height: 40px;
    min-height: 40px !important;
    align-items: center;
    justify-content: center;
    border-radius: 0 !important;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%) !important;
    line-height: 1 !important;
  }
}
.archive-hero > *,
.single-hero > * { width: min(1120px, calc(100% - 2rem)); margin-right: auto; margin-left: auto; }
.archive-hero h1,
.single-hero h1 { max-width: 1080px; }

.zch-card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; padding-top: 2rem; padding-bottom: 4rem; }
.zch-card { display: flex; min-width: 0; min-height: 100%; padding: 1.25rem; flex-direction: column; border: 1px solid var(--zc-line); background: var(--zc-charcoal); }
.zch-card__image { display: block; margin: -1.25rem -1.25rem 1rem; aspect-ratio: 16 / 9; overflow: hidden; }
.zch-card__image img { width: 100%; height: 100%; object-fit: cover; }
.zch-card h2 { margin: .45rem 0; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.zch-card p { color: var(--zc-steel); }
.zch-card .text-link { margin-top: auto; }

.article-shell { padding-top: clamp(2rem, 5vw, 5rem); padding-bottom: clamp(4rem, 8vw, 8rem); }
.article-shell__content { max-width: 820px; margin: 0 auto; }
.article-shell__content > * { max-width: 100%; }
.article-shell__featured { width: 100%; margin-bottom: 2rem; }
.article-shell__featured img { width: 100%; height: auto; }
.single-hero__meta { display: flex; gap: 1rem; color: var(--zc-steel); }

.zch-pagination { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 4rem; }
.zch-pagination ul { display: flex; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.zch-pagination a,
.zch-pagination span { display: grid; min-width: 42px; min-height: 42px; padding: .5rem; place-items: center; border: 1px solid var(--zc-line); color: var(--zc-bone); text-decoration: none; }
.zch-pagination .current { border-color: var(--zc-toxic); color: var(--zc-toxic); }

.site-footer__main,
.site-footer__legal { gap: 1.5rem; }
.footer-nav a { color: var(--zc-bone); font-size: .75rem; text-decoration: none; }
.site-footer__legal { border-top: 1px solid var(--zc-line); }
.site-footer__legal p { margin: 0; }

.zch-search-form { display: flex; max-width: 720px; gap: .5rem; }
.zch-search-form label { flex: 1; }
.zch-search-form input { width: 100%; min-height: 48px; padding: .75rem 1rem; border: 1px solid var(--zc-line); background: var(--zc-charcoal); color: var(--zc-bone); }

@media (max-width: 1180px) {
  .brand-lockup__text { display: none; }
  .primary-nav a { font-size: .62rem; }
}

@media (max-width: 900px) {
  .site-header__inner { min-height: 68px; }
  .zch-menu-toggle { display: grid; place-items: center; }
  .primary-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 1rem; border-bottom: 1px solid var(--zc-line); background: rgb(1 7 10 / 98%); }
  .primary-nav.is-open { display: block; }
  .primary-nav__list,
  .primary-nav .menu { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { display: block; padding: .85rem 1rem; font-size: .78rem; }
  .primary-nav li:hover::after,
  .primary-nav li.current-menu-item::after { display: none; }
  .header-actions .zch-join-button { display: none; }
  .zch-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__main { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 600px) {
  .alignwide,
  .zch-shell { width: calc(100% - 2rem); }
  .zch-card-grid { grid-template-columns: 1fr; }
  .site-footer__legal { align-items: flex-start; flex-direction: column; }
  .footer-nav__list,
  .footer-nav .menu { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
