/* Custom additions - Chakra Petch font & #6792CE Theme */


/* Local offline fallback for Chakra Petch */
@font-face {
  font-family: 'Chakra Petch';
  src: url('./ChakraPetch-Light.woff2') format('woff2');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('./ChakraPetch-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('./ChakraPetch-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('./ChakraPetch-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('./ChakraPetch-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* Map existing font family names to Chakra Petch */
@font-face {
  font-family: 'Arame';
  src: url('./ChakraPetch-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Arame';
  src: url('./ChakraPetch-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Estricta';
  src: url('./ChakraPetch-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Estricta';
  src: url('./ChakraPetch-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Purista';
  src: url('./ChakraPetch-Medium.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Purista';
  src: url('./ChakraPetch-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

:root {
  --c-blue: #6792CE !important;
  --c-blue-deep: #486b9c !important;
  --c-blue-muted: #36537c !important;
  --c-blue-dark: #1a2c47 !important;
  --accent-blue: #6792CE !important;
  --accent-green: #87b660;
  --accent-discord: #6d77f3;

  --f-display: 'Chakra Petch', system-ui, sans-serif !important;
  --f-heading: 'Chakra Petch', system-ui, sans-serif !important;
  --f-body: 'Chakra Petch', system-ui, -apple-system, sans-serif !important;
  --f-mono: 'Chakra Petch', monospace !important;

  --modal-bg: rgba(15, 17, 21, 0.95);
  --modal-border: rgba(103, 146, 206, 0.25);
}

/* Enforce Chakra Petch across all elements */
body, h1, h2, h3, h4, h5, h6, p, span, a, button, input, kbd, code, table, th, td, div {
  font-family: 'Chakra Petch', system-ui, sans-serif;
}

/* Header Background Transition: Transparent at top, dark glass background appears on scroll down */
header._header_7yzuq_1,
._header_7yzuq_1 {
  transform: none !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: background 0.35s ease, box-shadow 0.35s ease, backdrop-filter 0.35s ease !important;
}

header._header_7yzuq_1:before,
._header_7yzuq_1:before {
  opacity: 0 !important;
  transition: opacity 0.35s ease !important;
}

/* Scrolled state: dark blurred background bar appears */
header._header_7yzuq_1.is-scrolled,
._header_7yzuq_1.is-scrolled,
header._header_7yzuq_1._scrolled_7yzuq_23,
._header_7yzuq_1._scrolled_7yzuq_23 {
  background: rgba(19, 20, 20, 0.88) !important;
  box-shadow: 0 1px 0 rgba(103, 146, 206, 0.2), 0 8px 24px rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(14px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(180%) !important;
}

header._header_7yzuq_1.is-scrolled:before,
._header_7yzuq_1.is-scrolled:before,
header._header_7yzuq_1._scrolled_7yzuq_23:before,
._header_7yzuq_1._scrolled_7yzuq_23:before {
  opacity: 1 !important;
}

/* Ingame Soon Box with dotted border */
.rival-soon-box {
  width: 100%;
  min-height: 380px;
  background: rgba(18, 20, 26, 0.7);
  border: 3px dotted #6792CE;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 40px 20px;
  text-align: center;
  box-shadow: inset 0 0 50px rgba(103, 146, 206, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.rival-soon-box:hover {
  border-color: #84ace8;
  box-shadow: inset 0 0 60px rgba(103, 146, 206, 0.16), 0 0 35px rgba(103, 146, 206, 0.25);
  transform: scale(1.01);
}

.rival-soon-badge {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #6792CE;
  background: rgba(103, 146, 206, 0.15);
  border: 1px solid rgba(103, 146, 206, 0.35);
  padding: 4px 14px;
  border-radius: 4px;
}

.rival-soon-title {
  font-family: 'Chakra Petch', sans-serif;
  font-size: clamp(48px, 6vw, 72px);
  font-weight: 700;
  letter-spacing: 0.25em;
  text-indent: 0.25em;
  text-transform: uppercase;
  color: #ffffff;
  text-shadow: 0 0 35px rgba(103, 146, 206, 0.65), 0 0 10px rgba(103, 146, 206, 0.4);
}

.rival-soon-sub {
  font-family: 'Chakra Petch', sans-serif;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.05em;
  margin: 0;
}

/* Primary color highlights */
._blue_1ev4m_157 {
  --btn-rgb: 103 146 206 !important;
  --btn-dark: 55 80 118 !important;
  background: linear-gradient(93deg, #6792CE 0%, #3f5f8d 100%) !important;
  box-shadow: 0 4px 48px rgba(103, 146, 206, 0.35), inset 0 1px 0 #ffffff2e !important;
}

._blue_1ev4m_157:hover:not(:disabled) {
  box-shadow: 0 4px 48px rgba(103, 146, 206, 0.55), inset 0 1px 0 #ffffff38 !important;
}

/* Active navigation tab */
._tab_7yzuq_77._active_7yzuq_157 {
  background: rgba(103, 146, 206, 0.18) !important;
  color: #6792CE !important;
}

._tab_7yzuq_77:hover {
  color: #6792CE !important;
}

/* Hero Badge */
._badge_1qiv1_1, ._label_19nob_17 {
  color: #6792CE !important;
}

/* Background Ambient Glow */
._blue_1qiv1_43 {
  background: #6792CE !important;
  opacity: 0.8 !important;
}

/* Ingame highlight */
._feature_1l98s_45:hover {
  border-color: #6792CE !important;
}

/* Rules category active */
._item_pr99h_19.active {
  background: rgba(103, 146, 206, 0.15) !important;
  color: #6792CE !important;
  border-left: 2px solid #6792CE !important;
}

/* Ensure all reveal animations and canvases are visible and not obscuring text */
.reveal-dots {
  display: none !important;
}
.reveal {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

/* Button Cursor and Click Feel */
button, a._button_1ev4m_1, ._tab_7yzuq_77, [role="button"] {
  cursor: pointer;
  user-select: none;
}

/* Toast Container */
#rival-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.rival-toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(18, 20, 26, 0.96);
  border: 1px solid rgba(103, 146, 206, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(103, 146, 206, 0.2);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 12px 18px;
  border-radius: 6px;
  color: #fff;
  font-family: 'Chakra Petch', system-ui;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.rival-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.rival-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(135, 182, 96, 0.2);
  color: #87b660;
  flex-shrink: 0;
}

.rival-toast.info .rival-toast-icon {
  background: rgba(103, 146, 206, 0.2);
  color: #6792CE;
}

/* Modal Backdrop & Dialog */
.rival-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 10, 14, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rival-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.rival-modal {
  background: linear-gradient(180deg, #161922 0%, #0e1017 100%);
  border: 1px solid rgba(103, 146, 206, 0.3);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.8), 0 0 40px rgba(103, 146, 206, 0.15);
  border-radius: 8px;
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.rival-modal-backdrop.open .rival-modal {
  transform: scale(1);
}

.rival-modal-header {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.rival-modal-title {
  font-family: 'Chakra Petch', system-ui;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rival-modal-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rival-modal-close:hover {
  color: #fff;
}

.rival-modal-body {
  padding: 24px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  line-height: 1.6;
}

.rival-modal-footer {
  padding: 16px 24px;
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Lightbox Modal */
.rival-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 24px;
}

.rival-lightbox.open {
  opacity: 1;
  visibility: visible;
}

.rival-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  box-shadow: 0 0 60px rgba(0, 0, 0, 0.8);
  border: 1px solid rgba(103, 146, 206, 0.35);
  border-radius: 8px;
  overflow: hidden;
}

.rival-lightbox img {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.rival-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.rival-lightbox-close:hover {
  background: rgba(214, 69, 69, 0.8);
  transform: scale(1.1);
}

/* Connect Code Box */
.rival-code-box {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 12px 16px;
  border-radius: 6px;
  font-family: monospace;
  font-size: 14px;
  color: #6792CE;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0;
}

/* User Balance Widget in Header */
.rival-user-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(103, 146, 206, 0.15);
  border: 1px solid rgba(103, 146, 206, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: #fff;
  font-family: 'Chakra Petch', system-ui;
}

.rival-user-badge .balance {
  color: #87b660;
  font-weight: 700;
}

/* Search match highlight */
.rule-hidden, .shop-item-hidden {
  display: none !important;
}

/* Mobile Nav Drawer */
@media (max-width: 900px) {
  ._nav_7yzuq_39.mobile-open {
    display: flex !important;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(15, 17, 21, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(103, 146, 206, 0.25);
    padding: 24px;
    flex-direction: column;
    gap: 16px;
    z-index: 9999;
  }
}

/* RIVAL PVP primary actions share the brand palette. */
:root {
  --g-pill: linear-gradient(90deg, #486b9c 0%, #6792CE 50%, #486b9c 100%);
}
._button_1ev4m_1._green_1ev4m_147 {
  background: linear-gradient(93deg, #6792CE 0%, #486b9c 100%) !important;
  color: #101b2b !important;
  text-shadow: none !important;
  box-shadow: 0 4px 32px rgba(103, 146, 206, .3) !important;
}
._button_1ev4m_1._green_1ev4m_147:hover {
  background: linear-gradient(93deg, #84ace8 0%, #6792CE 100%) !important;
  box-shadow: 0 4px 40px rgba(103, 146, 206, .5) !important;
}

/* Keep rule categories visible while reading on desktop. */
@media (min-width: 961px) {
  ._toc_1ztvj_71 {
    max-height: calc(100dvh - var(--nav-h) - 50px);
    overflow-y: auto;
    scrollbar-width: thin;
  }
}
[data-rule-section] { scroll-margin-top: calc(var(--nav-h) + 40px); }

/* One moving highlight avoids flashing through intermediate categories. */
.rules-animated-categories { position: relative; isolation: isolate; }
.rules-category-indicator {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: none;
  border-radius: var(--r-sm);
  background: rgba(103, 146, 206, .1);
  border: 1px solid rgba(103, 146, 206, .18);
  z-index: 0;
}
.rules-category-indicator::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 2px;
  background: #6792CE;
  box-shadow: 0 0 10px rgba(103, 146, 206, .6);
}
.rules-indicator-ready .rules-category-indicator {
  transition: transform .32s cubic-bezier(.22, 1, .36, 1), width .25s ease, height .25s ease;
}
.rules-animated-categories ._tocLink_1ztvj_111 { z-index: 1; }
.rules-animated-categories ._tocActive_1ztvj_193,
.rules-animated-categories ._tocActive_1ztvj_193:hover { background: transparent; }
.rules-animated-categories ._tocActive_1ztvj_193::before { display: none; }
@media (prefers-reduced-motion: reduce) {
  .rules-indicator-ready .rules-category-indicator { transition: none; }
}

/* Disable ordinary text selection without blocking search input editing. */
body, body * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
input, textarea { -webkit-user-select: text; user-select: text; }
[hidden] { display: none !important; }
.rules-search-status {
  padding: 16px 20px;
  margin-bottom: 16px;
  color: var(--c-text);
  border: 1px solid rgba(103, 146, 206, .25);
  border-radius: var(--r-sm);
  background: rgba(103, 146, 206, .08);
}
