/* ========================================
   SoccerMgr Guide — Wiki-style page
   Extends styles.css tokens and base
   ======================================== */

/* ---------- Mobile TOC ---------- */
.guide-mobile-toc-wrap {
  padding-top: 24px;
}
.guide-mobile-toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.guide-mobile-toc summary {
  padding: 14px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guide-mobile-toc summary::-webkit-details-marker { display: none; }
.guide-mobile-toc summary::before {
  content: "▸";
  font-size: 0.8rem;
  color: var(--brand-bright);
  transition: transform 0.2s ease;
}
.guide-mobile-toc[open] summary::before {
  transform: rotate(90deg);
}
.guide-mobile-toc nav {
  padding: 0 20px 16px;
}
.guide-mobile-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 4px;
}
.guide-mobile-toc a {
  display: block;
  padding: 6px 8px;
  font-size: 0.9rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
}
.guide-mobile-toc a:hover {
  color: var(--text);
  background: var(--surface-2);
}
@media (min-width: 960px) {
  .guide-mobile-toc-wrap { display: none; }
}

/* ---------- Guide Hero ---------- */
.guide-hero {
  padding-block: clamp(48px, 8vw, 100px) clamp(32px, 5vw, 56px);
  background:
    radial-gradient(60% 80% at 30% 40%, var(--brand-soft), transparent 70%),
    var(--bg);
  border-bottom: 1px solid var(--border);
}
.guide-hero-inner { max-width: 720px; }
.guide-hero h1 { font-size: clamp(1.75rem, 4vw, 2.8rem); margin-bottom: 16px; }
.guide-hero .lead { font-size: 1.1rem; }

/* ---------- Guide Layout ---------- */
.guide-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-block: 48px 80px;
}
@media (min-width: 960px) {
  .guide-layout {
    grid-template-columns: 220px 1fr;
    gap: 56px;
  }
}

/* ---------- TOC Sidebar ---------- */
.guide-toc {
  display: none;
}
@media (min-width: 960px) {
  .guide-toc {
    display: block;
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding-right: 12px;
  }
}
.guide-toc h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.guide-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.guide-toc > nav > ol > li {
  margin-bottom: 6px;
}
.guide-toc ol ol {
  padding-left: 14px;
  margin-top: 4px;
}
.guide-toc a {
  display: block;
  padding: 4px 8px;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-radius: 6px;
  transition: color 0.15s ease, background-color 0.15s ease;
  line-height: 1.4;
}
.guide-toc a:hover {
  color: var(--text);
  background: var(--surface-2);
}
.guide-toc a.toc-active {
  color: var(--brand-bright);
  background: var(--brand-soft);
}

/* ---------- Guide Content ---------- */
.guide-content {
  max-width: 760px;
  min-width: 0;
}
.guide-content section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}
.guide-content section:last-child {
  border-bottom: none;
}
.guide-content h2 {
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  margin-bottom: 16px;
  scroll-margin-top: 90px;
}
.guide-content h3 {
  font-size: 1.15rem;
  margin-top: 28px;
  margin-bottom: 10px;
  scroll-margin-top: 90px;
}
.guide-content p {
  color: var(--text-muted);
  line-height: 1.7;
}
.guide-content strong {
  color: var(--text);
}

/* ---------- Nav active ---------- */
.nav-active {
  color: var(--brand-bright) !important;
}

/* ---------- Callouts ---------- */
.guide-callout {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.guide-callout p { margin: 0; }
.guide-callout--brand {
  background: var(--brand-soft);
  border: 1px solid rgba(81, 145, 67, 0.25);
  color: var(--text);
}
.guide-callout--info {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.guide-callout-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  line-height: 1.5;
}

/* ---------- Tile Grids ---------- */
.guide-grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 20px 0;
}
@media (min-width: 600px) {
  .guide-grid-3 { grid-template-columns: repeat(3, 1fr); }
}
.guide-tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.guide-tile-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 8px;
}
.guide-tile h4 {
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
  margin-bottom: 6px;
}
.guide-tile p {
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- Setting Cards ---------- */
.guide-setting-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.guide-setting-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-bright);
  margin-bottom: 6px;
}
.guide-setting-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.guide-setting-card p {
  margin: 0;
  font-size: 0.9rem;
}

/* ---------- Tab Diagram ---------- */
.guide-tabs-diagram {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 20px 0;
}
.guide-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
}
.guide-tab-pill--blue { background: #1976D2; }
.guide-tab-pill--green { background: #519143; }
.guide-tab-pill--amber { background: #E68A00; }
.guide-tab-pill--red { background: #D32F2F; }

/* ---------- Mode Toggle ---------- */
.guide-mode-toggle {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  margin: 16px 0 20px;
  max-width: 400px;
}
.guide-mode-btn {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  background: var(--surface-2);
  transition: background 0.15s ease;
}
.guide-mode-btn--active {
  background: var(--brand);
  color: #fff;
}
.guide-mode-icon { margin-right: 4px; }

/* ---------- Feature List ---------- */
.guide-feature-list {
  display: grid;
  gap: 14px;
  margin: 20px 0;
}
.guide-feature-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.guide-feature-dot {
  flex-shrink: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 7px;
}
.guide-feature-dot--brand { background: var(--brand); }
.guide-feature-dot--muted { background: var(--text-muted); }
.guide-feature-dot--green { background: #4CAF50; }
.guide-feature-dot--amber { background: #FF9800; }

/* ---------- Chips ---------- */
.guide-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  vertical-align: middle;
}
.guide-chip--brand { background: var(--brand-soft); color: var(--brand-bright); }
.guide-chip--muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }

.guide-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  vertical-align: middle;
}
.guide-dot--green { background: #4CAF50; }
.guide-dot--amber { background: #FF9800; }
.guide-dot--red { background: #F44336; }

/* ---------- Mock Recommendation Card ---------- */
.guide-mock-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid #4CAF50;
  border-radius: var(--radius);
  padding: 0;
  margin: 24px 0;
  max-width: 480px;
  overflow: hidden;
}
.guide-mock-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px 10px;
}
.guide-mock-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
}
.guide-status-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.guide-status-chip--green { background: #4CAF50; color: #fff; }
.guide-mock-card-body {
  padding: 0 18px 18px;
}
.guide-mock-sub-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.guide-arrow { font-size: 0.9rem; }
.guide-arrow--red { color: #F44336; }
.guide-arrow-mid { color: var(--text-muted); font-size: 0.8rem; }
.guide-player-name { font-weight: 700; font-size: 0.95rem; }
.guide-player-name--red { color: #F44336; }
.guide-player-name--green { color: #4CAF50; }
.guide-position-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(76, 175, 80, 0.15);
  color: #4CAF50;
}
.guide-mock-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.guide-btn-mock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: default;
}
.guide-btn-mock--green { background: #4CAF50; color: #fff; }
.guide-btn-mock--amber { background: #FF9800; color: #fff; }
.guide-btn-mock--red-outline { background: transparent; color: #F44336; border: 1px solid #F44336; }

/* ---------- Timer Pill Demo ---------- */
.guide-pill-demo {
  display: flex;
  justify-content: center;
  margin: 24px 0;
}
.guide-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 20px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
}
.guide-pill-subs {
  animation: subs-blink 1s ease-in-out infinite;
}
@keyframes subs-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---------- Numbered Steps ---------- */
.guide-steps {
  display: grid;
  gap: 20px;
  margin: 20px 0;
}
.guide-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.guide-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.guide-step strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}
.guide-step p {
  margin: 0;
  font-size: 0.95rem;
}

/* ---------- FAQ Accordion ---------- */
.guide-faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.guide-faq summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s ease;
}
.guide-faq summary::-webkit-details-marker { display: none; }
.guide-faq summary::before {
  content: "▸";
  font-size: 0.8rem;
  color: var(--brand-bright);
  transition: transform 0.2s ease;
}
.guide-faq[open] summary::before {
  transform: rotate(90deg);
}
.guide-faq summary:hover {
  background: var(--surface-2);
}
.guide-faq p {
  padding: 0 20px 16px;
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ---------- Checklist ---------- */
.guide-checklist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.guide-check-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}
.guide-check-item:last-child { border-bottom: none; }
.guide-check-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
