/* ==========================================================================
   MAGISK DOCUMENTATION STYLES (doc-style.css)
   Layout: Sticky Left Sidebar + Right Content Area
   Theme: Clean Light Documentation Design
   ========================================================================== */

.doc-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 3rem;
  padding: 2.5rem 0 5rem 0;
  min-height: calc(100vh - 72px);
}

/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */

.doc-sidebar {
  position: sticky;
  top: 96px;
  height: calc(100vh - 120px);
  overflow-y: auto;
  padding-right: 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
}

.doc-sidebar::-webkit-scrollbar {
  width: 5px;
}

.doc-sidebar::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.sidebar-search-box {
  margin-bottom: 1.5rem;
  position: relative;
}

.sidebar-search-input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.25rem;
  font-size: 0.86rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: #ffffff;
  color: var(--text-primary);
  font-family: var(--font-sans);
  transition: border-color var(--transition-fast);
}

.sidebar-search-input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.sidebar-search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.doc-nav-category {
  margin-bottom: 1.75rem;
}

.doc-nav-category-title {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
  padding-left: 0.75rem;
}

.doc-nav-list {
  list-style: none;
}

.doc-nav-link {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  transition: all var(--transition-fast);
  text-decoration: none;
  line-height: 1.4;
}

.doc-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.doc-nav-link.active {
  color: var(--accent-primary);
  background: var(--accent-light);
  border-left-color: var(--accent-primary);
  font-weight: 600;
}

.doc-sidebar-mobile-toggle {
  display: none;
  width: 100%;
  margin-bottom: 1.5rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================================
   DOCUMENTATION MAIN CONTENT
   ========================================================================== */

.doc-content {
  max-width: 860px;
  min-width: 0;
}

/* TL;DR Summary Box */
.tldr-box {
  background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
  border: 1px solid var(--accent-light-border);
  border-left: 4px solid var(--accent-primary);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-sm);
}

.tldr-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tldr-list {
  padding-left: 1.25rem;
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.tldr-list li {
  margin-bottom: 0.4rem;
}

.tldr-list strong {
  color: var(--text-primary);
}

/* Breadcrumbs */
.doc-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.doc-breadcrumbs a {
  color: var(--text-secondary);
}

.doc-breadcrumbs a:hover {
  color: var(--accent-primary);
}

.doc-breadcrumbs svg {
  color: #cbd5e1;
}

/* Content Sections */
.doc-section {
  padding-top: 2rem;
  margin-bottom: 4rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 3.5rem;
}

.doc-section:last-child {
  border-bottom: none;
}

.doc-section-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.doc-subsection-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin: 2.25rem 0 0.85rem 0;
}

.doc-paragraph {
  font-size: 1.02rem;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.doc-paragraph strong {
  color: var(--text-primary);
}

/* Alert Boxes (Callouts) */
.alert-box {
  border-radius: var(--radius-md);
  padding: 1.15rem 1.35rem;
  margin: 1.5rem 0;
  display: flex;
  gap: 0.85rem;
  font-size: 0.94rem;
  line-height: 1.65;
}

.alert-box svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.alert-info {
  background: var(--info-bg);
  border: 1px solid var(--info-border);
  color: #0369a1;
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: #92400e;
}

.alert-danger {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: #991b1b;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  color: #166534;
}

.alert-content strong {
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}

/* Code Blocks in Docs */
.doc-code-block {
  margin: 1.35rem 0;
}

/* Tables in Docs */
.doc-table-wrapper {
  margin: 1.5rem 0 2rem 0;
}

/* Lists */
.doc-list {
  padding-left: 1.35rem;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

.doc-list li {
  margin-bottom: 0.5rem;
}

.doc-list strong {
  color: var(--text-primary);
}

/* Definition Lists */
.doc-dl {
  margin: 1.5rem 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.doc-dl-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.doc-dl-row:last-child {
  border-bottom: none;
}

.doc-dl-row:nth-child(even) {
  background: var(--bg-subtle);
}

.doc-dt {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-primary);
}

.doc-dd {
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Responsive Doc Layout */
@media (max-width: 992px) {
  .doc-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .doc-sidebar-mobile-toggle {
    display: flex;
  }
  
  .doc-sidebar {
    display: none;
    position: static;
    height: auto;
    max-height: 400px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
  }
  
  .doc-sidebar.open {
    display: block;
  }
}
