/* Literal colors only — no CSS custom properties. This nopCommerce 3.70 build minifies CSS
   with WebGrease (System.Web.Optimization), which mangles/strips var() and --custom-props,
   dropping borders and accent colors. Neutral palette (no brand accent, so it sits cleanly in
   any theme): text #1f2937, body #4b5563, muted #6b7280, line #e5e7eb, faint line #f3f4f6,
   hover/open tint #fcfcfd, panel #fafafa, dark (active/staff) #1f2937. */

.ah-faq-block,
.ah-qna-block { margin: 2rem 0; color: #1f2937; font-size: 0.95rem; line-height: 1.55; }

/* ---------- FAQ block (PDP / category widget) ---------- */
.ah-faq-block { padding: 1.75rem 2rem; background: #fff; }
.ah-faq-block > h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.01em; color: #1f2937; margin: 0 0 .25rem; padding-bottom: .9rem; border-bottom: 1px solid #e5e7eb; }

.ah-faq-section { margin-bottom: 1.25rem; }
.ah-faq-section h3 { font-size: 1.05rem; font-weight: 600; margin: 0 0 .5rem; color: #1f2937; }

/* ---------- FAQ landing page (/faq) ---------- */
/* Constrain the whole page (title + body together) so they align — previously only the body
   was max-width'd, leaving a full-width title above a narrow centered column. */
.faq-landing-page { max-width: 1080px; margin: 0 auto; color: #1f2937; font-size: .95rem; line-height: 1.55; }

/* toolbar: instant search + expand/collapse all */
.ah-faq-toolbar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.5rem 0 1.75rem; }
.ah-faq-search-input { flex: 1 1 280px; min-width: 0; padding: .6rem .85rem; font-size: .95rem; color: #1f2937; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; box-sizing: border-box; }
.ah-faq-search-input:focus { outline: none; border-color: #9ca3af; box-shadow: 0 0 0 3px #f3f4f6; }
.ah-faq-toggle-all { flex: 0 0 auto; border: 1px solid #e5e7eb; background: transparent; color: #4b5563; padding: .55rem .9rem; border-radius: 6px; font-size: .85rem; cursor: pointer; transition: border-color .15s ease, color .15s ease; }
.ah-faq-toggle-all:hover { border-color: #9ca3af; color: #1f2937; }
.ah-faq-toggle-all:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }
.ah-faq-noresults { color: #6b7280; font-style: italic; padding: 1rem 0; }

/* two-column: sticky table-of-contents + content */
.ah-faq-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.ah-faq-layout--single { display: block; }
.ah-faq-content { min-width: 0; }

.ah-faq-toc { align-self: start; font-size: .9rem; }
.ah-faq-toc-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #6b7280; margin: 0 0 .6rem; padding-left: .75rem; }
.ah-faq-toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid #e5e7eb; }
.ah-faq-toc li { margin: 0; }
.ah-faq-toc a { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; padding: .4rem .75rem; margin-left: -1px; border-left: 2px solid transparent; color: #4b5563; text-decoration: none; line-height: 1.3; }
.ah-faq-toc a:hover { color: #1f2937; background: #fcfcfd; }
.ah-faq-toc a.active { color: #1f2937; font-weight: 600; border-left-color: #1f2937; }
.ah-faq-toc-count { flex: 0 0 auto; font-size: .75rem; color: #9ca3af; font-weight: 400; }

.faq-landing-page .ah-faq-section { background: #fff; padding: .5rem 1.5rem; margin: 1rem 0; scroll-margin-top: 1rem; }
.faq-landing-page .ah-faq-section:first-child { margin-top: 0; }
.faq-landing-page .ah-faq-section > h2 { font-size: 1.875rem; font-weight: 400; letter-spacing: -.01em; color: #1f2937; margin: 1rem 0 .1rem; }
.faq-landing-page .ah-faq-description { font-size: .85rem; color: #6b7280; margin: 0 0 .25rem; }
.faq-landing-page .ah-faq-item { scroll-margin-top: 1rem; }
.faq-landing-page .ah-faq-item summary { padding-top: .9rem; padding-bottom: .9rem; padding-left: 8px; }

/* ---------- FAQ accordion (shared) ---------- */
.ah-faq-item { border-bottom: 1px solid #e5e7eb; padding: 0; }
.ah-faq-item summary { cursor: pointer; font-weight: 700; font-size: 1.03rem; color: #1f2937; padding: 1.05rem 1.75rem 1.05rem 0; list-style: none; position: relative; transition: background-color .15s ease; }
.ah-faq-item summary::-webkit-details-marker { display: none; }
.ah-faq-item summary:hover { background: #fcfcfd; text-decoration: underline; }
.ah-faq-item summary:focus-visible { outline: 2px solid #1f2937; outline-offset: -2px; background: #fcfcfd; }
.ah-faq-item summary::after { content: ""; position: absolute; right: .85rem; top: 50%; width: 8px; height: 8px; margin-top: -6px; border-right: 2px solid #9ca3af; border-bottom: 2px solid #9ca3af; transform: rotate(45deg); transition: transform .2s ease; }
.ah-faq-item[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.ah-faq-item[open] summary { background: #fcfcfd; }

.ah-faq-item .ah-faq-a { box-sizing: border-box; padding: .1rem 1rem 1.25rem 1.1rem; margin: 0 0 .25rem .1rem; border-left: 2px solid #f3f4f6; color: #4b5563; font-weight: 400; }
.ah-faq-item .ah-faq-a .ah-faq-answer-text { line-height: 1.6; }
.ah-faq-item .ah-faq-a .ah-faq-answer-text > :first-child { margin-top: 0; }
.ah-faq-item .ah-faq-a .ah-faq-answer-text > :last-child { margin-bottom: 0; }

.ah-faq-helpful { font-size: .8rem; color: #6b7280; margin-top: .5rem; display: flex; gap: .5rem; align-items: center; }
.ah-faq-helpful button { border: 1px solid #e5e7eb; background: transparent; padding: .15rem .55rem; border-radius: 4px; font-size: .8rem; cursor: pointer; transition: background .15s ease, border-color .15s ease, color .15s ease; }
.ah-faq-helpful button:hover { border-color: #9ca3af; color: #1f2937; }
.ah-faq-helpful button:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }
.ah-faq-helpful .ah-helpful-thanks { color: #198754; font-style: italic; }
.ah-faq-helpful .d-none { display: none !important; }

/* ---------- Customer Q&A block ---------- */
.ah-qna-block .ah-qna-header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 0 .75rem; padding-bottom: .75rem; border-bottom: 1px solid #e5e7eb; }
.ah-qna-block .ah-qna-header h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: -.01em; margin: 0; color: #1f2937; flex: 1 1 auto; }

/* ask / answer forms reuse the theme write-review box */
.ah-ask-form[hidden] { display: none !important; }
.ah-qna-block .write-review .form-fields { padding: 20px 15px; }
.ah-qna-block .write-review .inputs { margin: 0 0 15px; }
.ah-qna-block .write-review .inputs label { display: block; width: auto; text-align: left; margin: 0 0 5px; }
.ah-qna-block .write-review .inputs input[type="text"],
.ah-qna-block .write-review .inputs textarea { width: 100%; max-width: 100%; box-sizing: border-box; }

.ah-qna-list { margin-top: 1rem; }

/* empty state */
.ah-qna-empty { text-align: center; color: #6b7280; padding: 1.75rem 1rem; border: 1px dashed #e5e7eb; border-radius: 8px; margin: .5rem 0; font-size: .95rem; }
.ah-qna-empty p { margin: 0; }

/* question = divider row, not a heavy card */
.ah-question { padding: 1.1rem 0; border-bottom: 1px solid #e5e7eb; }
.ah-question-head { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: .35rem; }
.ah-question-title { font-size: 1.05rem; font-weight: 600; margin: 0; flex: 1 1 auto; min-width: 0; color: #1f2937; }
.ah-question-body { margin: .25rem 0 .5rem; color: #374151; }
.ah-question-meta { font-size: .8rem; color: #6b7280; margin-top: .25rem; }

/* follow pill */
.ah-follow-btn { font-size: .8rem; border: 1px solid #e5e7eb; background: transparent; color: #6b7280; padding: .25rem .65rem; border-radius: 999px; cursor: pointer; flex: 0 0 auto; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.ah-follow-btn:hover { border-color: #9ca3af; color: #1f2937; }
.ah-follow-btn[data-following="true"] { background: #1f2937; border-color: #1f2937; color: #fff; }
.ah-follow-btn .ah-follow-count { font-weight: 600; margin-right: .15rem; }
.ah-follow-btn:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }

/* answers */
.ah-answers-count { font-size: .8rem; font-weight: 600; color: #6b7280; margin: .6rem 0 .1rem; }
.ah-answers { list-style: none; padding: 0; margin: .25rem 0 0; }
.ah-answer-row { display: flex; gap: .75rem; padding: .85rem 0; }
.ah-answer-row + .ah-answer-row { border-top: 1px solid #f3f4f6; }
.ah-answer-row.ah-pinned { background: #fafafa; border-left: 3px solid #1f2937; border-radius: 0 4px 4px 0; padding: .85rem .75rem; }
.ah-answer-row .ah-answer-body { flex: 1 1 auto; min-width: 0; }

/* vote control — CSS carets (no glyphs), neutral */
.ah-vote { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.ah-vote button { width: 30px; height: 24px; padding: 0; border: 1px solid #e5e7eb; background: #fff; border-radius: 4px; cursor: pointer; position: relative; transition: border-color .15s ease, background .15s ease; }
.ah-vote button:not(.active):hover { border-color: #9ca3af; background: #fcfcfd; }
.ah-vote button:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }
.ah-vote button::before { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; transform: translate(-50%, -50%); }
.ah-vote-up::before { border-bottom: 6px solid #6b7280; }
.ah-vote-down::before { border-top: 6px solid #6b7280; }
.ah-vote button:not(.active):hover::before { border-bottom-color: #1f2937; border-top-color: #1f2937; }
.ah-vote .active { border-color: #1f2937; background: #1f2937; }
.ah-vote-up.active::before { border-bottom-color: #fff; }
.ah-vote-down.active::before { border-top-color: #fff; }
.ah-net-score { font-size: .85rem; font-weight: 700; color: #1f2937; line-height: 1; }

/* badges */
.ah-badge { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .12rem .45rem; border-radius: 3px; margin: 0 .35rem .35rem 0; vertical-align: middle; }
.ah-badge-staff { color: #fff; background: #1f2937; }
.ah-badge-pinned { color: #374151; border: 1px solid #d1d5db; }

.ah-answer-text { white-space: pre-wrap; word-wrap: break-word; }
.ah-answer-meta { font-size: .8rem; color: #6b7280; margin-top: .4rem; display: flex; gap: .5rem; align-items: center; }
.ah-report, .ah-link { border: none; background: none; padding: 0; font-size: .8rem; color: #6b7280; text-decoration: underline; cursor: pointer; }
.ah-report:hover, .ah-link:hover { color: #1f2937; }
.ah-report:focus-visible, .ah-link:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }

/* replies — indented with a connector rule */
.ah-reply { margin: .5rem 0 0 1rem; padding: .4rem 0 .4rem .85rem; border-left: 2px solid #e5e7eb; font-size: .92rem; }

.ah-login-hint { font-size: .85rem; color: #6b7280; font-style: italic; }
.ah-submit:focus-visible { outline: 2px solid #1f2937; outline-offset: 2px; }

/* ---------- shared utilities ---------- */
.ah-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.ah-user-text { white-space: pre-wrap; word-wrap: break-word; }
.ah-pending-banner,
.ah-error-banner { padding: .5rem .75rem; border-radius: 4px; margin-top: .5rem; font-size: .9rem; }
.ah-pending-banner { color: #664d03; background: #fff3cd; border: 1px solid #ffe69c; }
.ah-error-banner { color: #842029; background: #f8d7da; border: 1px solid #f5c2c7; }

@media (max-width: 768px) {
    /* collapse the FAQ landing to one column; TOC becomes a horizontal chip row above content */
    .ah-faq-layout { display: block; }
    .ah-faq-toc { margin: 0 0 1.25rem; }
    .ah-faq-toc ul { display: flex; flex-wrap: wrap; gap: .4rem; border-left: none; }
    .ah-faq-toc a { margin-left: 0; border: 1px solid #e5e7eb; border-left-width: 1px; border-radius: 999px; padding: .3rem .7rem; }
    .ah-faq-toc a.active { border-color: #1f2937; }
}

@media (max-width: 600px) {
    .ah-faq-block,
    .ah-qna-block { margin: 1.5rem 0; }
    .ah-faq-block { padding: 1.25rem 1rem; }
    .ah-question-head { flex-direction: column; align-items: flex-start; gap: .25rem; }
}
