/* =========================================================
   Baseball Hot - Legal Page
   Guide-style legal reader UI
   v0.2b legal_guide_style_tabs_nav_css_fix_20260814
   ========================================================= */

.legal-page-wrapper {
  max-width: 1180px;
}

.legal-title-line {
  border: 0;
  height: 5px;
  background: rgb(5, 71, 0);
  margin: -10px 10px 10px 0;
  opacity: 1;
}



/* =========================================================
   Guide shared component fallback
   legal.html only links css/legal.css, so these guide-style
   components must live here instead of depending on guide.css.
   ========================================================= */

.guide-eyebrow {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #d8ffe2;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.guide-search-hint {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.guide-nav-header {
  padding: 2px 4px 12px;
  margin-bottom: 8px;
  border-bottom: 1px solid #edf2ef;
}

.guide-nav-title {
  color: #0f4220;
  font-size: 18px;
  font-weight: 900;
}

.guide-nav-subtitle {
  margin-top: 3px;
  color: #7b8b81;
  font-size: 13px;
  font-weight: 700;
}

.guide-nav-group {
  margin-bottom: 8px;
  border-radius: 14px;
  background: #f8fbf8;
  border: 1px solid #edf2ef;
  overflow: hidden;
}

.guide-nav-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border: 0;
  padding: 12px 12px;
  background: transparent;
  color: #173822;
  text-align: left;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.guide-nav-heading:hover {
  background: #edf8ef;
}

.guide-nav-arrow {
  transition: transform 0.15s ease;
  color: #145c22;
}

.guide-nav-group.open .guide-nav-arrow {
  transform: rotate(180deg);
}

.guide-nav-items {
  display: none;
  padding: 0 8px 9px;
}

.guide-nav-group.open .guide-nav-items {
  display: block;
}

.guide-topic-link {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 11px;
  padding: 9px 10px 9px 18px;
  background: transparent;
  color: #415849;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  cursor: pointer;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

.guide-topic-link:hover {
  background: #eef8f0;
  color: #0f5a25;
}

.guide-topic-link.active,
.legal-topic-link.active {
  background: #145c22;
  color: #fff;
  box-shadow: 0 5px 12px rgba(20, 92, 34, 0.2);
}

.guide-note {
  margin-top: 20px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  background: #f3faf4;
  border: 1px solid #cfe6d3;
  color: #315340;
  line-height: 1.75;
}

.guide-note strong {
  color: #145c22;
}

.legal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 18px;
  margin: 18px 10px 16px 0;
  padding: 22px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(244, 197, 66, 0.20), transparent 36%),
    radial-gradient(circle at bottom right, rgba(54, 170, 82, 0.24), transparent 34%),
    linear-gradient(135deg, #073817 0%, #0f5a25 52%, #12371f 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.legal-hero h2 {
  margin: 0 0 8px;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 900;
}

.legal-hero p {
  max-width: 760px;
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.8;
  font-size: 15px;
}

.legal-quick-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.legal-tab-pill {
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.legal-tab-pill:hover,
.legal-tab-pill.active {
  background: #ffffff;
  color: #0f5a25;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.12);
}

.legal-doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0 10px 40px 0;
}

.legal-doc-nav {
  position: sticky;
  top: 16px;
  height: auto;
  min-height: 0;
  padding: 14px;
  border-radius: 20px;
  background: #fff;
  border: 1px solid #e3e9e5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.legal-reader-panel {
  min-height: 560px;
  padding: 26px;
  border-radius: 22px;
  background: #fff;
  border: 1px solid #e2e8e4;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.legal-article {
  display: none;
  animation: legalFadeIn 0.18s ease;
}

.legal-article.active {
  display: block;
}

@keyframes legalFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.legal-article-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  margin-bottom: 12px;
  border-radius: 999px;
  background: #edf8ef;
  color: #126225;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.legal-article h2 {
  margin: 0 0 14px;
  color: #172c1e;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 900;
}

.legal-article h3 {
  margin: 26px 0 10px;
  color: #143c22;
  font-size: 20px;
  line-height: 1.35;
  font-weight: 900;
}

.legal-article p {
  margin: 0 0 14px;
  color: #4f6256;
  font-size: 16px;
  line-height: 1.85;
}

.legal-article ul {
  margin: 8px 0 0;
  padding-left: 22px;
}

.legal-article li {
  margin: 6px 0;
  color: #4f6256;
  line-height: 1.7;
}

.legal-article strong {
  color: #145c22;
}

.legal-topic-link.active {
  background: #145c22;
  color: #fff;
  box-shadow: 0 5px 12px rgba(20, 92, 34, 0.2);
}

.legal-page-wrapper .guide-hero-logo-only {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 190px;
  padding: 0;
}

.legal-page-wrapper .guide-hero-logo-img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.16));
}

/* Reuse guide back-to-top button behavior */
.guide-back-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: #145c22;
  color: #fff;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.guide-back-top.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.guide-back-top:hover {
  background: #0b4519;
}

@media (max-width: 980px) {
  .legal-hero,
  .legal-doc-layout {
    grid-template-columns: 1fr;
  }
  .legal-doc-nav {
    position: static;
  }
  .legal-reader-panel {
    min-height: 420px;
  }
}

@media (max-width: 620px) {
  .legal-title-line,
  .legal-hero,
  .legal-doc-layout {
    margin-right: 0;
  }
  .legal-hero {
    padding: 16px;
    border-radius: 18px;
  }
  .legal-hero h2 {
    font-size: 22px;
  }
  .legal-hero p,
  .legal-article p {
    font-size: 15px;
  }
  .legal-reader-panel,
  .legal-doc-nav {
    border-radius: 18px;
  }
  .legal-reader-panel {
    padding: 20px 16px;
  }
  .legal-article h2 {
    font-size: 24px;
  }
  .guide-back-top {
    right: 16px;
    bottom: 16px;
  }
}

@media (max-width: 768px) {
  .legal-page-wrapper .guide-hero-logo-only {
    min-height: 140px;
  }
  .legal-page-wrapper .guide-hero-logo-img {
    width: 130px;
    height: 130px;
  }
}
