/* Custom styles for documentation pages */

/* Fix margins and layout for documentation pages */
.docs-container-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.docs-container-page h1 {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #e9ecef;
  color: #2d3748;
  font-size: 2.5rem;
  text-align: center;
}

/* Special styling for root page subtitle */
.docs-container-page h1 + p strong {
  font-size: 1.2rem;
  color: #4a5568;
  font-weight: 500;
}

/* Action buttons styling for root page */
.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, #4169E1, #1E3A8A);
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px -3px rgba(0, 0, 0, 0.2);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: white;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e0;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px -2px rgba(0, 0, 0, 0.1);
  color: #2d3748;
  text-decoration: none;
}

/* Feature sections styling */
.docs-container-page h3 {
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
  color: #2d3748;
  font-size: 1.5rem;
  font-weight: 600;
}

/* Emoji in headings */
.docs-container-page h3:has-text("🔧"),
.docs-container-page h3:has-text("⚡"),
.docs-container-page h3:has-text("🚀"),
.docs-container-page h3:has-text("🔒") {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.docs-container-page h2 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  color: #2d3748;
  font-size: 1.8rem;
  font-weight: 600;
}

/* Fix code blocks in documentation pages */
.docs-container-page pre {
  margin: 2rem 0;
  padding: 1.5rem;
  padding-right: 3.5rem; /* Space for copy button */
  background-color: #f8fafc;
  border-radius: 8px;
  overflow-x: auto;
  position: relative;
  border: 1px solid #e2e8f0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.docs-container-page code {
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', 'Consolas', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.5;
  color: #2d3748;
}

/* Fix inline code */
.docs-container-page p code,
.docs-container-page li code {
  background: rgba(0, 0, 0, 0.05);
  padding: 0.2em 0.4em;
  border-radius: 3px;
  color: #d73a49;
  font-size: 0.9em;
}

/* Improve list spacing */
.docs-container-page ul,
.docs-container-page ol {
  margin: 1.75rem 0;
  padding-left: 2.25rem;
}

.docs-container-page li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

.docs-container-page li:last-child {
  margin-bottom: 0;
}

/* Fix blockquotes */
.docs-container-page blockquote {
  border-left: 4px solid #4299e1;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  color: #4a5568;
  font-style: italic;
  background-color: rgba(66, 153, 225, 0.05);
  border-radius: 0 8px 8px 0;
}

/* Add a nice box for notes */
.docs-container-page .note {
  background-color: #ebf8ff;
  border-left: 4px solid #4299e1;
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-radius: 0 8px 8px 0;
}

/* Fix table styles */
.docs-container-page table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.docs-container-page th {
  background-color: #f8fafc;
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.docs-container-page td {
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

/* Fix highlighted syntax for documentation */
.docs-container-page .highlight {
  margin: 0;
  background: transparent;
}

.docs-container-page .highlight pre.highlight {
  background: #f8fafc;
  border: none;
  padding: 1.5rem;
  padding-right: 3.5rem;
  margin: 0;
}

/* Fix links in documentation */
.docs-container-page a {
  color: #3182ce;
  text-decoration: none;
  transition: color 0.2s;
  padding-bottom: 1px;
  border-bottom: 1px solid transparent;
}

.docs-container-page a:hover {
  color: #2c5282;
  border-bottom: 1px solid #2c5282;
  text-decoration: none;
}

/* Don't apply link styling to buttons */
.docs-container-page .btn {
  border-bottom: none !important;
}

.docs-container-page .btn:hover {
  border-bottom: none !important;
}

/* Paragraph spacing */
.docs-container-page p {
  margin-bottom: 1.75rem;
  line-height: 1.6;
  color: #4a5568;
}

/* Improve installation section spacing */
.docs-container-page section {
  margin-bottom: 4rem;
  padding-bottom: 1rem;
}

/* Fix the "Next Steps" section */
.docs-container-page #next-steps {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

/* Copy button with icon - matches examples.css */
.docs-container-page pre .copy-button,
.docs-container-page .manual-copy-btn {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  padding: 0.5rem;
  cursor: pointer;
  color: #4a5568;
  opacity: 0.8;
  transition: all 0.2s ease;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(4px);
}

.docs-container-page pre .copy-button svg,
.docs-container-page .manual-copy-btn svg {
  display: block;
  width: 16px;
  height: 16px;
  visibility: visible;
  opacity: 1;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.docs-container-page pre .copy-button:hover,
.docs-container-page .manual-copy-btn:hover {
  background-color: rgba(255, 255, 255, 1);
  opacity: 1;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  color: #2d3748;
}

.docs-container-page pre .copy-button.copied,
.docs-container-page .manual-copy-btn.copied {
  color: #38a169;
  border-color: rgba(56, 161, 105, 0.3);
  background-color: rgba(240, 255, 244, 0.9);
}

/* Simplified syntax highlighting - GitHub-like colors */
.docs-container-page .language-rust .k,
.docs-container-page .language-rust .kw,
.docs-container-page .language-rust .kd,
.docs-container-page .highlight .k,
.docs-container-page .highlight .kw,
.docs-container-page .highlight .kd {
  color: #d73a49; /* Keywords in red */
  font-weight: 500;
}

.docs-container-page .language-rust .fn,
.docs-container-page .language-rust .nf,
.docs-container-page .highlight .fn,
.docs-container-page .highlight .nf {
  color: #6f42c1; /* Functions in purple */
}

.docs-container-page .language-rust .s,
.docs-container-page .language-rust .s1,
.docs-container-page .highlight .s,
.docs-container-page .highlight .s1,
.docs-container-page .highlight .s2 {
  color: #032f62; /* Strings in dark blue */
}

.docs-container-page .language-rust .c,
.docs-container-page .language-rust .c1,
.docs-container-page .language-rust .cm,
.docs-container-page .highlight .c,
.docs-container-page .highlight .c1,
.docs-container-page .highlight .cm {
  color: #6a737d; /* Comments in gray */
  font-style: italic;
}

.docs-container-page .language-rust .mi,
.docs-container-page .language-rust .mf,
.docs-container-page .highlight .mi,
.docs-container-page .highlight .mf {
  color: #005cc5; /* Numbers in blue */
}

.docs-container-page .language-rust .na,
.docs-container-page .highlight .na {
  color: #e36209; /* Attributes in orange */
}

/* Default text color for other elements */
.docs-container-page .highlight .nx,
.docs-container-page .highlight .o,
.docs-container-page .highlight .p {
  color: #24292e;
}

/* Add spacing between adjacent code blocks */
.docs-container-page pre + pre {
  margin-top: 1rem;
}

/* Improve spacing between headings and code blocks */
.docs-container-page h2 + pre,
.docs-container-page h3 + pre {
  margin-top: 1.5rem;
}

/* Ensure content has proper spacing from sidebar */
@media (min-width: 768px) {
  .docs-content {
    padding-left: 2rem;
  }
}

/* Add spacing between adjacent lists */
.docs-container-page ul + ul,
.docs-container-page ol + ol,
.docs-container-page ul + ol,
.docs-container-page ol + ul {
  margin-top: -1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .docs-container-page {
    padding: 1rem 0.5rem;
    max-width: 100%;
  }
  
  .docs-container-page h1 {
    font-size: 2rem;
  }
  
  .docs-container-page pre {
    padding: 1rem;
    padding-right: 3rem;
    font-size: 13px;
  }
  
  .action-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }
}
