/* Masquerading Help Center - Intercom Style (Light Mode) */

:root {
  --brand-green: #97C12F;
  --brand-green-hover: #86aa29;
  --brand-red: #C42217;
  --brand-blue: #2B46BD;
  --brand-yellow: #EDD947;
  --slate-900: #0F172A;
  --slate-600: #475569;
  --slate-200: #E2E8F0;
  --slate-50: #F8FAFC;
  --white: #FFFFFF;
}

/* Font Loading */
@font-face {
  font-family: 'TheBoldFont';
  src: url('../assets/fonts/theboldfont.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Hero';
  src: url('../assets/fonts/Hero%20Regular%20400.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Hero';
  src: url('../assets/fonts/Hero%20Light%20200.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: optional;
}

@font-face {
  font-family: 'Hero';
  src: url('../assets/fonts/Hero%20Bold%20700.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: optional;
}

/* Base Styles */
body {
  font-family: 'Hero', Arial, Helvetica, sans-serif;
  color: var(--slate-600);
  background-color: var(--white);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'TheBoldFont', Arial Black, Impact, sans-serif;
  color: var(--slate-900);
  font-weight: normal;
}

/* Search Bar */
.help-search {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.help-search input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border: 2px solid var(--slate-200);
  border-radius: 12px;
  font-size: 16px;
  transition: all 0.2s;
}

.help-search input:focus {
  outline: none;
  border-color: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(151, 193, 47, 0.1);
}

.help-search i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--slate-600);
  z-index: 10;
}

/* Live Search Dropdown */
#search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  max-height: 500px;
  overflow-y: auto;
  z-index: 1000;
}

.search-dropdown-item {
  display: block;
  padding: 16px 20px;
  border-bottom: 1px solid var(--slate-200);
  text-decoration: none;
  transition: background-color 0.15s;
}

.search-dropdown-item:hover {
  background-color: var(--slate-50);
}

.search-dropdown-item:last-of-type {
  border-bottom: none;
}

.search-dropdown-item-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--slate-900);
  margin-bottom: 6px;
  line-height: 1.4;
}

.search-dropdown-item-snippet {
  font-size: 13px;
  color: var(--slate-600);
  line-height: 1.5;
  margin-bottom: 4px;
}

.search-dropdown-item-collection {
  font-size: 11px;
  color: var(--brand-green);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.search-dropdown-empty {
  padding: 32px 20px;
  text-align: center;
}

.search-dropdown-empty p {
  color: var(--slate-900);
  font-weight: 600;
  margin-bottom: 4px;
}

.search-dropdown-empty span {
  color: var(--slate-600);
  font-size: 14px;
}

.search-dropdown-footer {
  padding: 12px 20px;
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  border-radius: 0 0 12px 12px;
}

.search-dropdown-view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-green);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.15s;
}

.search-dropdown-view-all:hover {
  color: var(--brand-green-hover);
}

.search-dropdown-view-all i {
  position: static;
  transform: none;
  font-size: 12px;
}

/* Article Page Search Bar */
.article-search-bar {
  background: var(--slate-50);
  padding: 20px 0;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--slate-200);
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

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

/* Navigation Buttons */
.article-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--slate-200);
  flex-wrap: wrap;
  gap: 16px;
  max-width: 100%;
  width: 100%;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-radius: 8px;
  color: var(--slate-900);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s;
}

.back-button:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
  background: rgba(151, 193, 47, 0.05);
}

.back-button i {
  font-size: 12px;
}

/* Collection Cards */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 48px;
}

.collection-card {
  background: var(--white);
  border: 2px solid var(--slate-200);
  border-radius: 16px;
  padding: 32px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: block;
}

.collection-card:hover {
  border-color: var(--brand-green);
  box-shadow: 0 4px 12px rgba(151, 193, 47, 0.15);
  transform: translateY(-2px);
}

.collection-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(151, 193, 47, 0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--brand-green);
  font-size: 24px;
}

.collection-card h2,
.collection-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  color: var(--slate-900);
}

.collection-card p {
  color: var(--slate-600);
  font-size: 14px;
  margin: 0;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
  padding: 12px 0 16px 0;
  font-size: 14px;
  color: var(--slate-600);
  min-height: 32px;
  visibility: visible;
  opacity: 1;
}

.breadcrumbs:empty {
  display: none;
}

.breadcrumbs a {
  color: var(--brand-green);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  text-decoration: underline;
  color: var(--brand-green-hover);
}

.breadcrumbs span {
  color: var(--slate-600);
  margin: 0 4px;
}

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

.article-item {
  border-bottom: 1px solid var(--slate-200);
  padding: 20px 0;
}

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

.article-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  color: var(--slate-900);
  transition: color 0.2s;
}

.article-item a:hover {
  color: var(--brand-green);
}

.article-item-title {
  font-weight: 600;
  font-size: 16px;
}

.article-item-arrow {
  color: var(--slate-600);
  font-size: 14px;
}

/* Article Content */
.article-header {
  margin-bottom: 32px;
}

.article-title {
  font-size: 42px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.article-meta {
  color: var(--slate-600);
  font-size: 14px;
  margin-bottom: 32px;
}

.article-content {
  max-width: 100%;
  width: 100%;
}

article.article-content {
  max-width: 100%;
  width: 100%;
}

.article-content h2 {
  font-size: 28px;
  margin-top: 48px;
  margin-bottom: 16px;
}

.article-content h3 {
  font-size: 22px;
  margin-top: 32px;
  margin-bottom: 12px;
}

.article-content p {
  margin-bottom: 16px;
  line-height: 1.7;
}

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

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

.article-content code {
  background: var(--slate-50);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
}

.article-content pre {
  background: var(--slate-50);
  padding: 16px;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
}

/* Review Banner */
.review-banner {
  background: var(--brand-yellow);
  border-left: 4px solid var(--brand-red);
  padding: 12px 16px;
  margin: 24px 0;
  border-radius: 4px;
  font-size: 14px;
  color: var(--slate-900);
}

/* Related Articles */
.related-articles {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 2px solid var(--slate-200);
  max-width: 100%;
  width: 100%;
}

.related-articles h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.related-article-card {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: all 0.2s;
}

.related-article-card:hover {
  border-color: var(--brand-green);
  background: var(--white);
}

.related-article-card h4 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--slate-900);
}

.related-article-card p {
  font-size: 14px;
  color: var(--slate-600);
  margin: 0;
}

/* Feedback Widget */
.feedback-widget {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid var(--slate-200);
  max-width: 100%;
  width: 100%;
}

.feedback-buttons {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.feedback-btn {
  padding: 8px 20px;
  border: 2px solid var(--slate-200);
  background: var(--white);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
}

.feedback-btn:hover {
  border-color: var(--brand-green);
  color: var(--brand-green);
}

.feedback-btn.active {
  border-color: var(--brand-green);
  background: var(--brand-green);
  color: var(--white);
}

/* Header */
.help-header {
  background: var(--white);
  border-bottom: 1px solid var(--slate-200);
  padding: 20px 0;
  margin-bottom: 40px;
}

.help-header-content {
  max-width: 56rem; /* 896px - same as changelog */
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.help-logo {
  height: 40px;
}

.help-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.help-nav a {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 14px;
}

.help-nav a:hover {
  color: var(--brand-green);
}

/* Footer */
.help-footer {
  background: var(--slate-50);
  border-top: 1px solid var(--slate-200);
  padding: 40px 0;
  margin-top: 80px;
}

.help-footer-content {
  max-width: 56rem; /* 896px - same as changelog */
  margin: 0 auto;
  padding: 0 16px;
}

.help-footer-links {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.help-footer-links a {
  color: var(--slate-600);
  text-decoration: none;
  font-size: 14px;
}

.help-footer-links a:hover {
  color: var(--brand-green);
}

.help-footer-copyright {
  color: var(--slate-600);
  font-size: 14px;
}

/* Container - matches changelog max-w-4xl (896px) */
.help-container {
  max-width: 56rem; /* 896px - same as changelog */
  margin: 0 auto;
  padding-left: 16px !important;
  padding-right: 16px !important;
  width: 100%;
  box-sizing: border-box;
}

/* Ensure all direct children of help-container respect the max-width */
.help-container > * {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure article and collection content stays within bounds */
.help-container article,
.help-container .article-content,
.help-container .collection-header,
.help-container .article-group,
.help-container .article-list,
.help-container .collection-grid {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

/* Collection Header */
.collection-header {
  margin-bottom: 48px;
  max-width: 100%;
  width: 100%;
}

.collection-header-icon {
  width: 64px;
  height: 64px;
  background: rgba(151, 193, 47, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--brand-green);
  font-size: 32px;
}

.collection-header h1 {
  font-size: 48px;
  margin-bottom: 16px;
}

.collection-header p {
  font-size: 18px;
  color: var(--slate-600);
  max-width: 700px;
}

/* Article Groups */
.article-group {
  margin-bottom: 48px;
  max-width: 100%;
  width: 100%;
}

.article-group-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--slate-600);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--slate-200);
}

/* Responsive */
@media (max-width: 768px) {
  /* Match changelog mobile margins - px-4 = 16px */
  .help-container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }
  
  .help-header-content {
    padding: 0 16px;
    flex-direction: column;
    gap: 16px;
  }
  
  .help-footer-content {
    padding: 0 16px;
  }
  
  .collection-grid {
    grid-template-columns: 1fr;
  }
  
  .article-title {
    font-size: 32px;
  }
  
  .help-nav {
    flex-direction: column;
    gap: 12px;
  }
}
