/* Wave N3 · in-app Help widget · floating "?" + slide-over panel.
   Scoped under .akc-help so it never bleeds into host page CSS. */

.akc-help-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: linear-gradient(135deg, #6c5ce7 0%, #00b894 100%);
  color: #fff;
  font: 700 22px/1 'Plus Jakarta Sans', system-ui, sans-serif;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.18), 0 2px 6px rgba(0, 0, 0, 0.10);
  z-index: 9100;
  transition: transform .18s ease, box-shadow .18s ease;
}
.akc-help-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 10px 30px rgba(0,0,0,.22); }
.akc-help-fab:focus-visible { outline: 3px solid #ffd86b; outline-offset: 3px; }
.akc-help-fab[hidden] { display: none; }

/* If another FAB lives bottom-right, stack ours up. Detected via data-attr from JS.
   Values chosen so help "?" clears: raise-hand (44px @ bottom 20 = 64px) +
   tutor launcher (64px @ bottom 24 = 88px) with a comfortable gap on each. */
.akc-help-fab[data-stack="up"]     { bottom: 96px !important; }
.akc-help-fab[data-stack="upper"]  { bottom: 168px !important; }
.akc-help-fab[data-corner="bl"]    { right: auto; left: 18px; }

/* Panel · slide-over from right (drawer on desktop, sheet on mobile) */
.akc-help-overlay {
  position: fixed; inset: 0;
  background: rgba(13, 17, 28, 0.36);
  backdrop-filter: blur(2px);
  z-index: 9200;
  opacity: 0;
  transition: opacity .18s ease;
}
.akc-help-overlay[data-open="true"] { opacity: 1; }

.akc-help-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 100vw);
  background: #fff;
  color: #0d111c;
  z-index: 9300;
  display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.2,.7,.2,1);
  font: 14px/1.5 'Inter', system-ui, sans-serif;
}
.akc-help-panel[data-open="true"] { transform: translateX(0); }

.akc-help-head {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid #eef0f4;
  background: linear-gradient(135deg, #f7f5ff 0%, #f0fbf6 100%);
}
.akc-help-head h2 {
  margin: 0; flex: 1;
  font: 700 17px/1.2 'Plus Jakarta Sans', system-ui, sans-serif;
}
.akc-help-head .akc-help-spark {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #ffd86b 50%, #f4a623 100%);
  display: inline-block; flex: 0 0 28px;
}
.akc-help-close {
  border: 0; background: transparent; cursor: pointer;
  font-size: 22px; color: #555; padding: 4px 8px; border-radius: 6px;
}
.akc-help-close:hover { background: rgba(0,0,0,.05); }

.akc-help-body { flex: 1; overflow: auto; padding: 14px 18px 18px; }

.akc-help-tabs {
  display: flex; gap: 4px; margin: 0 -2px 12px;
  border-bottom: 1px solid #eef0f4;
}
.akc-help-tab {
  flex: 1; border: 0; background: transparent; cursor: pointer;
  padding: 9px 10px; font: 600 13px/1 'Inter', system-ui, sans-serif;
  color: #555; border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.akc-help-tab[aria-selected="true"] { color: #6c5ce7; border-bottom-color: #6c5ce7; }
.akc-help-tab:focus-visible { outline: 2px solid #6c5ce7; outline-offset: -2px; border-radius: 4px; }

.akc-help-pane { display: none; }
.akc-help-pane[data-active="true"] { display: block; }

.akc-help-context {
  background: #f7f5ff; border: 1px solid #e4dffa; color: #4a3fb5;
  padding: 10px 12px; border-radius: 8px;
  margin-bottom: 12px; font-size: 13px;
}
.akc-help-context strong { color: #2d2390; }

.akc-help-search {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; border: 1px solid #d9dde5; border-radius: 8px;
  font: 14px 'Inter', system-ui, sans-serif;
  margin-bottom: 10px;
}
.akc-help-search:focus { outline: 2px solid #6c5ce7; border-color: #6c5ce7; }

.akc-help-faq-list { list-style: none; padding: 0; margin: 0; }
.akc-help-faq-item {
  border: 1px solid #eef0f4; border-radius: 8px;
  margin-bottom: 8px; overflow: hidden;
}
.akc-help-faq-q {
  width: 100%; text-align: left; padding: 10px 12px;
  background: #fafbfc; border: 0; cursor: pointer;
  font: 600 13px/1.4 'Inter', system-ui, sans-serif;
  color: #0d111c;
  display: flex; align-items: center; gap: 8px;
}
.akc-help-faq-q::after {
  content: '+'; margin-left: auto; color: #888; font-size: 18px; line-height: 1;
  transition: transform .15s;
}
.akc-help-faq-item[data-open="true"] .akc-help-faq-q::after { content: '−'; }
.akc-help-faq-q:hover { background: #f0eefc; }
.akc-help-faq-a {
  display: none; padding: 10px 12px; color: #3a4255;
  background: #fff; border-top: 1px solid #eef0f4;
}
.akc-help-faq-item[data-open="true"] .akc-help-faq-a { display: block; }

.akc-help-empty { color: #888; font-style: italic; padding: 12px 4px; }

.akc-help-form label {
  display: block; font-weight: 600; font-size: 13px; margin: 8px 0 4px;
}
.akc-help-form input,
.akc-help-form textarea {
  width: 100%; box-sizing: border-box;
  padding: 9px 12px; border: 1px solid #d9dde5; border-radius: 8px;
  font: 14px 'Inter', system-ui, sans-serif; color: #0d111c;
}
.akc-help-form textarea { min-height: 110px; resize: vertical; }
.akc-help-form input:focus,
.akc-help-form textarea:focus { outline: 2px solid #6c5ce7; border-color: #6c5ce7; }
.akc-help-form .akc-help-hint { color: #888; font-size: 12px; margin: 4px 0 0; }

.akc-help-actions { margin-top: 14px; display: flex; gap: 8px; align-items: center; }
.akc-help-submit {
  background: linear-gradient(135deg, #6c5ce7 0%, #00b894 100%);
  color: #fff; border: 0; padding: 9px 18px; border-radius: 8px;
  font: 700 14px 'Plus Jakarta Sans', system-ui, sans-serif;
  cursor: pointer;
}
.akc-help-submit:hover { filter: brightness(1.06); }
.akc-help-submit:disabled { opacity: .6; cursor: wait; }
.akc-help-msg { font-size: 13px; color: #00875a; }
.akc-help-msg[data-tone="error"] { color: #c0392b; }

.akc-help-links {
  margin-top: 14px; padding-top: 12px; border-top: 1px dashed #e1e4ea;
  font-size: 12px; color: #555;
}
.akc-help-links a { color: #6c5ce7; text-decoration: none; margin-right: 10px; }
.akc-help-links a:hover { text-decoration: underline; }

/* Toast notification (Spark voice) */
.akc-help-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px);
  background: #0d111c; color: #fff;
  padding: 10px 16px; border-radius: 24px;
  font: 600 13px 'Inter', system-ui, sans-serif;
  z-index: 9400; opacity: 0;
  transition: opacity .18s ease, transform .18s ease;
  box-shadow: 0 8px 28px rgba(0,0,0,.28);
  max-width: 90vw;
}
.akc-help-toast[data-show="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile: full-screen sheet */
@media (max-width: 540px) {
  .akc-help-panel { width: 100vw; }
  .akc-help-fab { width: 44px; height: 44px; font-size: 20px; right: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .akc-help-panel,
  .akc-help-overlay,
  .akc-help-toast,
  .akc-help-fab { transition: none !important; }
}

/* Changelog page */
.akc-changelog-wrap { max-width: 760px; margin: 0 auto; padding: 32px 20px 64px; }
.akc-changelog-wrap h1 { font: 800 32px/1.2 'Plus Jakarta Sans', system-ui, sans-serif; margin: 0 0 4px; }
.akc-changelog-wrap .akc-cl-sub { color: #5a6273; margin: 0 0 28px; }
.akc-cl-release {
  border: 1px solid #eef0f4; border-radius: 12px;
  padding: 20px 22px; margin-bottom: 16px; background: #fff;
}
.akc-cl-release h2 { margin: 0 0 4px; font: 700 19px 'Plus Jakarta Sans', system-ui, sans-serif; }
.akc-cl-meta { display: flex; gap: 10px; align-items: center; color: #888; font-size: 13px; margin-bottom: 8px; }
.akc-cl-version {
  background: #f7f5ff; color: #6c5ce7; padding: 2px 8px; border-radius: 12px;
  font: 600 12px 'Inter', system-ui, sans-serif;
}
.akc-cl-summary { color: #3a4255; margin: 0 0 12px; }
.akc-cl-section { margin-top: 10px; }
.akc-cl-section h3 {
  font: 700 12px 'Inter', system-ui, sans-serif;
  text-transform: uppercase; letter-spacing: .04em;
  margin: 0 0 4px;
}
.akc-cl-section[data-kind="added"]    h3 { color: #00875a; }
.akc-cl-section[data-kind="improved"] h3 { color: #6c5ce7; }
.akc-cl-section[data-kind="fixed"]    h3 { color: #c0392b; }
.akc-cl-section ul { margin: 0; padding-left: 18px; color: #3a4255; }
.akc-cl-section li { margin: 2px 0; }
