/* WholeClear Investigator Documentation CSS */
:root {
  --navy: #0b1b33;
  --navy-light: #122844;
  --red: #ad0000;
  --red-on-dark: #ff6b6b;
  --blue: #2563eb;
  --blue-light: #eff6ff;
  --line: #e4e8ee;
  --muted: #5b6778;
  --bg: #f6f7f9;
  --text: #152033;
  --surface: #ffffff;
  --good: #0f7b4a;
  --good-bg: #dcfce7;
  --warn: #b45309;
  --warn-bg: #ffedd5;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --shadow: 0 4px 20px rgba(11, 27, 51, 0.05);
}

/* Base styles scoped under .wc-docs */
html, body, .wc-docs, .wc-docs * {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

.wc-docs {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  padding: 40px 0 60px;
}

.wc-docs * {
  box-sizing: border-box;
}

.wc-docs-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  max-width: 1550px; /* Wider workspace layout as requested */
  margin: 0 auto;
  padding: 0 20px;
}

.wc-docs-container.has-right-sidebar {
  grid-template-columns: 280px 1fr 280px; /* Three-column documentation layout */
}

/* Sidebar Navigation */
.wc-docs-sidebar {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  height: fit-content;
}

.wc-docs-sidebar h3 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
}

.wc-docs-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wc-docs-nav-list li {
  margin-bottom: 8px;
}

.wc-docs-nav-list a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.wc-docs-nav-list a:hover {
  background: var(--blue-light);
  color: var(--blue);
  padding-left: 16px;
}

.wc-docs-nav-list a.active {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

/* Main Content Area */
.wc-docs-content {
  min-width: 0;
}

.wc-docs-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  border-radius: 8px;
  padding: 40px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.wc-docs-hero::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(173,0,0,0.15) 0%, rgba(0,0,0,0) 70%);
  border-radius: 50%;
}

.wc-docs-hero .eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--red-on-dark);
  margin: 0 0 10px 0;
}

.wc-docs-hero h1 {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  font-size: 32px;
  font-weight: 800;
  margin: 0 0 16px 0;
  line-height: 1.2;
  color: #ffffff !important;
}

.wc-docs-hero p {
  font-size: 16px;
  line-height: 1.6;
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
  max-width: 800px;
}

/* Card layout */
.wc-docs-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: var(--shadow);
}

.wc-docs-card:last-child {
  margin-bottom: 0;
}

.wc-docs-card h2 {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  margin-top: 0;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.wc-docs-card h3 {
  font-family: Montserrat, "Segoe UI", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--navy-light);
  margin-top: 24px;
  margin-bottom: 12px;
}

.wc-docs-card p {
  font-size: 15px;
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 16px;
  color: #334155;
}

/* In-page Anchor Outline Sidebar (right side or inside side-nav as section) */
.wc-docs-inpage-nav {
  margin: 0 0 20px 0;
  padding: 14px 18px;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--navy);
}

.wc-docs-inpage-nav strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.wc-docs-inpage-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.wc-docs-inpage-nav-links a {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}

.wc-docs-inpage-nav-links a:hover {
  text-decoration: underline;
}

/* Tables */
.wc-docs-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.wc-docs-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.wc-docs-table th, .wc-docs-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.wc-docs-table th {
  background: #f1f5f9;
  font-weight: 700;
  color: var(--navy);
}

.wc-docs-table tr:last-child td {
  border-bottom: none;
}

.wc-docs-table tr:nth-child(even) td {
  background: #f8fafc;
}

/* Callout blocks */
.wc-docs-callout {
  padding: 20px;
  border-left: 4px solid var(--blue);
  background: var(--blue-light);
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
}

.wc-docs-callout strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}

.wc-docs-callout.good {
  border-left-color: var(--good);
  background: var(--good-bg);
}

.wc-docs-callout.warn {
  border-left-color: var(--warn);
  background: var(--warn-bg);
}

.wc-docs-callout.danger {
  border-left-color: var(--danger);
  background: var(--danger-bg);
}

/* Steps list */
.wc-docs-steps {
  list-style: none;
  padding: 0;
  margin: 24px 0;
  display: grid;
  gap: 20px;
}

.wc-docs-step {
  position: relative;
  padding-left: 54px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 16px 16px 16px 54px;
}

.wc-docs-step-num {
  position: absolute;
  left: 14px;
  top: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  display: grid;
  place-items: center;
  font-size: 14px;
}

.wc-docs-step h3 {
  margin: 0 0 8px 0 !important;
  font-size: 16px !important;
}

.wc-docs-step p {
  margin: 0 !important;
  font-size: 14px !important;
  color: #475569;
}

/* Quick links footer inside card */
.wc-docs-next-links {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  gap: 16px;
}

.wc-docs-next-links a {
  display: inline-block;
  padding: 10px 16px;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  border-radius: 4px;
  transition: background 0.2s ease;
}

.wc-docs-next-links a:hover {
  background: var(--red);
}

/* Badges */
.wc-docs-badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.wc-docs-badge.good { background: var(--good-bg); color: var(--good); }
.wc-docs-badge.warn { background: var(--warn-bg); color: var(--warn); }
.wc-docs-badge.danger { background: var(--danger-bg); color: var(--danger); }
.wc-docs-badge.info { background: var(--blue-light); color: var(--blue); }

/* Checklist */
.wc-docs-checklist {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.wc-docs-checklist li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.5;
}

.wc-docs-checklist li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--good);
  font-weight: 800;
  font-size: 16px;
}

/* Three column grid inside cards */
.wc-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin: 24px 0;
}

.wc-docs-grid-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 20px;
}

.wc-docs-grid-card h3 {
  margin: 0 0 10px 0 !important;
  font-size: 16px !important;
}

.wc-docs-grid-card p {
  margin: 0 !important;
  font-size: 13.5px !important;
  color: #475569;
}

/* Responsive design & Right Sidebar styles */
.wc-docs-card[id], section[id] {
  scroll-margin-top: 100px; /* offset anchor links so they land cleanly below headers */
}

/* Right Sidebar (On This Page) - styling to match the left sidebar precisely */
.wc-docs-right-sidebar {
  position: sticky;
  top: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow);
  height: max-content;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}

.wc-docs-right-sidebar h3 {
  margin: 0 0 16px 0;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  border-bottom: 2px solid var(--red);
  padding-bottom: 8px;
}

.wc-docs-right-nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wc-docs-right-nav-list li {
  margin-bottom: 8px;
}

.wc-docs-right-nav-list a {
  display: block;
  padding: 8px 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
  line-height: 1.4;
}

.wc-docs-right-nav-list a:hover {
  background: var(--blue-light);
  color: var(--blue);
  padding-left: 16px;
}

.wc-docs-right-nav-list a.active {
  background: var(--navy);
  color: #fff;
  font-weight: 600;
}

/* Hide horizontal in-page outline bar on wide desktop since we have the vertical sticky one */
@media (min-width: 1201px) {
  .wc-docs-inpage-nav {
    display: none !important;
  }
}

@media (max-width: 1200px) {
  .wc-docs-container.has-right-sidebar {
    grid-template-columns: 280px 1fr; /* fall back to 2 columns */
  }
  .wc-docs-right-sidebar {
    display: none !important; /* hide right sidebar, let horizontal menu show instead */
  }
}

@media (max-width: 991px) {
  .wc-docs-container, .wc-docs-container.has-right-sidebar {
    grid-template-columns: 1fr;
  }
  .wc-docs-sidebar {
    position: static;
    margin-bottom: 20px;
  }
}

/* Documentation Screenshots & Interactive Lightbox */
.wc-docs-figure {
  margin: 24px 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-docs-figure:hover {
  border-color: #cbd5e1;
  box-shadow: 0 8px 24px rgba(11, 27, 51, 0.09);
}

.wc-docs-img-wrap {
  position: relative;
  display: block;
  cursor: zoom-in;
  overflow: hidden;
  background: #f8fafc;
}

.wc-docs-img-wrap img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  transition: transform 0.25s ease;
}

.wc-docs-img-wrap:hover img {
  transform: scale(1.008);
}

.wc-docs-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 27, 51, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.wc-docs-img-wrap:hover .wc-docs-img-overlay,
.wc-docs-img-wrap:focus .wc-docs-img-overlay {
  opacity: 1;
}

.wc-docs-zoom-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(11, 27, 51, 0.9);
  color: #ffffff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transform: translateY(4px);
  transition: transform 0.2s ease;
}

.wc-docs-img-wrap:hover .wc-docs-zoom-pill {
  transform: translateY(0);
}

.wc-docs-figure figcaption {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.wc-docs-figure figcaption::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  flex-shrink: 0;
}

.wc-docs-fig-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.wc-fig-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none !important;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.wc-fig-btn-fs {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: var(--navy);
  cursor: pointer;
}

.wc-fig-btn-fs:hover {
  background: var(--navy);
  color: #ffffff;
  border-color: var(--navy);
}

.wc-fig-btn-tab {
  background: var(--blue-light);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--blue);
}

.wc-fig-btn-tab:hover {
  background: var(--blue);
  color: #ffffff;
  border-color: var(--blue);
}

/* Lightbox Modal */
body.wc-lb-open {
  overflow: hidden !important;
}

.wc-docs-lightbox-modal {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease-out;
}

.wc-docs-lightbox-modal.wc-lb-active {
  opacity: 1;
  pointer-events: auto;
}

.wc-lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 36, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.wc-lb-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 100vw;
  max-height: 100vh;
  box-sizing: border-box;
  padding: 16px 24px;
}

.wc-lb-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 12px;
  background: rgba(18, 40, 68, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #ffffff;
  flex-shrink: 0;
}

.wc-lb-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.wc-lb-badge {
  display: inline-block;
  padding: 3px 8px;
  background: var(--blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 4px;
  flex-shrink: 0;
}

.wc-lb-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wc-lb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.wc-lb-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none !important;
  transition: all 0.15s ease;
  line-height: 1.2;
}

.wc-lb-btn-newtab {
  background: var(--blue);
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.wc-lb-btn-newtab:hover {
  background: #1d4ed8;
  color: #ffffff !important;
  box-shadow: 0 0 12px rgba(37, 99, 235, 0.5);
}

.wc-lb-btn-close {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 6px 10px;
}

.wc-lb-btn-close:hover {
  background: var(--red);
  color: #ffffff;
  border-color: var(--red);
}

.wc-lb-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 0;
  min-height: 0;
  overflow: auto;
}

.wc-lb-img-wrap {
  position: relative;
  max-width: 96vw;
  max-height: 82vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wc-lb-img {
  display: block;
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b1b33;
}

.wc-lb-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 12px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  flex-shrink: 0;
}

.wc-lb-caption {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.85);
}

.wc-lb-hint kbd {
  display: inline-block;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 3px;
  font-family: inherit;
  font-size: 11px;
  color: #ffffff;
}

@media (max-width: 768px) {
  .wc-lb-container {
    padding: 10px;
  }
  .wc-lb-topbar {
    padding: 6px 10px;
  }
  .wc-lb-title {
    max-width: 140px;
  }
  .wc-lb-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}


