/**
 * ManiBot Help Modal Styling - Light Clean Theme
 * Matches AAOI Analysis History modal style
 */

/* ========== MODAL OVERLAY ========== */
.help-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: helpModalFadeIn 0.2s ease-out;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

.help-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
}

/* ========== MODAL CONTENT - LIGHT CLEAN THEME ========== */
.help-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 
    0 24px 48px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  animation: helpModalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* ========== HEADER - LIGHT CLEAN THEME ========== */
.help-modal-header {
  padding: 24px 32px 20px 32px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
  background: #ffffff;
}

.help-modal-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.help-modal-icon {
  font-size: 32px;
  line-height: 1;
  color: #1f2937;
}

.help-modal-title-row h2 {
  flex: 1;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  font-family: 'Inter', sans-serif;
}

.help-modal-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  border-radius: 8px;
  color: #6b7280;
  transition: all 0.2s;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-modal-close:hover {
  background: #f3f4f6;
  color: #111827;
}

.help-modal-close .material-icons {
  font-size: 24px;
}

/* ========== SEARCH - LIGHT CLEAN THEME ========== */
.help-modal-search {
  position: relative;
  display: flex;
  align-items: center;
  background: #f9fafb;
  border-radius: 12px;
  padding: 0 16px;
  transition: all 0.2s;
  border: 1px solid #e5e7eb;
}

.help-modal-search:focus-within {
  background: #ffffff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.help-modal-search .material-icons {
  color: #9ca3af;
  font-size: 20px;
  margin-right: 8px;
}

.help-modal-search input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 0;
  font-size: 15px;
  color: #111827;
  outline: none;
  font-family: 'Inter', sans-serif;
}

.help-modal-search input::placeholder {
  color: #9ca3af;
}

/* ========== TABS - LIGHT CLEAN THEME ========== */
.help-modal-tabs {
  display: flex;
  gap: 4px;
  padding: 16px 32px 0 32px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
}

.help-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  border-radius: 8px 8px 0 0;
}

.help-tab .material-icons {
  font-size: 20px;
}

.help-tab:hover {
  color: #111827;
  background: #f9fafb;
}

.help-tab.active {
  color: #3b82f6;
  border-bottom-color: #3b82f6;
  background: transparent;
}

/* ========== BODY - LIGHT CLEAN THEME ========== */
.help-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px;
  background: #f9fafb;
}

.help-modal-body::-webkit-scrollbar {
  width: 8px;
}

.help-modal-body::-webkit-scrollbar-track {
  background: #f3f4f6;
}

.help-modal-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.help-modal-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* ========== CONTENT SECTIONS - LIGHT CLEAN THEME ========== */
.help-section {
  color: #4b5563;
}

.help-section h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: #111827;
}

.help-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 24px 0 12px 0;
  color: #1f2937;
}

.help-section p {
  font-size: 15px;
  line-height: 1.6;
  color: #6b7280;
  margin: 0 0 16px 0;
}

.help-section strong {
  color: #111827;
  font-weight: 600;
}

.help-section ul {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.help-section li {
  font-size: 15px;
  line-height: 1.6;
  color: #6b7280;
  margin-bottom: 8px;
}

/* ========== PAGE HEADER - LIGHT CLEAN THEME ========== */
.help-page-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 24px;
  background: linear-gradient(135deg, #dbeafe 0%, #e0e7ff 100%);
  border-radius: 16px;
  margin-bottom: 24px;
  border: 1px solid #bfdbfe;
}

.help-page-icon {
  font-size: 48px;
  line-height: 1;
  flex-shrink: 0;
  color: #3b82f6;
}

.help-page-header h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  color: #111827;
  font-weight: 700;
}

.help-description {
  font-size: 15px;
  color: #6b7280;
  margin: 0;
}

/* ========== OVERVIEW CONTENT ========== */
.help-overview-content {
  background: #ffffff;
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 24px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.help-overview-content h4 {
  margin-top: 0;
  color: #111827;
}

/* ========== QUICK LINKS - LIGHT CLEAN THEME ========== */
.help-quick-links h4 {
  margin-bottom: 16px;
  color: #111827;
  font-weight: 600;
}

.help-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.help-quick-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-quick-link:hover {
  background: #ffffff;
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.help-quick-link .material-icons {
  color: #3b82f6;
  font-size: 24px;
}

.help-quick-link strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.help-quick-link p {
  font-size: 13px;
  color: #6b7280;
  margin: 0;
}

/* ========== GUIDE SECTIONS - LIGHT CLEAN THEME ========== */
.help-guide-section {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.help-guide-section:last-child {
  border-bottom: none;
}

/* ========== STEPS - LIGHT CLEAN THEME ========== */
.help-steps {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.help-step {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  padding: 20px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #3b82f6;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.help-step-content {
  flex: 1;
}

.help-step-content strong {
  display: block;
  margin-bottom: 6px;
  color: #111827;
  font-weight: 600;
  font-size: 15px;
}

.help-step-content p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* ========== TIPS & NOTES - LIGHT CLEAN THEME ========== */
.help-tips {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 20px;
  border-radius: 8px;
  margin: 16px 0;
}

.help-tips strong {
  display: block;
  color: #1e40af;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}

.help-tips ul {
  margin: 0;
  padding-left: 20px;
}

.help-tips li {
  color: #1e40af;
}

.help-note {
  background: #fef3c7;
  border-left: 4px solid #f59e0b;
  padding: 14px 20px;
  border-radius: 8px;
  margin: 12px 0;
  font-size: 14px;
  color: #92400e;
}

/* ========== FEATURES GRID - LIGHT CLEAN THEME ========== */
.help-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin: 16px 0;
}

.help-feature-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  transition: all 0.2s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-feature-card:hover {
  border-color: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.help-feature-card strong {
  display: block;
  color: #111827;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 600;
}

.help-feature-card p {
  margin: 0;
  color: #6b7280;
  font-size: 14px;
}

/* ========== FAQ ACCORDION - LIGHT CLEAN THEME ========== */
.help-faq {
  margin: 16px 0;
}

.help-faq-item {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-faq-question {
  width: 100%;
  text-align: left;
  padding: 18px 20px;
  background: none;
  border: none;
  color: #111827;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.help-faq-question:hover {
  background: #f9fafb;
}

.help-faq-question .material-icons {
  color: #3b82f6;
  transition: transform 0.3s;
}

.help-faq-item.expanded .help-faq-question .material-icons {
  transform: rotate(180deg);
}

.help-faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.help-faq-item.expanded .help-faq-answer {
  max-height: 500px;
}

.help-faq-answer-content {
  padding: 0 20px 20px 20px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
}

/* ========== FOOTER - LIGHT CLEAN THEME ========== */
.help-modal-footer {
  padding: 20px 32px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #ffffff;
  flex-shrink: 0;
}

.help-btn-primary {
  padding: 12px 28px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.help-btn-primary:hover {
  background: #2563eb;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.help-btn-secondary {
  padding: 12px 28px;
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.help-btn-secondary:hover {
  background: #f9fafb;
  border-color: #d1d5db;
  transform: translateY(-1px);
}

.help-btn-secondary .material-icons,
.help-btn-primary .material-icons {
  font-size: 18px;
}

/* ========== EMPTY & NO CONTENT STATES ========== */
.help-no-content,
.help-no-results {
  text-align: center;
  padding: 48px 24px;
  color: #6b7280;
}

.help-no-content .material-icons,
.help-no-results .material-icons {
  font-size: 48px;
  color: #9ca3af;
  margin-bottom: 16px;
}

/* ========== SEARCH HIGHLIGHTING ========== */
mark {
  background: #dbeafe;
  color: #1e40af;
  padding: 2px 4px;
  border-radius: 3px;
}

/* ========== BADGE/PILL STYLING (like "LATEST" in screenshot) ========== */
.help-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  background: #3b82f6;
  color: white;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== ANIMATIONS ========== */
@keyframes helpModalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes helpModalSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .help-modal-content {
    width: 95%;
    max-height: 90vh;
    border-radius: 16px;
  }

  .help-modal-header {
    padding: 20px 20px 16px 20px;
  }

  .help-modal-body {
    padding: 20px;
  }

  .help-modal-footer {
    padding: 16px 20px;
  }

  .help-page-header {
    flex-direction: column;
    padding: 20px;
  }

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

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

  .help-modal-title-row h2 {
    font-size: 24px;
  }
}

/* ========== ACCESSIBILITY ========== */
.help-modal-content:focus {
  outline: none;
}

.help-tab:focus,
.help-quick-link:focus,
.help-btn-primary:focus,
.help-btn-secondary:focus,
.help-faq-question:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Skip redundant keyboard indicators when using mouse */
.help-modal-content *:focus:not(:focus-visible) {
  outline: none;
}

/* ========== ADDITIONAL ELEMENTS ========== */
.help-settings,
.help-categories,
.help-metrics,
.help-providers,
.help-options,
.help-widgets,
.help-charts,
.help-courses {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.help-setting-item,
.help-category-item,
.help-metric-item,
.help-provider-item,
.help-option-item,
.help-widget-item,
.help-chart-item,
.help-course-item {
  background: #ffffff;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.help-setting-item strong,
.help-category-item strong,
.help-metric-item strong,
.help-provider-item strong,
.help-option-item strong,
.help-widget-item strong,
.help-chart-item strong,
.help-course-item strong {
  display: block;
  color: #111827;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
}

.help-setting-item p,
.help-category-item p,
.help-metric-item p,
.help-provider-item p,
.help-option-item p,
.help-widget-item p,
.help-chart-item p,
.help-course-item p {
  color: #6b7280;
  font-size: 13px;
  margin: 0;
}
