/* ===== DOCUMENTATION - Documentation section styling, example grid, and related elements ===== */

/* Documentation Section Styling */
.documentation-section {
  margin-top: 15px;
  padding: 10px;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  border-left: 2px solid #007bff;
  transition: all 0.3s ease;
}

.documentation-section {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.documentation-section.collapsed {
  padding: 10px;
  max-height: 60px; /* Just enough for the header */
}

.documentation-section:not(.collapsed) {
  max-height: 2000px; /* Reasonable max height for content */
}

.documentation-section .doc-section {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 1;
  transform: translateY(0);
}

.documentation-section.collapsed .doc-section {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Enhanced smooth animations for all subsections */
.doc-section {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-section h4 {
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.doc-section:hover h4 {
  color: #0056b3;
}

.doc-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin-bottom: 10px;
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 0px;
  gap: 15px;
}

.doc-header h3 {
  margin: 0;
  color: #6c757d;
  font-size: 16px;
  font-weight: 500;
}

.doc-toggle {
  background: none;
  border: none;
  color: #007bff;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 16px;
}

.doc-toggle:hover {
  background-color: #e3f2fd;
  color: #0056b3;
}

.toggle-icon {
  font-weight: bold;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.toggle-icon:hover {
  transform: scale(1.1);
}

.doc-section {
  margin-bottom: 25px;
}

.doc-section h4 {
  margin: 0 0 12px 0;
  color: #007bff;
  font-size: 16px;
  font-weight: 600;
}

.doc-section p {
  margin: 0 0 12px 0;
  line-height: 1.6;
  color: #495057;
}

.doc-section ol,
.doc-section ul {
  margin: 0 0 12px 0;
  padding-left: 20px;
  line-height: 1.6;
  color: #495057;
}

.doc-section li {
  margin-bottom: 8px;
}

.doc-section strong {
  color: #212529;
}

.doc-section a {
  color: #007bff;
  text-decoration: none;
  font-weight: 500;
}

.doc-section a:hover {
  text-decoration: underline;
  color: #0056b3;
}

.doc-section em {
  color: #6c757d;
  font-style: italic;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 15px;
  margin-top: 15px;
}

.example-item {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.example-item h5 {
  margin: 0 0 10px 0;
  color: #495057;
  font-size: 14px;
  font-weight: 600;
}

.example-item pre {
  margin: 0;
  background: #f8f9fa;
}
