/* Styles owned by the shell agent. Loaded after style.css, so rules here win. */

/* ===== Layout sizes other areas can use =====
   The desktop layout starts at 1024px wide. */
:root {
  --desk-head-h: 108px;   /* desktop header height (top row 60px + menu row 48px) */
  --desk-left-w: 240px;   /* left sports menu */
  --desk-right-w: 340px;  /* right column for the bet slip */
  --desk-centre-max: 860px;
}

/* The logo is a button (it takes you home), so remove the button look */
.topbar .logo { background: none; border: none; padding: 0; color: #fff; display: inline-flex; align-items: center; }
/* The ZennaBet360 emblem beside the name; sized from the name so it follows every breakpoint */
.topbar .logo-mark { width: 1.45em; height: 1.45em; margin-right: 0.2em; flex-shrink: 0; filter: drop-shadow(0 2px 6px rgba(124, 58, 237, 0.45)); }

/* Desktop-only parts are hidden on phones and tablets */
.desk-nav, .desk-search, .head-me, #desk-left, #desk-right { display: none; }

/* ===== Home banner carousel ===== */
.hero { position: relative; background: var(--card); padding: 12px 16px 0; }
.hero-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: 10px;
}
.hero-track::-webkit-scrollbar { display: none; }
.hero-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 136px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border: none;
  color: #fff;
  text-align: left;
}
.hero-slide:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.hero-copy { display: grid; gap: 4px; min-width: 0; }
.hero-tag {
  justify-self: start;
  background: var(--gold);
  color: #111;
  border-radius: 3px;
  padding: 1px 7px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.hero-title {
  font-family: "Barlow Condensed", "Arial Narrow", sans-serif;
  font-style: italic;
  font-size: 1.6rem;
  line-height: 1.05;
}
.hero-text { font-size: 0.85rem; opacity: 0.9; }
.hero-cta { font-weight: 700; color: var(--gold); font-size: 0.9rem; }
.hero-art {
  flex-shrink: 0;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.12);
}
.hero-art .icon { width: 44px; height: 44px; color: var(--gold); }
.hero-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0 2px; }
.hero-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: var(--line);
  transition: width 0.2s ease;
}
.hero-dot.active { width: 20px; background: var(--green); }
.hero-arrow { display: none; }

/* Quick links: one row of five on phones (4 links + More); More opens a second row */
.quick-links { grid-template-columns: repeat(5, 1fr); row-gap: 2px; }
.quick-link { text-align: center; }
.quick-links:not(.open) .ql-extra { display: none; }
.quick-links.open .ql-more { order: 1; }   /* "Less" goes to the end of the second row */

/* ===== Footer ===== */
.site-foot {
  background: var(--ink-deep);
  color: rgba(255, 255, 255, 0.85);
  padding: 20px 16px 80px;   /* extra room at the bottom so the bet slip button does not cover the text */
  margin-top: 16px;
}
/* On phones the footer only belongs on the home page */
html[data-view]:not([data-view="home"]) .site-foot { display: none; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.foot-col { display: grid; gap: 6px; align-content: start; }
.foot-col h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gold); margin-bottom: 2px; }
.foot-link {
  background: none;
  border: none;
  padding: 2px 0;
  color: rgba(255, 255, 255, 0.85);
  text-align: left;
  font-size: 0.85rem;
}
.foot-link:hover { color: #fff; text-decoration: underline; }
.foot-rg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.foot-rg p { margin: 0; font-size: 0.82rem; line-height: 1.45; }
.age-badge {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.foot-copy { margin: 14px 0 0; font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 440px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 1.4rem; }
  .hero-art { width: 60px; height: 60px; }
  .hero-art .icon { width: 34px; height: 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { scroll-behavior: auto; }
  .hero-dot { transition: none; }
}

/* =====================================================
   DESKTOP (1024px and wider): full-width header with menu tabs,
   then three columns: sports menu | page | bet slip
   ===================================================== */
@media (min-width: 1024px) {
  .app {
    max-width: none;
    padding-bottom: 0;
    background: var(--bg);
    display: grid;
    grid-template-columns:
      minmax(0, 1fr) var(--desk-left-w) minmax(0, var(--desk-centre-max)) var(--desk-right-w) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "head head head head head"
      ".    left main right .  "
      "foot foot foot foot foot";
    column-gap: 16px;
    align-items: start;
  }
  .theme-dark .app { background: var(--bg); }

  /* Header: always shown on desktop, even on pages that hide it on phones */
  .topbar, #topbar[hidden] {
    grid-area: head;
    display: grid !important;
    grid-template-columns: auto minmax(180px, 320px) 1fr auto;
    grid-template-rows: 60px 48px;
    grid-template-areas:
      "logo search . actions"
      "nav  nav    nav nav";
    column-gap: 24px;
    height: var(--desk-head-h);
    top: 0;
    padding: 0 max(24px, calc((100% - 1400px) / 2));
    border-bottom: none;
    align-content: stretch;
    row-gap: 0;
    /* two tone: sea blue top row, deep blue menu row, yellow line under it */
    background: linear-gradient(var(--ink) 0 60px, var(--ink-deep) 60px calc(100% - 2px), var(--gold) calc(100% - 2px));
  }
  .topbar .logo { grid-area: logo; align-self: center; font-size: 1.9rem; }
  .top-actions { grid-area: actions; align-self: center; }
  #search-btn { display: none; }
  .head-me { display: flex; }

  .desk-search {
    grid-area: search;
    align-self: center;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 38px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
  }
  .desk-search:focus-within { background: rgba(255, 255, 255, 0.24); outline: 2px solid var(--gold); }
  #desk-search {
    flex: 1;
    background: transparent;
    min-width: 0;
    border: none;
    background: none;
    color: #fff;
    font: inherit;
  }
  #desk-search::placeholder { color: rgba(255, 255, 255, 0.75); }
  #desk-search:focus-visible { outline: none; }

  .desk-nav { grid-area: nav; align-self: stretch; display: flex; align-items: stretch; gap: 4px; }
  .desk-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.78);
    font-weight: 700;
    font-size: 0.95rem;
    white-space: nowrap;
  }
  .desk-tab:hover { color: #fff; background: rgba(255, 255, 255, 0.07); }
  .desk-tab.active { color: #fff; border-bottom-color: var(--gold); }
  .desk-tab:focus-visible { outline-offset: -3px; }

  /* Left sports menu (filled by the sports area) */
  #desk-left {
    grid-area: left;
    display: block;
    position: sticky;
    top: var(--desk-head-h);
    max-height: calc(100vh - var(--desk-head-h));
    overflow-y: auto;
    padding-block: 16px;
  }
  /* Centre page */
  main { grid-area: main; min-width: 0; padding-block: 16px; }
  /* Right column: the bet slip area docks the slip here */
  #desk-right {
    grid-area: right;
    display: block;
    position: sticky;
    top: var(--desk-head-h);
    max-height: calc(100vh - var(--desk-head-h));
    padding-block: 16px;
  }

  /* The top menu replaces the bottom menu */
  .bottom-nav { display: none; }

  /* Page bars that stick to the top now stick under the header */
  .mp-top { top: var(--desk-head-h); }

  /* Home page cards get rounded corners and space between them */
  #view-home > .hero,
  #view-home > .promos,
  #view-home > .quick-links,
  #view-home > .featured,
  #view-home > .live,
  #view-home > .list-card { border-radius: 8px; overflow: hidden; }
  #view-home > .promos, #view-home > .quick-links { margin-top: 12px; }
  #view-home > .featured, #view-home > .live, #view-home > .list-card { margin-bottom: 16px; }
  .quick-links { padding: 10px 8px; border-bottom: none; }
  .categories { padding-inline: 0; }

  /* Banner with arrow buttons */
  .hero { padding: 12px; }
  .hero-slide { min-height: 200px; padding: 24px 28px; }
  .hero-arrow {
    display: grid;
    place-items: center;
    position: absolute;
    top: 94px;            /* middle of the 200px slide, below the 12px padding */
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s ease;
  }
  .hero-arrow.prev { left: 20px; }
  .hero-arrow.next { right: 20px; }
  .hero:hover .hero-arrow, .hero-arrow:focus-visible { opacity: 1; }

  /* Full-width footer under all three columns, on every page */
  .site-foot, html[data-view]:not([data-view="home"]) .site-foot {
    grid-area: foot;
    position: relative;
    z-index: 1;          /* paints over the sticky side columns when you reach the bottom */
    display: block;
    margin-top: 24px;
    padding: 28px max(24px, calc((100% - 1400px) / 2)) 20px;
  }
  .foot-cols { grid-template-columns: repeat(3, minmax(0, 220px)); gap: 32px; }
}

/* Wide screens: the centre column has room for a bigger banner and one row of quick links */
@media (min-width: 1280px) {
  /* Room for every link in one row: no More button */
  .quick-links { grid-template-columns: repeat(7, 1fr); }
  .quick-links .ql-extra { display: flex; }
  .quick-links .ql-more { display: none; }
  .hero-slide { padding: 28px 36px; }
  .hero-title { font-size: 2.3rem; }
  .hero-text { font-size: 1rem; }
  .hero-art { width: 120px; height: 120px; }
  .hero-art .icon { width: 64px; height: 64px; }
}

@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .hero-arrow { transition: none; }
}

/* ===== Phones and tablets: bigger tap area on the banner dots (same look) ===== */
@media (max-width: 1023px) {
  .hero-dots { gap: 12px; padding-block: 4px 0; }
  .hero-dot { position: relative; }
  .hero-dot::after { content: ""; position: absolute; inset: -14px -6px; }
}
/* Footer links: a thumb-sized row each on phones */
@media (max-width: 1023px) {
  .foot-col { gap: 0; }
  .foot-link { padding-block: 10px; }
}
