/* =========================================================
   Questions & Answers page (faq.html)
   Each question is a customer's speech bubble; opening it shows
   the team's answer bubble. Builds on theme.css + veetrax.css.
   ========================================================= */
.faq-hero {
  padding: 40px 0 36px;
  background:
    radial-gradient(600px 320px at 90% 0%, rgba(14, 159, 142, 0.12), transparent 60%),
    var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.faq-eyebrow {
  display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: 13px;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px;
}
.faq-hero h1 { font-size: clamp(32px, 5.5vw, 54px); font-weight: 800; line-height: 1.08; margin-bottom: 12px; }
.faq-hero h1 em { font-style: normal; color: var(--accent); }
.faq-hero .lead { font-size: 17px; max-width: 540px; margin-bottom: 20px; }
.faq-hero-art img { border-radius: 24px; box-shadow: var(--shadow-md); width: 100%; }

/* search */
.faq-search {
  display: flex; align-items: center; gap: 10px; max-width: 520px; margin: 0;
  padding: 0 16px; min-height: 52px; border-radius: 999px;
  background: var(--surface); border: 1.5px solid var(--border-strong); box-shadow: var(--shadow-sm);
}
.faq-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.faq-search svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.faq-search input { flex: 1 1 auto; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--heading); min-width: 0; }
.faq-search-empty { margin-top: 12px; font-weight: 600; }

/* tabs: four, wrap 2 x 2 on phones */
.faq-tabs .vt-tab { padding: 8px 14px; }
.faq-tabs .vt-tab strong { font-size: 15px; }
@media (max-width: 767.98px) {
  .faq-tabs { flex-wrap: wrap; }
  .faq-tabs .vt-tab { flex: 1 1 calc(50% - 10px); margin: 4px; min-height: 48px; }
  .faq-tabs .vt-tab:first-child, .faq-tabs .vt-tab:last-child { margin: 4px; }
}

.faq-container { max-width: 880px; }
.faq-panel-title { font-size: clamp(20px, 2.8vw, 26px); font-weight: 800; margin: 4px 0 18px; }

/* ---- chat-style Q&A ---- */
.qa { margin-bottom: 12px; }
.qa > summary {
  list-style: none; cursor: pointer; display: flex; align-items: flex-start; gap: 12px;
}
.qa > summary::-webkit-details-marker { display: none; }
.qa > summary::before {           /* customer avatar */
  content: ''; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: #12355b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='8.5' r='4' fill='%23fff'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0z' fill='%23fff'/%3E%3C/svg%3E") center/22px no-repeat;
}
.qa-q {
  position: relative; flex: 1 1 auto; display: block;
  padding: 13px 44px 13px 16px; border-radius: 4px 18px 18px 18px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  font-family: var(--font-head); font-weight: 700; font-size: 16px; line-height: 1.4; color: var(--heading);
  transition: border-color .2s ease;
}
.qa-q::after {                     /* open / close chevron */
  content: ''; position: absolute; right: 16px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2.4px solid var(--accent); border-bottom: 2.4px solid var(--accent);
  transform: rotate(45deg); transition: transform .2s ease;
}
.qa[open] .qa-q::after { transform: rotate(-135deg); margin-top: -2px; }
.qa > summary:hover .qa-q, .qa[open] .qa-q { border-color: rgba(14, 159, 142, 0.45); }

.qa-a {
  display: flex; justify-content: flex-end; align-items: flex-start; gap: 12px; margin: 10px 0 4px 52px;
  animation: qaIn .3s cubic-bezier(.16,1,.3,1);
}
.qa-a::after {                     /* team avatar (headset) */
  content: ''; flex: none; order: 2; width: 40px; height: 40px; border-radius: 50%;
  background: #0e9f8e url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13v-1a7 7 0 0 1 14 0v1' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round'/%3E%3Crect x='3.5' y='12' width='4' height='6.5' rx='1.6' fill='%23fff'/%3E%3Crect x='16.5' y='12' width='4' height='6.5' rx='1.6' fill='%23fff'/%3E%3Cpath d='M18.5 18.5v.5a2.5 2.5 0 0 1-2.5 2.5h-2.5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/22px no-repeat;
}
.qa-a p {
  order: 1; margin: 0; padding: 13px 16px; border-radius: 18px 4px 18px 18px;
  background: #0b3b39; color: #e8f4f2; font-size: 15.5px; line-height: 1.6; max-width: 680px;
}
.qa-a p strong { color: #ffffff; }
.qa-a p a { color: #fcd34d; text-decoration: underline; }
@keyframes qaIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .qa-a { animation: none; } }

@media (max-width: 575.98px) {
  .qa > summary::before, .qa-a::after { width: 32px; height: 32px; background-size: 18px; }
  .qa-q { font-size: 15px; padding: 11px 40px 11px 14px; }
  .qa-a { margin-left: 18px; gap: 8px; }
  .qa-a p { font-size: 15px; }
}

/* developers feature block */
.faq-feature { margin-bottom: 22px; }
.faq-feature img { width: 100%; border-radius: 20px; box-shadow: var(--shadow-sm); }
.faq-feature-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.faq-feature-card { padding: 18px 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); }
.faq-feature-card:last-child { border-top-color: var(--brand-amber); }
.faq-feature-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.faq-feature-card p { margin: 0; font-size: 15px; }
@media (max-width: 767.98px) { .faq-feature-cards { grid-template-columns: 1fr; } }

/* while searching: show every panel, hide the tabs and non-matching questions */
.faq-body.is-searching .vt-tabbar { display: none; }
.faq-body.is-searching .vt-panel[hidden] { display: block !important; }
.faq-body.is-searching .faq-feature { display: none; }
.faq-body.is-searching .vt-panel.no-match { display: none !important; }
.qa.is-hidden { display: none; }

/* five topic tabs */
@media (min-width: 768px) and (max-width: 1199.98px) {
  .faq-tabs .vt-tab small { display: none; }
  .faq-tabs .vt-tab strong { font-size: 14px; }
}
@media (max-width: 767.98px) {
  .faq-tabs .vt-tab:last-child { flex-basis: 100%; }   /* 2 + 2 + 1 full width */
  .faq-tabs .vt-tab { min-height: 44px; padding: 6px 10px; justify-content: center; text-align: center; }
  .faq-tabs .vt-tab strong { font-size: 13.5px; }
  .faq-tabs .vt-tab small { display: none; }
  .vt-tabbar { padding: 6px 0; }
}

/* sub-groups inside a topic (e.g. Developers: GPS parsers / API & forwarding) */
.faq-group-title {
  font-size: 17px; font-weight: 800; color: var(--accent); margin: 26px 0 12px;
  padding-top: 14px; border-top: 1px solid var(--border); scroll-margin-top: calc(var(--header-h) + 90px);
}
.faq-feature + .faq-group-title { border-top: 0; padding-top: 0; }

/* =========================================================
   GPS device troubleshooting page (troubleshooting.html)
   Reuses the FAQ chat bubbles (.qa) and hero.
   ========================================================= */
.ts-hero-text { max-width: 760px; }
.ts-hero-actions { margin-top: 6px; }
.ts-body { padding-top: 22px; padding-bottom: 40px; }
.ts-jump {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px;
  position: sticky; top: var(--header-h); z-index: 20; padding: 10px 0;
  background: var(--bg);
}
.ts-jump a {
  padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--heading); white-space: nowrap;
}
.ts-jump a:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 767.98px) {
  .ts-jump { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; margin: 0 -16px 14px; padding: 8px 16px; }
  .ts-jump::-webkit-scrollbar { display: none; }
}
.ts-section { padding: 10px 0 18px; scroll-margin-top: calc(var(--header-h) + 64px); }
.ts-checklist { counter-reset: c; margin: 0; padding: 0; }
.ts-checklist li {
  counter-increment: c; position: relative; list-style: none; margin-bottom: 10px;
  padding: 14px 16px 14px 56px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border);
  font-size: 15.5px; line-height: 1.55; color: var(--text); box-shadow: var(--shadow-sm);
}
.ts-checklist li::before {
  content: counter(c); position: absolute; left: 14px; top: 13px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--grad-brand); color: #fff; font-weight: 800; font-size: 14px;
}
.ts-checklist li strong { color: var(--heading); }
.ts .qa-a p { line-height: 1.7; }
.ts-note { font-size: 15px; margin-bottom: 14px; }
.ts code, .ts-table code {
  font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; padding: 2px 6px; border-radius: 6px;
  background: var(--surface-2); color: var(--heading); border: 1px solid var(--border); white-space: nowrap;
}
.ts .qa-a p code { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.2); }
.ts-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); }
.ts-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ts-table th { text-align: left; padding: 12px 16px; background: var(--surface-2); color: var(--heading); font-family: var(--font-head); font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; }
.ts-table td { padding: 12px 16px; border-top: 1px solid var(--border); vertical-align: top; color: var(--text); }
.ts-table td:first-child { width: 1%; white-space: nowrap; }
.ts-warn { margin-top: 14px; padding: 14px 16px; border-radius: 14px; background: #fff7e6; border: 1px solid #fde68a; color: #7c2d12; font-size: 15px; }
.ts-send { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; align-items: center; padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.ts-send .vt-ticks { margin: 0; padding: 0; }
.ts-send-actions { display: flex; flex-direction: column; gap: 10px; }
.ts-send-actions .btn { width: 100%; }
.ts-hours { margin: 0; text-align: center; font-size: 13.5px; color: var(--muted); }
.ts-more { margin-top: 18px; font-weight: 600; }
.ts-more a { color: var(--accent); text-decoration: underline; }
@media (max-width: 767.98px) {
  .ts-send { grid-template-columns: 1fr; padding: 16px; }
  .ts-table td:first-child { white-space: normal; }
}
.ts-callout {
  display: flex; flex-direction: column; gap: 2px; margin: -4px 0 18px; padding: 14px 18px; border-radius: 16px;
  background: #fff7e6; border: 1px solid #fde68a; color: #7c2d12;
}
.ts-callout strong { font-family: var(--font-head); color: #7c2d12; }
.ts-callout span { font-weight: 600; color: #b45309; }
.ts-callout:hover { border-color: #f59e0b; color: #7c2d12; }
@media (max-width: 575.98px) {
  .ts-table thead { display: none; }
  .ts-table, .ts-table tbody, .ts-table tr, .ts-table td { display: block; width: 100% !important; }
  .ts-table tr { padding: 12px 14px; border-top: 1px solid var(--border); }
  .ts-table tr:first-child { border-top: 0; }
  .ts-table td { padding: 0; border: 0; }
  .ts-table td:first-child { margin-bottom: 6px; white-space: normal; }
  .ts-table td:first-child code { white-space: normal; overflow-wrap: anywhere; }
}
