.lt-faq-button {
  position: fixed;
  inset-inline-start: 22px;
  bottom: calc(44px + env(safe-area-inset-bottom, 0px));
  z-index: 80;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid rgba(126, 179, 255, 0.28);
  border-radius: 50%;
  background: rgba(79, 142, 247, 0.1);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--accent2);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
  -webkit-tap-highlight-color: transparent;
}

.lt-faq-button[hidden] { display: none; }

.lt-faq-help-icon { width: 25px; height: 25px; display: block; }

.lt-faq-button:hover {
  transform: translateY(-2px);
  background: rgba(79, 142, 247, 0.2);
  border-color: rgba(126, 179, 255, 0.55);
  color: #fff;
  box-shadow: 0 8px 26px rgba(79, 142, 247, 0.3);
}

.lt-faq-button:active { transform: translateY(0) scale(0.96); }

.lt-faq-button-label {
  position: absolute;
  inset-inline-start: calc(100% + 14px);
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  padding: 9px 13px;
  border: 1px solid var(--border-h);
  border-radius: 10px;
  background: var(--surface2);
  color: var(--text);
  font: 500 0.85rem/1.5 'Tajawal', sans-serif;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, visibility 160ms ease;
}

.lt-faq-button:hover .lt-faq-button-label,
.lt-faq-button:focus-visible .lt-faq-button-label { opacity: 1; visibility: visible; }

.lt-faq-button:focus-visible,
.lt-faq-close:focus-visible { outline: 2px solid var(--accent2); outline-offset: 4px; }

.lt-faq-item > summary:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; border-radius: 10px; }

/* ---------- النافذة ---------- */
.lt-faq-dialog {
  width: min(720px, calc(100% - 40px));
  max-height: min(800px, calc(100vh - 64px));
  max-height: min(800px, calc(100dvh - 64px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(100, 140, 255, 0.2);
  border-radius: 22px;
  background:
    radial-gradient(ellipse 70% 120px at 50% 0%, rgba(79, 142, 247, 0.12), transparent 100%),
    #0d1423;
  color: var(--text);
  box-shadow: 0 0 0 1px rgba(79, 142, 247, 0.05), 0 28px 90px rgba(0, 0, 0, 0.6);
  font-family: 'Tajawal', sans-serif;
  text-align: start;
  color-scheme: dark;
}

.lt-faq-dialog[open] { display: flex; flex-direction: column; }

.lt-faq-dialog::backdrop { background: rgba(5, 8, 18, 0.82); backdrop-filter: blur(10px); }

.lt-faq-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-shrink: 0;
  padding: 24px 28px 18px;
}

.lt-faq-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.lt-faq-header h2::before {
  content: '';
  width: 4px;
  height: 24px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--accent2), var(--accent));
  box-shadow: 0 0 12px var(--glow);
  flex-shrink: 0;
}

.lt-faq-close {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text3);
  font: inherit;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.lt-faq-close:hover { color: var(--error); background: rgba(245, 101, 101, 0.1); border-color: rgba(245, 101, 101, 0.25); }

.lt-faq-close svg { width: 18px; height: 18px; }

/* ---------- القائمة ---------- */
.lt-faq-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 28px 20px;
  border-top: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: rgba(100, 140, 255, 0.28) transparent;
}

.lt-faq-item { border-bottom: 1px solid var(--border); }

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

.lt-faq-item > summary {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 2px;
  list-style: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  cursor: pointer;
  transition: color 160ms ease;
}

.lt-faq-item > summary::-webkit-details-marker { display: none; }

.lt-faq-item > summary:hover { color: #fff; }

.lt-faq-question { flex: 1; min-width: 0; }

.lt-faq-symbol {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 7px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(79, 142, 247, 0.08);
  color: var(--accent2);
  transition: transform 220ms ease, background 220ms ease, color 220ms ease, border-color 220ms ease;
}

.lt-faq-item > summary:hover .lt-faq-symbol { border-color: var(--border-h); background: rgba(79, 142, 247, 0.14); }

.lt-faq-item[open] > summary { color: #fff; font-weight: 700; }

.lt-faq-item[open] .lt-faq-symbol {
  transform: rotate(180deg);
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 14px var(--glow);
}

.lt-faq-answer {
  padding: 0 2px 22px;
  padding-inline-end: 48px;
  color: var(--text2);
  font-size: 0.97rem;
  line-height: 2;
  overflow-wrap: anywhere;
}

.lt-faq-item[open] .lt-faq-answer { animation: ltFaqIn 240ms ease both; }

.lt-faq-answer p + p { margin-top: 12px; }

.lt-faq-answer strong { color: var(--accent2); font-weight: 700; }

@keyframes ltFaqIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- الجوال ---------- */
@media (max-width: 600px) {
  .lt-faq-button { inset-inline-start: 16px; width: 50px; height: 50px; }
  .lt-faq-dialog { width: calc(100% - 24px); border-radius: 18px; max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); }
  .lt-faq-header { padding: 20px 18px 14px; }
  .lt-faq-header h2 { font-size: 1.35rem; }
  .lt-faq-header h2::before { height: 20px; }
  .lt-faq-list { padding: 0 18px 14px; }
  .lt-faq-item > summary { gap: 12px; padding: 17px 0; font-size: 0.97rem; }
  .lt-faq-symbol { width: 28px; height: 28px; padding: 6px; }
  .lt-faq-answer { padding: 0 0 19px; padding-inline-end: 0; font-size: 0.94rem; line-height: 1.95; }
}

@media (prefers-reduced-motion: reduce) {
  .lt-faq-button, .lt-faq-button-label, .lt-faq-close, .lt-faq-item > summary, .lt-faq-symbol { transition: none; }
  .lt-faq-item[open] .lt-faq-answer { animation: none; }
}
