/* The Verifier 2026: menus (inc/menus.php). */

/* ================= Desktop mega menu ================= */
.tvh--desktop { position: relative; }
.tvh-nav a.is-open { color: var(--tv-text); font-weight: 800; border-bottom-color: var(--tv-cyan); }

.tvmega {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60;
  background: var(--tv-surface); border-bottom: 1px solid var(--tv-line);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
  font-family: var(--tv-font); color: var(--tv-text);
}
.tvmega[hidden] { display: none; }
/* The page behind is dimmed (the dim doesn't catch the mouse, so leaving the panel closes it) */
.tvmega::after {
  content: ""; position: absolute; top: 100%; left: 0; right: 0; height: 100vh;
  background: rgba(7, 12, 38, 0.55); pointer-events: none;
}
.tvmega__in {
  width: min(1200px, calc(100% - 40px)); margin: 0 auto; padding: 36px 0 40px; box-sizing: border-box;
  display: grid; grid-template-columns: 220px minmax(0, 1fr) 300px; gap: 40px;
}
.tvmega--nohub .tvmega__in { grid-template-columns: 220px minmax(0, 1fr); }
.tvmega a { text-decoration: none !important; }
.tvmega__k { display: block; font-size: 13px; font-weight: 700; color: var(--tv-muted); }

.tvmega__topics { display: flex; flex-direction: column; }
.tvmega__topics .tvmega__k { margin-bottom: 6px; }
.tvmega__topic {
  min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-bottom: 1px solid var(--tv-line); color: var(--tv-text) !important; font-size: 17px; font-weight: 600;
}
.tvmega__topic svg { flex-shrink: 0; color: var(--tv-muted); }
.tvmega__topic:hover, .tvmega__topic:focus-visible { color: var(--tv-accent-text) !important; }
.tvmega__topic:hover svg { color: var(--tv-accent-text); }
.tvmega__all {
  align-self: flex-start; margin-top: 12px; min-height: 44px; display: inline-flex; align-items: center;
  font-size: 15px; font-weight: 700; color: var(--tv-link) !important;
}

.tvmega__latest { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tvmega__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.tvmega__card { display: flex; flex-direction: column; gap: 10px; color: var(--tv-text) !important; }
.tvmega__img { display: block; width: 100%; height: 130px; object-fit: cover; background: var(--tv-surface); }
.tvmega__title { font-size: 16px; line-height: 1.3; font-weight: 700; }
.tvmega__card:hover .tvmega__title { color: var(--tv-accent-text); }
.tvmega__date { font-size: 13px; color: var(--tv-muted); }

.tvmega__hub {
  align-self: start; padding: 24px; display: flex; flex-direction: column; gap: 12px;
  background: var(--tv-lavender); color: var(--tv-navy) !important;
}
.tvmega__hub-i { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: var(--tv-navy); }
.tvmega__hub-k { font-size: 13px; font-weight: 700; }
.tvmega__hub-t { font-size: 24px; line-height: 1.15; font-weight: 700; }
.tvmega__hub-s { font-size: 15px; line-height: 1.45; font-weight: 500; }
.tvmega__hub:hover .tvmega__hub-t { text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1264px) {
  .tvmega__in { grid-template-columns: 200px minmax(0, 1fr) 260px; gap: 28px; }
  .tvmega--nohub .tvmega__in { grid-template-columns: 200px minmax(0, 1fr); }
  .tvmega__img { height: 110px; }
  .tvmega__hub-t { font-size: 21px; }
}

/* ================= Mobile full-screen menu ================= */
body.tvmm-on { overflow: hidden; }
.tvmm {
  position: fixed; inset: 0; z-index: 100002;
  display: flex; flex-direction: column;
  background: var(--tv-bg); color: var(--tv-text); font-family: var(--tv-font);
}
.tvmm[hidden] { display: none; }
/* Slides in from the right edge (RTL: where the menu button is) and back out */
.tvmm { transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.tvmm.is-open { transform: none; }
@media (prefers-reduced-motion: reduce) { .tvmm { transition: none; } }
.tvmm a { text-decoration: none !important; }
.tvmm__bar {
  height: 58px; flex-shrink: 0; padding: 0 8px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--tv-line);
}
.tvmm__spacer { width: 44px; }
.tvmm__body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 14px 16px 20px; display: flex; flex-direction: column;
}

.tvmm__search {
  min-height: 48px; display: flex; align-items: center; gap: 10px; padding: 0 14px; margin: 0;
  background: var(--tv-surface); border: 1px solid var(--tv-line); color: var(--tv-muted);
}
.tvmm__search svg { width: 18px; height: 18px; flex-shrink: 0; }
.tvmm__search input {
  flex: 1; min-width: 0; height: 46px; padding: 0 !important; border: 0 !important; border-radius: 0; background: none !important; box-shadow: none !important;
  color: var(--tv-text); font: 400 16px var(--tv-font);
}
.tvmm__search input::placeholder { color: var(--tv-muted); opacity: 1; }
.tvmm__search input:focus { outline: none; }
.tvmm__search:focus-within { outline: 2px solid var(--tv-cyan); outline-offset: -2px; }

.tvmm__nav { margin-top: 10px; display: flex; flex-direction: column; }
.tvmm__nav a {
  min-height: 52px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--tv-line); color: var(--tv-text) !important;
}
.tvmm__nav a span { font-size: 22px; font-weight: 700; }
.tvmm__nav a svg { width: 18px; height: 18px; color: var(--tv-muted); }
.tvmm__nav a[aria-current] span { color: var(--tv-accent-text); }

.tvmm__k { margin: 22px 0 4px !important; font: 700 13px var(--tv-font) !important; color: var(--tv-muted) !important; }
.tvmm__k--mode { margin: 20px 0 8px !important; }
/* Topics: the biggest ones as chips, then the way to all of them */
.tvmm__topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tvmm__topics a { min-height: 36px; padding: 0 12px; display: inline-flex; align-items: center; background: var(--tv-chip-bg); color: var(--tv-text) !important; font: 700 14px var(--tv-font); }
.tvmm__all { min-height: 48px; margin-top: 6px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--tv-line); color: var(--tv-accent-text) !important; font: 700 16px var(--tv-font); }
.tvmm__all svg { transform: none; }
.tvmm__sec {
  min-height: 44px; display: flex; align-items: center; gap: 10px;
  color: var(--tv-text) !important; font-size: 17px; font-weight: 600;
}
.tvmm__dot { width: 10px; height: 10px; flex-shrink: 0; }
.tvmm__dot.is-purple { background: var(--tv-purple); }
.tvmm__dot.is-cyan { background: var(--tv-cyan); border-radius: 50%; }
.tvmm__dot.is-lav { background: var(--tv-lavender); }

.tvmm__mode { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--tv-line); }
.tvmm__mode button {
  min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 4px;
  border: 0; border-radius: 0; background: transparent; color: var(--tv-text); cursor: pointer;
  font: 700 14px var(--tv-font);
}
.tvmm__mode button[aria-checked="true"] { background: var(--tv-cyan); color: var(--tv-navy); }
.tvmm__sw { width: 14px; height: 14px; flex-shrink: 0; box-sizing: border-box; border-radius: 50%; border: 2px solid var(--tv-muted); }
.tvmm__sw--system { background: linear-gradient(90deg, var(--tv-muted) 50%, transparent 50%); }
.tvmm__sw--dark { background: var(--tv-muted); }
.tvmm__mode button[aria-checked="true"] .tvmm__sw { border-color: var(--tv-navy); }
.tvmm__mode button[aria-checked="true"] .tvmm__sw--system { background: linear-gradient(90deg, var(--tv-navy) 50%, transparent 50%); }
.tvmm__mode button[aria-checked="true"] .tvmm__sw--dark { background: var(--tv-navy); }

.tvmm__foot { margin-top: auto; padding-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.tvmm__app-t { font-size: 15px; font-weight: 700; }
.tvmm__stores { display: flex; gap: 10px; }
.tvmm__store {
  flex: 1; min-height: 46px; box-sizing: border-box; display: flex; align-items: center; justify-content: center;
  background: var(--tv-cyan); color: var(--tv-navy) !important; font-size: 15px; font-weight: 700;
}
.tvmm__store--line { background: none; border: 2px solid var(--tv-cyan); color: var(--tv-text) !important; }
.tvmm__links { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; }
.tvmm__links a { min-height: 32px; display: inline-flex; align-items: center; color: var(--tv-muted) !important; }
.tvmm__links a.is-tg { color: var(--tv-link) !important; font-weight: 600; }

/* Tablets: the same menu, in a comfortable column */
@media (min-width: 768px) {
  .tvmm__body { width: 100%; max-width: 560px; margin: 0 auto; box-sizing: border-box; padding-top: 24px; }
}

/* While a panel is open, only its category is marked */
.tvh-nav:has(.is-open) a.is-current:not(.is-open) { color: var(--tv-muted); font-weight: 500; border-bottom-color: transparent; }

/* Tablets: the menu fills the screen like on phones (no centred column), and no visible scrollbar */
.tvmm__body { scrollbar-width: none; }
.tvmm__body::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
  .tvmm__body { max-width: none; margin: 0; padding: 20px 32px 28px; }
  .tvmm__bar { padding: 0 20px; }
}

/* Lock the page behind the open menu, so its scrollbar does not show beside the menu */
html:has(body.tvmm-on) { overflow: hidden; }

/* ---------- Desktop display menu (header moon/sun button) ---------- */
.tvtheme { position: relative; display: inline-flex; }
.tvtheme__menu {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 70; width: 240px; padding: 8px; box-sizing: border-box;
  display: flex; flex-direction: column; background: var(--tv-panel); border: 1px solid var(--tv-line); box-shadow: 0 16px 40px rgba(0, 0, 0, .3);
}
.tvtheme__menu[hidden] { display: none; }
.tvtheme__k { display: block; padding: 8px 12px 6px; font-size: 13px; font-weight: 700; color: var(--tv-muted); }
.tvtheme__menu button { width: 100%; min-height: 48px; padding: 0 12px; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 0; cursor: pointer;
  background: transparent; color: var(--tv-text); font: 700 16px/1 var(--tv-font); text-align: right; }
.tvtheme__menu button:hover { background: var(--tv-line); }
.tvtheme__menu button[aria-checked="true"] { background: var(--tv-cyan); color: #0A1030; }
.tvtheme__menu button:focus-visible { outline: 3px solid var(--tv-cyan); outline-offset: -3px; }
.tvtheme__menu button[aria-checked="true"]:focus-visible { outline-color: #0A1030; }
.tvtheme__ic { width: 16px; height: 16px; flex-shrink: 0; box-sizing: border-box; border-radius: 50%; border: 2px solid currentColor; }
.tvtheme__ic--dark { background: currentColor; }
.tvtheme__ic--system { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.tvtheme__l { flex: 1; }
.tvtheme__v { font-weight: 800; visibility: hidden; }
.tvtheme__menu button[aria-checked="true"] .tvtheme__v { visibility: visible; }
