/* Help page specific styles */
.help-page {
  background: linear-gradient(135deg, #f5f3f7 0%, #e8e4ed 100%);
  display: block;
  align-items: flex-start;
  padding: 2rem 1rem;
  min-height: 100vh;
}

.help-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flow-root; /* Creates a new block formatting context to contain floats */
}

/* Header with back button */
.help-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--volt-gray);
}

.help-header h1 {
  margin: 0;
  text-align: left;
}

.back-button {
  background-color: var(--volt-purple);
  color: var(--volt-white);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  display: inline-block;
}

.back-button:hover {
  background-color: var(--volt-purple-dark);
  color: var(--volt-white);
  transform: translateX(-2px);
}

/* Main content wrapper with grid layout */
.help-main {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2rem;
  align-items: start;
}

/* Table of Contents */
.help-toc {
  position: sticky;
  top: 1rem;
  background-color: var(--volt-white);
  padding: 1rem;
  border-radius: 8px;
  border-left: 4px solid var(--volt-purple);
  box-shadow: 0 2px 8px rgba(80, 35, 121, 0.1);
}

.help-toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.help-toc li {
  margin-bottom: 0.5rem;
  display: block;
  width: 100%;
}

.help-toc a {
  color: var(--volt-purple);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.4rem 0;
  transition: all 0.2s;
  border-left: 2px solid transparent;
  line-height: 1.3;
  white-space: normal;
  padding-left: 0;
}

.help-toc a:hover {
  color: var(--volt-purple-dark);
  border-left-color: var(--volt-purple);
  padding-left: 0.5rem;
}

.help-toc a.active {
  color: var(--volt-purple-dark);
  font-weight: 600;
  border-left-color: var(--volt-purple);
}

/* Help content area */
.help-content {
  background-color: var(--volt-white);
  padding: 2.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(80, 35, 121, 0.1);
}

.help-content section {
  margin-bottom: 3rem;
  scroll-margin-top: 2rem; /* Offset for sticky TOC */
}

.help-content section:last-child {
  margin-bottom: 0;
}

.help-content h2 {
  color: var(--volt-purple);
  font-size: 2rem;
  margin-bottom: 1rem;
  margin-top: 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--volt-gray);
}

.help-content h3 {
  color: var(--volt-purple);
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.help-content h4 {
  color: var(--volt-purple-dark);
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.help-content p {
  line-height: 1.7;
  margin-bottom: 1rem;
  color: var(--volt-text-dark);
}

.help-content ul, .help-content ol {
  margin-bottom: 1rem;
  padding-left: 2rem;
  line-height: 1.7;
}

.help-content li {
  margin-bottom: 0.5rem;
  color: var(--volt-text-dark);
}

.help-content strong {
  color: var(--volt-text-dark);
  font-weight: 600;
}

.help-content a {
  color: var(--volt-purple);
  text-decoration: none;
  font-weight: 500;
}

.help-content a:hover {
  text-decoration: underline;
}

/* Callout boxes */
.help-tip {
  background-color: #e8f4f8;
  border-left: 4px solid #17a2b8;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.help-tip::before {
  content: "💡 ";
  font-size: 1.2rem;
  float: left;
  margin-right: 0.5rem;
  line-height: 1.5;
}

.help-tip p {
  margin: 0;
  overflow: hidden;
}

.help-warning {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.help-warning::before {
  content: "⚠️ ";
  font-size: 1.2rem;
  float: left;
  margin-right: 0.5rem;
  line-height: 1.5;
}

.help-warning p {
  margin: 0;
  color: #856404;
  overflow: hidden;
}

.help-important {
  background-color: #f8d7da;
  border-left: 4px solid #dc3545;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.help-important::before {
  content: "❗ ";
  font-size: 1.2rem;
  float: left;
  margin-right: 0.5rem;
  line-height: 1.5;
}

.help-important p {
  margin: 0;
  color: #721c24;
  overflow: hidden;
}

.help-important ul {
  margin-top: 0.5rem;
}

/* Info box - for FYI content */
.help-info {
  background-color: #f0f0ff;
  border-left: 4px solid var(--volt-purple);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.help-info::before {
  content: "ℹ️ ";
  font-size: 1.2rem;
  float: left;
  margin-right: 0.5rem;
  line-height: 1.5;
}

.help-info p {
  margin: 0;
  color: var(--volt-text-dark);
  overflow: hidden;
}

.help-info ul {
  margin-top: 0.5rem;
}

/* Success box */
.help-success {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}

.help-success::before {
  content: "✓ ";
  font-size: 1.2rem;
  float: left;
  margin-right: 0.5rem;
  line-height: 1.5;
  color: #28a745;
}

.help-success p {
  margin: 0;
  color: #155724;
  overflow: hidden;
}

/* Highlight box for key takeaways */
.help-highlight {
  background: linear-gradient(135deg, #f5f3f7 0%, #e8e4ed 100%);
  border: 2px solid var(--volt-purple);
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(80, 35, 121, 0.1);
}

.help-highlight h4 {
  margin-top: 0;
  color: var(--volt-purple);
  font-size: 1.1rem;
}

.help-highlight p,
.help-highlight ul {
  margin-bottom: 0;
}

/* Services list box */
.services-box {
  background-color: var(--volt-gray-light);
  border: 1px solid var(--volt-gray);
  border-radius: 8px;
  padding: 1.25rem;
  margin: 1rem 0;
}

.services-box ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.5rem;
}

.services-box li {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Code blocks */
.help-content code {
  background-color: var(--volt-gray-light);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
  color: #d63384;
}

/* Tables */
.help-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.95rem;
}

.help-content table th,
.help-content table td {
  border: 1px solid var(--volt-gray);
  padding: 0.75rem;
  text-align: left;
}

.help-content table th {
  background-color: var(--volt-purple);
  color: var(--volt-white);
  font-weight: 600;
}

.help-content table tr:nth-child(even) {
  background-color: var(--volt-gray-light);
}

/* Footer */
.help-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--volt-gray);
  text-align: center;
  background-color: var(--volt-white);
  border-radius: 0 0 12px 12px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(80, 35, 121, 0.1);
}

.help-footer p {
  margin: 0 0 1rem 0;
  color: var(--volt-text-dark);
}

.back-button-bottom {
  display: inline-block;
  margin-top: 0.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .help-page {
    padding: 1rem 0.5rem;
  }

  .help-main {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .help-toc {
    position: relative;
    top: 0;
  }

  .help-content {
    padding: 1.5rem;
  }

  .help-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

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

  .help-content h2 {
    font-size: 1.5rem;
  }

  .help-content h3 {
    font-size: 1.25rem;
  }

  .help-content h4 {
    font-size: 1.1rem;
  }

  .help-footer {
    border-radius: 0 0 8px 8px;
  }

  /* Make tables scrollable on mobile */
  .help-content table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Adjust callout boxes */
  .help-tip,
  .help-warning,
  .help-important {
    padding: 0.75rem 1rem;
  }
}
