/**
 * Help System Styles
 */

/* Variables */
:root {
  --help-primary: #1A237E;
  --help-primary-light: #3949AB;
  --help-accent: #FFB300;
  --help-success: #4CAF50;
  --help-bg: #f8f9fa;
  --help-card-bg: #ffffff;
  --help-text: #333333;
  --help-text-muted: #6c757d;
  --help-border: #e0e0e0;
  --help-radius: 8px;
  --help-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Layout */
.help-center,
.help-category-page,
.help-article-page,
.help-faq-page,
.help-search-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Breadcrumb */
.help-breadcrumb {
  margin-bottom: 24px;
  font-size: 14px;
}

.help-breadcrumb a {
  color: var(--help-primary);
  text-decoration: none;
}

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

.help-breadcrumb .separator {
  margin: 0 8px;
  color: var(--help-text-muted);
}

.help-breadcrumb .current {
  color: var(--help-text-muted);
}

/* Search Box */
.help-search-box {
  background: linear-gradient(135deg, var(--help-primary), var(--help-primary-light));
  padding: 40px 20px;
  border-radius: var(--help-radius);
  margin-bottom: 30px;
  text-align: center;
}

.help-search-form {
  max-width: 600px;
  margin: 0 auto;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--help-radius);
  padding: 8px 16px;
  box-shadow: var(--help-shadow);
}

.search-input-wrapper i {
  color: var(--help-text-muted);
  margin-right: 12px;
}

.help-search-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 16px;
  padding: 8px 0;
}

.search-input-wrapper .btn {
  margin-left: 12px;
}

/* Sections */
.help-section {
  margin-bottom: 40px;
}

.help-section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--help-text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.help-section h2 i {
  color: var(--help-primary);
}

/* Category Cards */
.help-categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.help-category-card {
  display: flex;
  align-items: center;
  padding: 20px;
  background: var(--help-card-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  text-decoration: none;
  color: var(--help-text);
  transition: all 0.2s;
}

.help-category-card:hover {
  border-color: var(--help-primary);
  box-shadow: var(--help-shadow);
  transform: translateY(-2px);
}

.category-icon {
  width: 48px;
  height: 48px;
  background: var(--help-primary);
  color: white;
  border-radius: var(--help-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-right: 16px;
  flex-shrink: 0;
}

.category-info {
  flex: 1;
}

.category-info h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px 0;
}

.category-info p {
  font-size: 13px;
  color: var(--help-text-muted);
  margin: 0;
}

.help-category-card > i.fa-chevron-right {
  color: var(--help-text-muted);
  font-size: 14px;
}

/* Article List */
.help-article-list,
.articles-list,
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-article-list li,
.articles-list li {
  border-bottom: 1px solid var(--help-border);
}

.help-article-list li:last-child,
.articles-list li:last-child {
  border-bottom: none;
}

.help-article-list a,
.articles-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  text-decoration: none;
  color: var(--help-text);
  transition: background 0.2s;
}

.help-article-list a:hover,
.articles-list a:hover {
  background: var(--help-bg);
}

.article-views {
  font-size: 12px;
  color: var(--help-text-muted);
}

.article-item a {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.article-content h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--help-primary);
}

.article-content p {
  margin: 0;
  font-size: 14px;
  color: var(--help-text-muted);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--help-text-muted);
  font-size: 13px;
}

/* FAQ Accordion */
.faq-list {
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  overflow: hidden;
}

.faq-item {
  border-bottom: 1px solid var(--help-border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: var(--help-card-bg);
  border: none;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  color: var(--help-text);
  transition: background 0.2s;
}

.faq-question:hover {
  background: var(--help-bg);
}

.faq-question i {
  color: var(--help-text-muted);
  transition: transform 0.2s;
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  display: none;
  padding: 0 20px 20px;
  background: var(--help-bg);
  font-size: 14px;
  line-height: 1.6;
}

.faq-item.open .faq-answer {
  display: block;
}

.faq-feedback {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--help-border);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--help-text-muted);
}

.btn-feedback-small {
  padding: 4px 8px;
  border: 1px solid var(--help-border);
  border-radius: 4px;
  background: white;
  cursor: pointer;
  font-size: 12px;
}

.btn-feedback-small:hover {
  border-color: var(--help-primary);
}

/* Article Page */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
}

@media (max-width: 900px) {
  .article-layout {
    grid-template-columns: 1fr;
  }
}

.article-main {
  background: var(--help-card-bg);
  padding: 32px;
  border-radius: var(--help-radius);
  border: 1px solid var(--help-border);
}

.article-header h1 {
  font-size: 28px;
  margin: 0 0 16px 0;
}

.article-header .article-meta {
  display: flex;
  gap: 20px;
  color: var(--help-text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--help-border);
}

.article-content {
  line-height: 1.7;
  font-size: 15px;
}

.article-content h2 {
  font-size: 20px;
  margin: 32px 0 16px;
}

.article-content h3 {
  font-size: 17px;
  margin: 24px 0 12px;
}

.article-content ul,
.article-content ol {
  margin: 16px 0;
  padding-left: 24px;
}

.article-content li {
  margin: 8px 0;
}

.article-content code {
  background: var(--help-bg);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 14px;
}

.article-content pre {
  background: #282c34;
  color: #abb2bf;
  padding: 16px;
  border-radius: var(--help-radius);
  overflow-x: auto;
}

.article-feedback {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--help-border);
  text-align: center;
}

.article-feedback p {
  margin-bottom: 16px;
  color: var(--help-text-muted);
}

.feedback-buttons {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-feedback {
  padding: 8px 16px;
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-feedback:hover {
  border-color: var(--help-primary);
}

/* Sidebar */
.article-sidebar {
  position: sticky;
  top: 20px;
}

.sidebar-section {
  background: var(--help-card-bg);
  padding: 20px;
  border-radius: var(--help-radius);
  border: 1px solid var(--help-border);
  margin-bottom: 20px;
}

.sidebar-section h3 {
  font-size: 15px;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--help-border);
}

.related-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--help-border);
}

.related-list li:last-child {
  border-bottom: none;
}

.related-list a {
  color: var(--help-primary);
  text-decoration: none;
  font-size: 14px;
}

.related-list a:hover {
  text-decoration: underline;
}

/* Contact Section */
.help-contact {
  background: var(--help-bg);
  padding: 40px;
  border-radius: var(--help-radius);
  text-align: center;
}

.contact-options {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.contact-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--help-primary);
  color: white;
  border-radius: var(--help-radius);
  text-decoration: none;
  transition: background 0.2s;
}

.contact-option:hover {
  background: var(--help-primary-light);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--help-radius);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--help-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--help-primary-light);
}

.btn-outline {
  background: transparent;
  color: var(--help-primary);
  border: 1px solid var(--help-primary);
}

.btn-outline:hover {
  background: var(--help-primary);
  color: white;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

/* Search Results */
.search-header {
  margin-bottom: 30px;
}

.search-summary {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--help-bg);
  border-radius: var(--help-radius);
}

.search-section {
  margin-bottom: 32px;
}

.search-results-list {
  list-style: none;
  padding: 0;
}

.search-result {
  border-bottom: 1px solid var(--help-border);
}

.search-result a {
  display: block;
  padding: 20px;
  text-decoration: none;
  color: var(--help-text);
  transition: background 0.2s;
}

.search-result a:hover {
  background: var(--help-bg);
}

.search-result h3 {
  color: var(--help-primary);
  margin: 0 0 8px 0;
  font-size: 17px;
}

.search-result p {
  margin: 0 0 8px 0;
  font-size: 14px;
  color: var(--help-text-muted);
}

.result-meta {
  font-size: 12px;
  color: var(--help-text-muted);
}

/* Empty States */
.no-articles,
.no-faqs,
.no-results,
.search-prompt {
  text-align: center;
  padding: 60px 20px;
  color: var(--help-text-muted);
}

.no-articles i,
.no-faqs i,
.no-results i,
.search-prompt i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.no-results h2 {
  color: var(--help-text);
  margin-bottom: 12px;
}

.search-suggestions {
  text-align: left;
  max-width: 300px;
  margin: 20px auto;
}

/* Category Page Header */
.category-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--help-border);
}

.category-icon-large {
  width: 64px;
  height: 64px;
  background: var(--help-primary);
  color: white;
  border-radius: var(--help-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.category-header h1 {
  margin: 0 0 8px 0;
}

.category-header p {
  margin: 0;
  color: var(--help-text-muted);
}

/* FAQ Page */
.faq-header {
  text-align: center;
  margin-bottom: 30px;
}

.faq-header h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.faq-search {
  max-width: 500px;
  margin: 0 auto 30px;
}

#faq-filter {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  font-size: 15px;
}

.faq-contact {
  text-align: center;
  margin-top: 40px;
  padding: 40px;
  background: var(--help-bg);
  border-radius: var(--help-radius);
}

.view-all-faqs {
  text-align: center;
  margin-top: 20px;
}

/* Featured Cards */
.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.help-card {
  display: block;
  padding: 20px;
  background: var(--help-card-bg);
  border: 1px solid var(--help-border);
  border-radius: var(--help-radius);
  text-decoration: none;
  color: var(--help-text);
  transition: all 0.2s;
}

.help-card:hover {
  border-color: var(--help-primary);
  box-shadow: var(--help-shadow);
}

.help-card.featured {
  border-left: 4px solid var(--help-accent);
}

.help-card h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--help-primary);
}

.help-card p {
  margin: 0;
  font-size: 14px;
  color: var(--help-text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .help-categories-grid {
    grid-template-columns: 1fr;
  }

  .help-grid {
    grid-template-columns: 1fr;
  }

  .contact-options {
    flex-direction: column;
  }

  .category-header {
    flex-direction: column;
    text-align: center;
  }
}
