/* ==========================================================
   SHARED STYLES — Tân Võ Lâm HTML Export
   ========================================================== */

/* ----------------------------------------------------------
   Font: LATO-BLACK (custom game font)
   ---------------------------------------------------------- */
@font-face {
  font-family: "LATO-BLACK";
  src: url("./assets/fonts/LATO-BLACK.TTF") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ----------------------------------------------------------
   CSS Variables
   ---------------------------------------------------------- */
:root {
  --color-primary: #ce2c24;
  --color-gold: #ffc628;
  --color-gold-2: #dca857;
  --color-dark: #010617;
  --color-cream: #fff6cc;
  --color-muted: #9da2ae;
}

/* ----------------------------------------------------------
   Reset & Base
   ---------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}
body {
  background: #fff;
}
a {
  text-decoration: none;
  color: inherit;
}
button {
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
img {
  display: block;
  max-width: none;
}

/* ----------------------------------------------------------
   Responsive Layout Switching
   (mirrors React ResponsiveLayout + useIsMobile hook)
   ---------------------------------------------------------- */
.layout-desktop {
  display: block;
}
.layout-mobile {
  display: none;
}

@media (max-width: 767px) {
  .layout-desktop {
    display: none;
  }
  .layout-mobile {
    display: block;
  }
}

/* ----------------------------------------------------------
   Sectarian Carousel — thumbnail state
   (dynamic class swap via JS; defined here so Tailwind CDN
    scanner doesn't need to see them in markup)
   ---------------------------------------------------------- */
.sect-thumb {
  opacity: 0.7;
  transition:
    opacity 0.15s,
    outline 0.15s,
    filter 0.15s;
}
.sect-thumb:hover {
  opacity: 1;
}
.sect-thumb.is-active {
  opacity: 1;
  outline: 2px solid #facc15;
  outline-offset: 1px;
  filter: brightness(1.1);
}

/* ----------------------------------------------------------
   Activities carousel — dot state
   ---------------------------------------------------------- */
.act-dot {
  height: 14px;
  border-radius: 21px;
  background: #d9d9d9;
  width: 14px;
  cursor: pointer;
  transition:
    width 0.2s,
    background 0.2s;
}
.act-dot.is-active {
  width: 62px;
  background: linear-gradient(to right, #b90000, #530000);
}

/* ----------------------------------------------------------
   Mobile activities carousel — dot state (same shape, separate class)
   ---------------------------------------------------------- */
.m-act-dot {
  height: 14px;
  border-radius: 21px;
  background: #d9d9d9;
  width: 14px;
  cursor: pointer;
  transition:
    width 0.2s,
    background 0.2s;
}
.m-act-dot.is-active {
  width: 62px;
  background: linear-gradient(to right, #b90000, #530000);
}

/* Mobile sect thumbnail state */
.m-sect-thumb {
  opacity: 0.7;
  transition:
    opacity 0.15s,
    filter 0.15s;
}
.m-sect-thumb:hover {
  opacity: 1;
}
.m-sect-thumb.is-active {
  opacity: 1;
  border-radius: 50%;
  box-shadow: 0 0 0 2px #facc15;
  filter: brightness(1.1);
}

/* ----------------------------------------------------------
   Rankings / Features — dot / page state
   ---------------------------------------------------------- */
.rank-page {
  background: var(--color-gold-2);
  color: #fff;
  border-radius: 50%;
  transition: background 0.15s;
}
.rank-page.is-active {
  background: var(--color-primary);
}

.feat-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-gold-2);
  cursor: pointer;
  transition: background 0.15s;
}
.feat-dot.is-active {
  background: var(--color-primary);
}

/* ----------------------------------------------------------
   Faction section — item state
   ---------------------------------------------------------- */
/* Lift selector buttons above the faction detail panel (z-index:1) so the
   whole list stays clickable; mirrors React's z-[3] button wrapper. */
.faction-item {
  z-index: 3;
  cursor: pointer;
}
.faction-item.is-active {
  box-shadow: 0px 0px 11.2px 0px rgba(255, 255, 255, 0.25);
}

/* ----------------------------------------------------------
   News page — card hover
   ---------------------------------------------------------- */
.news-card {
  transition: transform 0.2s;
}
.news-card:hover {
  transform: translateY(-4px);
}

/* ----------------------------------------------------------
   Rankings dropdown — active (open) button + selected option
   (Figma 419:12175 active state: white border/glow on the open
   button; the chosen option turns gold)
   ---------------------------------------------------------- */
.dropdown-btn.is-open {
  border: 1px solid #ffffff;
  box-shadow: 0 0 10px 0 #ffffff;
}
.dropdown-menu button.is-selected,
.m-dropdown-menu button.is-selected {
  color: #f8d488;
}

/* ----------------------------------------------------------
   Sticky sidebar — slide toggle
   ---------------------------------------------------------- */
.sticky-sidebar {
  transition: transform 0.3s ease;
}
.sticky-sidebar.is-hidden {
  transform: translateY(-50%) translateX(200px) !important;
}

/* ----------------------------------------------------------
   Rankings table — thin custom scrollbar (mirrors src/index.css)
   ---------------------------------------------------------- */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: #8b1a10 #f5e8c0;
}
.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
  background: #f5e8c0;
  border-radius: 3px;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: #8b1a10;
  border-radius: 3px;
}

/* ----------------------------------------------------------
   Mobile index — nav menu overlay
   (fixed, z-60, escapes canvas zoom; covers full viewport)
   ---------------------------------------------------------- */
.m-nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #0b213d;
}

/* ----------------------------------------------------------
   Mobile index — pagination active state
   (SVG src is swapped in JS; no CSS color change needed)
   ---------------------------------------------------------- */
.m-rank-page {
  cursor: pointer;
}

/* ----------------------------------------------------------
   Mobile index — dropdown active (open) state: white border + glow
   on the button, plus arrow rotation (mirrors desktop .dropdown-btn.is-open)
   ---------------------------------------------------------- */
.m-dropdown-btn.is-open {
  border: 1px solid #ffffff;
  box-shadow: 0 0 8px 0 #ffffff;
}
.m-dropdown-btn.is-open .m-dropdown-arrow {
  transform: rotate(180deg);
}
