/**
 * @file chrome.css
 * Broadcast site chrome: masthead, main menu, live score bug, page titles,
 * breadcrumb, section slates, chips and timecodes, footer.
 *
 * Reference: docs/design/home/option-1.html (.masthead, .nav, .livebug,
 * .slate, .chip, .tc, .foot). The GG Press logo image stays in the masthead;
 * the mockup's text-only lockup is not used.
 */

/* ---------- Shared Broadcast pieces ---------- */

/* UI label: condensed, uppercase, tracked. */
.ggpress-label,
.ggpress-nav__link,
.ggpress-slate__more,
.ggpress-chip,
.ggpress-tc,
.ggpress-card__kicker,
.ggpress-card__tag,
.ggpress-footer__social a,
.ggpress-twitch-badge {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: var(--tracking-label);
  line-height: 1;
  text-transform: uppercase;
}

/* Angled gold / cyan chip (competition, kind). */
.ggpress-chip {
  display: inline-block;
  padding: 6px 12px 5px 9px;
  font-size: 0.8125rem;
  font-weight: 800;
  clip-path: polygon(0 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  background-color: var(--gg-gold);
  color: var(--gg-navy-deep);
}

.ggpress-chip--cyan {
  background-color: var(--gg-cyan);
  color: var(--gg-navy-deep);
}

.ggpress-chip--white {
  background-color: var(--gg-white);
  color: var(--gg-navy-deep);
}

/* Timecode: duration badge with a play marker and a gold left bar. */
.ggpress-tc {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-left: 3px solid var(--gg-gold);
  background-color: rgba(1, 19, 41, 0.88);
  color: var(--gg-white);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
}

.ggpress-tc::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 7px solid currentColor;
  border-top: 4.5px solid transparent;
  border-bottom: 4.5px solid transparent;
}

/* ---------- Masthead ---------- */

.ggpress-masthead {
  position: relative;
  z-index: 500;
  background: linear-gradient(180deg, var(--gg-navy-deep), #011a35);
  border-bottom: 3px solid var(--gg-gold);
}

.ggpress-masthead__wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 24px;
  min-height: 72px;
}

.ggpress-masthead__logo {
  display: flex;
  align-items: center;
  padding: 10px 0;
}

/* The brand mark: logo.png (shield + mascot), 48px tall in the masthead. */
.ggpress-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.ggpress-brand .branding {
  height: 44px;
}

.ggpress-brand .branding img {
  display: block;
  width: auto;
  height: 100%;
}

.ggpress-brand__name {
  font-family: var(--font-wordmark);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--gg-gold);
}

.ggpress-masthead__nav {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
}

.ggpress-masthead__nav--left {
  justify-content: flex-start;
}

.ggpress-masthead__nav--center {
  justify-content: center;
}

.ggpress-masthead__nav--right {
  justify-content: flex-end;
}

.ggpress-masthead__nav nav {
  min-width: 0;
}

.ggpress-masthead__links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ggpress-masthead__links:empty {
  display: none;
}

/* Main menu. */
.ggpress-nav {
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ggpress-nav__item {
  margin: 0;
}

.ggpress-nav__link {
  display: block;
  padding: 10px 12px;
  border-bottom: 3px solid transparent;
  font-size: 1.0625rem;
  letter-spacing: 0.08em;
  color: #e6edf6; /* 13.57:1 on card */
  text-decoration: none;
  white-space: nowrap;
}

.ggpress-nav__link:hover,
.ggpress-nav__link:focus-visible {
  color: var(--gg-gold);
  border-bottom-color: var(--gg-gold);
}

.ggpress-nav__link[aria-current] {
  color: var(--gg-gold);
}

/* Live score bug (ggpress_twitch badge; structure in the module's CSS). */
.ggpress-twitch-badge {
  font-size: 0.9375rem;
  font-weight: 800;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.ggpress-twitch-badge__on {
  background-color: var(--live);
  color: var(--live-foreground);
}

.ggpress-twitch-badge__channel {
  background-color: var(--gg-gold);
  color: var(--gg-navy-deep);
  font-variant-numeric: tabular-nums;
}

.ggpress-twitch-badge:hover .ggpress-twitch-badge__channel,
.ggpress-twitch-badge:focus-visible .ggpress-twitch-badge__channel {
  background-color: var(--gg-white);
}

@media (max-width: 899px) {
  .ggpress-masthead__wrap {
    gap: 0 12px;
    padding-top: 2px;
  }

  .ggpress-masthead__links {
    margin-left: auto;
  }

  .ggpress-brand .branding {
    height: 40px;
  }

  /* The menu becomes a scrollable row under the logo and the badge. */
  .ggpress-masthead__nav {
    order: 3;
    width: calc(100% + 2rem);
    margin: 0 -1rem;
    padding: 0 1rem;
    overflow-x: auto;
    scrollbar-width: none;
    border-top: 1px solid var(--border);
    justify-content: flex-start;
  }

  .ggpress-masthead__nav::-webkit-scrollbar {
    display: none;
  }

  .ggpress-nav {
    gap: 0;
  }

  .ggpress-nav__link {
    padding: 13px 10px 12px;
    font-size: 1rem;
  }
}

/* ---------- Page chrome of non-Canvas pages ---------- */

/* The page template's section has no top padding (the home page's strips
   sit flush under the masthead), so the breadcrumb and the title bring it. */
.ggpress-page-title {
  position: relative;
  margin: 1rem 0 1.75rem;
  padding-bottom: 0.75rem;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
}

.ggpress-page-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 4px;
  background-color: var(--gg-gold);
}

/* Breadcrumb (templates/navigation/breadcrumb.html.twig). */
nav[aria-label="breadcrumb"] {
  margin-top: 1rem;
}

nav[aria-label="breadcrumb"] ol {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

nav[aria-label="breadcrumb"] a {
  color: var(--muted-foreground);
}

nav[aria-label="breadcrumb"] a:hover {
  color: var(--gg-gold);
}

/* ---------- Section slate (Views block titles) ---------- */

.ggpress-slate {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.ggpress-slate__title {
  margin: 0;
  padding: 9px 22px 8px 16px;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  line-height: 1;
  white-space: nowrap;
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  background-color: var(--gg-gold);
  color: var(--gg-navy-deep);
}

.ggpress-slate__rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--gg-gold), var(--border) 30%, var(--border));
}

.ggpress-slate__more {
  font-size: 0.9375rem;
  color: var(--gg-cyan);
  text-decoration: none;
  white-space: nowrap;
}

.ggpress-slate__more:hover,
.ggpress-slate__more:focus-visible {
  color: var(--gg-white);
}

@media (min-width: 768px) {
  .ggpress-slate__title {
    font-size: 1.875rem;
  }
}

@media (max-width: 480px) {
  .ggpress-slate__title {
    padding: 8px 18px 7px 12px;
    font-size: 1.3125rem;
    white-space: normal;
  }
}

/* ---------- Footer ---------- */

.ggpress-footer {
  margin-top: 72px;
  border-top: 3px solid var(--gg-gold);
  background-color: var(--surface-deep);
  color: var(--foreground);
}

.ggpress-footer__top {
  display: grid;
  gap: 28px;
  padding: 40px 0 32px;
}

.ggpress-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ggpress-footer__brand .branding {
  height: 48px;
}

.ggpress-footer__brand .branding img {
  display: block;
  width: auto;
  height: 100%;
}

.ggpress-footer__brand p {
  margin: 0;
  max-width: 44ch;
  color: var(--muted-foreground); /* 11.58:1 on surface-deep */
}

/* Social buttons (ggpress:button, secondary-inverted) as outlined chips. */
.ggpress-footer__social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
}

.ggpress-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--foreground);
  font-size: 0.9375rem;
}

.ggpress-footer__social a:hover,
.ggpress-footer__social a:focus-visible {
  border-color: var(--gg-gold);
  background: transparent;
  color: var(--gg-gold);
}

.ggpress-footer__social a span {
  transform: none !important;
}

.ggpress-footer__social svg {
  width: 18px;
  height: 18px;
}

.ggpress-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
  padding: 18px 0 28px;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.ggpress-footer__links .menu {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-body);
}

.ggpress-footer__links .menu__item {
  margin: 0;
}

.ggpress-footer__links a {
  color: #dbe5f2; /* 15.43:1 on surface-deep */
  text-decoration: none;
}

.ggpress-footer__links a:hover,
.ggpress-footer__links a:focus-visible {
  color: var(--gg-gold);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ggpress-footer__copy p {
  margin: 0;
}

@media (min-width: 900px) {
  .ggpress-footer__top {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
