/* Help Page Styles */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #fafaf9;
  color: #1a1815;
  line-height: 1.6;
}

.help-container {
  display: flex;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
  gap: 40px;
  min-height: calc(100vh - 80px);
}

/* Sidebar Navigation */
.help-sidebar {
  width: 280px;
  position: sticky;
  top: 100px;
  height: fit-content;
  background: white;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.help-sidebar-header {
  margin-bottom: 20px;
}

.help-back-link {
  display: inline-block;
  color: #6e645a;
  text-decoration: none;
  font-size: 0.9em;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.help-back-link:hover {
  background-color: #f4f1ed;
  color: #1a1815;
}

.help-sidebar h3 {
  font-size: 1.1em;
  font-weight: 600;
  color: #1a1815;
  margin-bottom: 0;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8e4df;
}

/* Search Box */
.help-search-container {
  position: relative;
  margin-bottom: 16px;
}

.help-search-input {
  width: 100%;
  padding: 10px 36px 10px 12px;
  border: 1px solid #d4cfc7;
  border-radius: 6px;
  font-size: 0.9em;
  font-family: 'Inter', sans-serif;
  background-color: #fafaf9;
  transition: all 0.2s ease;
}

.help-search-input:focus {
  outline: none;
  border-color: #1a1815;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(26, 24, 21, 0.1);
}

.help-search-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 1.5em;
  color: #6e645a;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color 0.2s ease;
}

.help-search-clear:hover {
  color: #1a1815;
}

.search-results-count {
  font-size: 0.85em;
  margin-bottom: 12px;
  padding: 8px 12px;
  background-color: #f4f1ed;
  border-radius: 4px;
  font-weight: 500;
}

/* Search Highlighting */
mark.search-highlight {
  background-color: #fef08a;
  color: #1a1815;
  padding: 2px 4px;
  border-radius: 2px;
  font-weight: 600;
}

.help-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.help-nav a {
  display: block;
  padding: 10px 12px;
  color: #6e645a;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95em;
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.help-nav a:hover {
  background-color: #fafaf9;
  color: #1a1815;
  border-left-color: #d4cfc7;
}

.help-nav a.active {
  background-color: #f4f1ed;
  color: #1a1815;
  font-weight: 500;
  border-left-color: #1a1815;
}

/* Main Content Area */
.help-content {
  flex: 1;
  background: white;
  border-radius: 8px;
  padding: 48px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  max-width: 900px;
}

.help-header {
  margin-bottom: 48px;
  padding-bottom: 24px;
  border-bottom: 2px solid #e8e4df;
}

.help-header h1 {
  font-size: 2.5em;
  font-weight: 700;
  color: #1a1815;
  margin-bottom: 12px;
}

.help-header .subtitle {
  font-size: 1.1em;
  color: #6e645a;
  line-height: 1.5;
}

/* Sections */
.help-section {
  margin-bottom: 64px;
  scroll-margin-top: 100px;
}

.help-section h2 {
  font-size: 2em;
  font-weight: 700;
  color: #1a1815;
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid #e8e4df;
}

.help-section h3 {
  font-size: 1.4em;
  font-weight: 600;
  color: #1a1815;
  margin-top: 32px;
  margin-bottom: 16px;
}

.help-section p {
  color: #1a1815;
  margin-bottom: 16px;
  line-height: 1.7;
  font-size: 1.05em;
}

.help-section ul,
.help-section ol {
  margin-left: 24px;
  margin-bottom: 20px;
}

.help-section li {
  margin-bottom: 10px;
  color: #1a1815;
  line-height: 1.7;
  font-size: 1.05em;
}

.help-section li strong {
  color: #1a1815;
  font-weight: 600;
}

.help-section ul ul,
.help-section ol ul {
  margin-top: 8px;
  margin-bottom: 8px;
}

/* Code and Examples */
.example,
code {
  display: inline-block;
  background-color: #f4f1ed;
  padding: 4px 8px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.9em;
  color: #1a1815;
  margin-top: 8px;
}

.example {
  display: block;
  padding: 12px 16px;
  margin: 12px 0;
  border-left: 3px solid #6e645a;
}

/* Badge Examples */
.badge-example {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.85em;
  font-weight: 600;
  margin: 4px 4px 4px 0;
}

.badge-example.system {
  background-color: #e8f4f8;
  color: #0369a1;
}

.badge-example.mine {
  background-color: #e0f2f1;
  color: #00695c;
}

.badge-example.imported {
  background-color: #fff3e0;
  color: #e65100;
}

.badge-example.shared {
  background-color: #f3e5f5;
  color: #6a1b9a;
}

/* Footer */
.help-footer {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 2px solid #e8e4df;
  text-align: center;
}

.help-footer p {
  color: #6e645a;
  margin-bottom: 0;
  font-size: 1em;
}

.help-footer a {
  color: #1a1815;
  text-decoration: underline;
}

.help-footer a:hover {
  color: #6e645a;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .help-container {
    flex-direction: column;
    gap: 24px;
  }

  .help-sidebar {
    width: 100%;
    position: static;
    order: 2;
  }

  .help-content {
    padding: 32px 24px;
    order: 1;
  }

  .help-header h1 {
    font-size: 2em;
  }

  .help-section h2 {
    font-size: 1.6em;
  }

  .help-section h3 {
    font-size: 1.2em;
  }
}

@media (max-width: 768px) {
  .help-container {
    padding: 16px;
  }

  .help-content {
    padding: 24px 20px;
  }

  .help-header h1 {
    font-size: 1.75em;
  }

  .help-section h2 {
    font-size: 1.4em;
  }

  .help-section h3 {
    font-size: 1.1em;
  }

  .help-section p,
  .help-section li {
    font-size: 1em;
  }

  .help-sidebar {
    padding: 20px;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Print styles */
@media print {
  .help-sidebar,
  .help-footer,
  nav {
    display: none;
  }

  .help-content {
    box-shadow: none;
    padding: 0;
  }

  .help-section {
    page-break-inside: avoid;
  }

  .help-section h2 {
    page-break-after: avoid;
  }
}
