/* ============================================================
   Abomate – Help Center Styles (help.abomate.io)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  background: #f4f6fa;
  color: #1d273b;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #066fd1; text-decoration: none; }
a:hover { color: #0559a8; }

/* ── HEADER (Subtle animated background) ────────────────────── */

.help-header {
  background: #0f172a;
  position: relative;
  overflow: hidden;
  padding: 0 0 2.5rem;
  animation: header-fade 12s ease-in-out infinite;
}

@keyframes header-fade {
  0%, 100% { background-color: #0f172a; }
  50% { background-color: #131d32; }
}

.help-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 0;
  position: relative;
  z-index: 2;
}

.help-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.help-logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.help-logo-img {
  height: 28px;
  width: auto;
}

.help-lang {
  display: flex;
  gap: 4px;
}

.help-lang-link {
  color: rgba(255,255,255,.45);
  font-size: .75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all .15s;
}
.help-lang-link:hover { color: rgba(255,255,255,.7); }
.help-lang-link.active { color: #fff; background: rgba(255,255,255,.12); }

.help-header-title {
  color: #fff;
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  line-height: 1.25;
}

/* Search – full width */
.help-search-form {
  position: relative;
}

.help-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  color: rgba(255,255,255,.35);
  pointer-events: none;
}

.help-search-input {
  width: 100%;
  padding: 15px 20px 15px 50px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  font-size: .95rem;
  background: rgba(255,255,255,.07);
  color: #fff;
  outline: none;
  transition: background .2s, border-color .2s;
  backdrop-filter: blur(8px);
}
.help-search-input::placeholder { color: rgba(255,255,255,.35); }
.help-search-input:focus {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.2);
}

/* Floating particles */
.help-header-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  opacity: .5;
}

.p1 { width: 8px;  height: 8px;  background: #6366f1; top: 15%; left: 30%; animation: float1 8s ease-in-out infinite; }
.p2 { width: 5px;  height: 5px;  background: #06b6d4; top: 25%; right: 25%; animation: float2 10s ease-in-out infinite; }
.p3 { width: 12px; height: 12px; background: #8b5cf6; top: 40%; left: 65%; animation: float3 12s ease-in-out infinite; opacity: .3; }
.p4 { width: 6px;  height: 6px;  background: #f59e0b; bottom: 30%; left: 15%; animation: float2 9s ease-in-out infinite; }
.p5 { width: 20px; height: 20px; background: #f59e0b; bottom: 20%; right: 10%; border-radius: 50%; animation: float1 11s ease-in-out infinite; opacity: .15; }
.p6 { width: 4px;  height: 4px;  background: #22d3ee; top: 55%; left: 45%; animation: float3 7s ease-in-out infinite; opacity: .6; }
.p7 { width: 7px;  height: 7px;  background: #a78bfa; bottom: 40%; right: 35%; animation: float1 13s ease-in-out infinite; opacity: .35; }

@keyframes float1 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(12px, -18px); }
}
@keyframes float2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-10px, 14px); }
}
@keyframes float3 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(8px, 10px); }
}

/* ── MAIN ─────────────────────────────────────────────────────── */

.help-main {
  flex: 1;
  padding: 2rem 0 3rem;
}

.help-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── BREADCRUMB ───────────────────────────────────────────────── */

.help-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  color: #667382;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.help-breadcrumb a { color: #667382; }
.help-breadcrumb a:hover { color: #066fd1; }

.help-breadcrumb-sep {
  font-size: .6rem;
  opacity: .5;
  display: flex;
}

.help-breadcrumb-current {
  color: #1d273b;
  font-weight: 500;
}

/* ── COLLECTION GRID (Home) ───────────────────────────────────── */

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1rem;
}

.help-collection-card {
  display: block;
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color .2s, box-shadow .2s;
  color: inherit;
}
.help-collection-card:hover {
  border-color: #c5cad3;
  box-shadow: 0 4px 16px rgba(24, 36, 51, .07);
  color: inherit;
}

.help-collection-icon {
  font-size: 1.75rem;
  color: #066fd1;
  margin-bottom: .75rem;
  line-height: 1;
}

.help-collection-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d273b;
  margin-bottom: .35rem;
}

.help-collection-desc {
  font-size: .85rem;
  color: #667382;
  line-height: 1.5;
  margin-bottom: .75rem;
}

.help-collection-count {
  font-size: .75rem;
  color: #8e99a4;
  font-weight: 500;
}

/* ── COLLECTION HEADER ────────────────────────────────────────── */

.help-collection-header {
  margin-bottom: 1.5rem;
}

.help-collection-header-icon {
  font-size: 2.25rem;
  color: #066fd1;
  margin-bottom: .5rem;
  line-height: 1;
}

.help-collection-header-title {
  font-size: 1.65rem;
  font-weight: 800;
  color: #1d273b;
  margin-bottom: .35rem;
}

.help-collection-header-desc {
  font-size: .9rem;
  color: #667382;
  margin-bottom: .5rem;
}

.help-collection-header-count {
  font-size: .8rem;
  color: #8e99a4;
  font-weight: 500;
}

/* ── ARTICLE LIST ─────────────────────────────────────────────── */

.help-article-list {
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 12px;
  overflow: hidden;
}

.help-article-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f0f1f3;
  color: inherit;
  transition: background .15s;
  gap: 1rem;
}
.help-article-item:last-child { border-bottom: none; }
.help-article-item:hover { background: #f8fafc; color: inherit; }

.help-article-item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.help-article-item-title {
  font-weight: 600;
  font-size: .9rem;
  color: #1d273b;
}

.help-article-item-excerpt {
  font-size: .8rem;
  color: #667382;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.help-article-item-arrow {
  color: #c5cad3;
  font-size: 1rem;
  flex-shrink: 0;
  transition: color .15s, transform .15s;
}
.help-article-item:hover .help-article-item-arrow {
  color: #066fd1;
  transform: translateX(2px);
}

/* ── ARTICLE LAYOUT (with sidebar TOC) ───────────────────────── */

.help-article-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
  align-items: start;
}

.help-article {
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 12px;
  padding: 2.5rem 2.5rem;
  min-width: 0;
}

.help-article-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1d273b;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

/* Table of Contents (Sidebar) */
.help-toc {
  position: sticky;
  top: 2rem;
}

.help-toc-card {
  background: #fff;
  border: 1px solid #e6e7e9;
  border-radius: 12px;
  padding: 1.25rem;
}

.help-toc-title {
  font-size: .75rem;
  font-weight: 700;
  color: #8e99a4;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}

.help-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.help-toc-list li {
  margin-bottom: 2px;
}

.help-toc-list a {
  display: block;
  font-size: .8rem;
  color: #667382;
  padding: 4px 8px;
  border-radius: 6px;
  border-left: 2px solid transparent;
  transition: all .15s;
  line-height: 1.4;
}

.help-toc-list a:hover {
  color: #066fd1;
  background: #f0f6ff;
}

.help-toc-list a.active {
  color: #066fd1;
  border-left-color: #066fd1;
  background: #f0f6ff;
  font-weight: 500;
}

.help-toc-list .toc-h3 {
  padding-left: 18px;
  font-size: .78rem;
}

/* ── Article content styling ─────────────────────────────────── */

.help-article-content {
  font-size: .92rem;
  line-height: 1.75;
  color: #3d4f5f;
}

.help-article-content h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1d273b;
  margin: 2rem 0 .75rem;
  padding-top: .5rem;
}

.help-article-content h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1d273b;
  margin: 1.5rem 0 .5rem;
}

.help-article-content p {
  margin-bottom: 1rem;
}

.help-article-content ul, .help-article-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.help-article-content li {
  margin-bottom: .35rem;
}

.help-article-content strong {
  color: #1d273b;
  font-weight: 600;
}

/* ── Images & GIFs ───────────────────────────────────────────── */
/* Usage: <img src="..." alt="...">
   or with caption: <figure><img src="..."><figcaption>Text</figcaption></figure>
   or clickable:    <a href="full.png" class="lightbox"><img src="thumb.png"></a>  */

.help-article-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.25rem 0;
  border: 1px solid #e6e7e9;
  box-shadow: 0 2px 8px rgba(24, 36, 51, .06);
  cursor: zoom-in;
  transition: box-shadow .2s;
}

.help-article-content img:hover {
  box-shadow: 0 4px 16px rgba(24, 36, 51, .12);
}

/* Figure with caption */
.help-article-content figure {
  margin: 1.5rem 0;
  padding: 0;
}

.help-article-content figure img {
  margin-bottom: .5rem;
}

.help-article-content figcaption {
  font-size: .8rem;
  color: #8e99a4;
  text-align: center;
  font-style: italic;
}

/* Screenshot container – constrains width for smaller screenshots */
.help-article-content .screenshot {
  display: block;
  margin: 1.5rem auto;
  max-width: 680px;
}

/* Full-width image (e.g. dashboard overview) */
.help-article-content .img-full {
  max-width: 100%;
  width: 100%;
}

/* Inline badge/icon-size image */
.help-article-content .img-inline {
  display: inline;
  margin: 0 2px;
  vertical-align: middle;
  border: none;
  box-shadow: none;
  border-radius: 4px;
  height: 1.4em;
  width: auto;
  cursor: default;
}

/* Side-by-side images */
.help-article-content .img-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.help-article-content .img-row img {
  margin: 0;
  width: 100%;
}

/* ── Videos ──────────────────────────────────────────────────── */
/* Usage: <div class="video-embed"><iframe src="..."></iframe></div>
   or local: <video src="demo.mp4" controls></video>
   or GIF-like: <video src="demo.mp4" autoplay loop muted playsinline></video> */

.help-article-content video {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 1.5rem 0;
  border: 1px solid #e6e7e9;
  box-shadow: 0 2px 8px rgba(24, 36, 51, .06);
  background: #000;
}

/* Responsive video embed (YouTube, Vimeo, Loom) */
.help-article-content .video-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  margin: 1.5rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e6e7e9;
  box-shadow: 0 2px 8px rgba(24, 36, 51, .06);
  background: #000;
}

.help-article-content .video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* GIF indicator badge */
.help-article-content .gif-badge {
  position: relative;
  display: inline-block;
}

.help-article-content .gif-badge::after {
  content: 'GIF';
  position: absolute;
  top: 1.6rem;
  right: .6rem;
  background: rgba(0,0,0,.6);
  color: #fff;
  font-size: .6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: .03em;
}

/* ── Step-by-step instructions ───────────────────────────────── */
/* Usage: <div class="step"><div class="step-number">1</div><div class="step-content">...</div></div> */

.help-article-content .step {
  display: flex;
  gap: 1rem;
  margin: 1.25rem 0;
  align-items: flex-start;
}

.help-article-content .step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: #066fd1;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  margin-top: 2px;
}

.help-article-content .step-content {
  flex: 1;
  min-width: 0;
}

.help-article-content .step-content img {
  margin-top: .75rem;
}

/* ── Callout boxes ───────────────────────────────────────────── */

.help-article-content code {
  background: #f1f3f5;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .85em;
  color: #e64980;
}

.help-article-content pre {
  background: #1d273b;
  color: #e6e7e9;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1rem;
  font-size: .82rem;
  line-height: 1.6;
}

.help-article-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.help-article-content blockquote {
  border-left: 3px solid #066fd1;
  padding: .75rem 1rem;
  margin: 1rem 0;
  background: #f0f6ff;
  border-radius: 0 8px 8px 0;
  color: #1d273b;
  font-size: .88rem;
}

.help-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: .85rem;
}

.help-article-content th,
.help-article-content td {
  border: 1px solid #e6e7e9;
  padding: .5rem .75rem;
  text-align: left;
}

.help-article-content th {
  background: #f8fafc;
  font-weight: 600;
  color: #1d273b;
}

/* Info box */
.help-article-content .info-box {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #f0f6ff;
  border-radius: 8px;
  border-left: 3px solid #066fd1;
  margin: 1rem 0;
  font-size: .88rem;
}

/* Warning box */
.help-article-content .warning-box {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #fff8f0;
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
  margin: 1rem 0;
  font-size: .88rem;
}

/* Success box */
.help-article-content .success-box {
  display: flex;
  gap: .75rem;
  padding: 1rem 1.25rem;
  background: #f0fdf4;
  border-radius: 8px;
  border-left: 3px solid #22c55e;
  margin: 1rem 0;
  font-size: .88rem;
}

/* ── Lightbox overlay (click to enlarge) ─────────────────────── */

.help-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-out;
  padding: 2rem;
  opacity: 0;
  transition: opacity .2s;
}
.help-lightbox-overlay.active { opacity: 1; }

.help-lightbox-overlay img {
  max-width: 95%;
  max-height: 95vh;
  border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,.4);
}

/* ── SEARCH ───────────────────────────────────────────────────── */

.help-search-heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1d273b;
  margin-bottom: 1rem;
}

/* ── EMPTY STATE ──────────────────────────────────────────────── */

.help-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: #667382;
}

.help-empty p { margin-top: .5rem; }

.help-back-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 1rem;
  font-size: .85rem;
  color: #066fd1;
}

/* ── FOOTER ───────────────────────────────────────────────────── */

.help-footer {
  text-align: center;
  padding: 2rem 1rem;
  font-size: .78rem;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.help-footer a { color: #999; }
.help-footer a:hover { color: #667382; }

.help-footer-dot { color: #ccc; }

/* ── RESPONSIVE ───────────────────────────────────────────────── */

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

  .help-toc {
    position: static;
    order: -1;
  }

  .help-toc-card {
    margin-bottom: 1rem;
  }
}

@media (max-width: 640px) {
  .help-header-title {
    font-size: 1.35rem;
  }

  .help-header-inner {
    padding: 1.25rem 1rem 0;
  }

  .help-header-top {
    margin-bottom: 1.75rem;
  }

  .help-container {
    padding: 0 1rem;
  }

  .help-search-input {
    padding: 12px 16px 12px 44px;
    font-size: .88rem;
  }

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

  .help-collection-card {
    padding: 1.25rem;
  }

  .help-article {
    padding: 1.25rem 1rem;
  }

  .help-article-title {
    font-size: 1.3rem;
  }

  .help-collection-header-title {
    font-size: 1.35rem;
  }

  .help-article-content .img-row {
    grid-template-columns: 1fr;
  }

  .help-article-content .step {
    flex-direction: column;
    gap: .5rem;
  }
}
