/* PANTHER OBD – shared styles for secondary pages (matches privacy-policy.html) */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
a { text-decoration: none; color: inherit; }

:root {
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Inter", "Helvetica Neue", Arial, sans-serif;
  --accent:   #F5A623;
  --accent-text: #1A1A1A;
  --bg:       #F5F5F7;
  --surface:  #FFFFFF;
  --surface2: #F2F2F7;
  --text:     #1D1D1F;
  --text2:    #3A3A3C;
  --text3:    #6E6E73;
  --border:   rgba(0,0,0,0.08);
}
[data-theme="dark"] {
  --bg:      #000000;
  --surface: #1C1C1E;
  --surface2:#2C2C2E;
  --text:    #F5F5F7;
  --text2:   #98989D;
  --text3:   #636366;
  --border:  rgba(255,255,255,0.08);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background 0.3s, color 0.3s;
}

[dir="rtl"] body {
    font-family: ui-rounded, "SF Arabic Rounded", "SF Arabic", -apple-system, BlinkMacSystemFont, "Dubai", "Segoe UI", "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
}

/* Toolbar */
#toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.toolbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.toolbar-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}
.toolbar-logo a { color: inherit; }

.toolbar-right { display: flex; align-items: center; gap: 10px; }

.lang-toggle {
  display: flex; align-items: center;
  background: var(--surface2);
  border-radius: 999px; padding: 3px; gap: 2px;
  border: 1px solid var(--border);
}
.lang-btn {
  font-family: inherit; font-size: 13px; font-weight: 500;
  color: var(--text2); padding: 4px 14px; border-radius: 999px;
  cursor: pointer; border: none; background: none; line-height: 1.4;
  transition: all 0.2s;
}
.lang-btn.active { background: var(--accent); color: var(--accent-text); }

.theme-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--text); font-size: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.theme-btn:hover { background: var(--accent); color: var(--accent-text); border-color: transparent; }

/* Content */
.pp-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 28px 100px;
}

.pp-badge {
  display: inline-block;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(245,166,35,0.14);
  padding: 4px 12px; border-radius: 999px;
  margin-bottom: 16px;
}

.pp-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 30px;
}

.pp-date {
  font-size: 14px;
  color: var(--text3);
  margin-bottom: 48px;
}

.pp-section {
  margin-bottom: 40px;
}

.pp-section h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.pp-section p {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 12px;
}

.pp-section ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pp-section ul li {
  font-size: 16px;
  color: var(--text2);
  line-height: 1.65;
  padding-left: 20px;
  position: relative;
}

[dir="rtl"] .pp-section ul li {
  padding-left: 0;
  padding-right: 20px;
}

.pp-section ul li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

[dir="rtl"] .pp-section ul li::before {
  left: auto;
  right: 0;
}

/* Highlight box */
.pp-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 20px 24px;
  margin: 32px 0;
}

[dir="rtl"] .pp-highlight {
  border-left: 1px solid var(--border);
  border-right: 4px solid var(--accent);
  border-radius: 12px 0 0 12px;
}

.pp-highlight p {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

.pp-contact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  margin-top: 48px;
}

.pp-contact h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}

.pp-contact p {
  font-size: 15px;
  color: var(--text2);
  margin-bottom: 12px;
}

.pp-contact a {
  color: var(--accent);
  font-weight: 600;
}
.pp-contact a:hover { text-decoration: underline; }

.pp-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 60px 0;
}

/* Footer */
footer {
    background: var(--surface); border-top: 1px solid var(--border);
    padding: 28px; text-align: center; font-size: 13px; color: var(--text2);
}
.footer-links { display: flex; justify-content: center; gap: 20px; margin-top: 6px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--accent); }

@media (max-width: 600px) {
  .pp-wrap { padding: 40px 18px 80px; }
  #toolbar { padding: 12px 18px; }
}

/* Adapter accordion */
/* ---------- Devices ---------- */


/* ── Layout ───────────────────────────────────────────── */
.devices-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 48px;
}

/* ── Group ────────────────────────────────────────────── */
.device-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
}

.device-group--choice {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

/* 2. Group header — centred, bigger, no background, no border */
/* 4. Group header — no background, bigger font, centred */
.device-group-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 22px 20px 18px;
  background: none;
}

/* 5. OBD icon before Our Choice */
.device-group-icon {
  width: 48px; height: 24px;
  color: var(--accent);
  margin-bottom: 6px;
}

.device-group-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.device-group-sub {
  font-size: 13px;
  color: var(--text3);
}

/* ── Device item ──────────────────────────────────────── */
.device-item {
    border-top: 1px solid var(--border);
}

/* 1. Row layout — Uses natural Flexbox flow.
 In LTR: Name starts on Left, Chevron on Right.
 In RTL: Name starts on Right, Chevron on Left.
 */
.device-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Creates the "long space" in the middle */
    padding: 14px 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    gap: 12px;
}

/* 2. Device Name + Coming Soon Tag
 No direction overrides needed. Name text stays first,
 tag stays right next to it.
 */
.device-row-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px; /* Spaces tag perfectly from name text */
    min-width: 0;
}

/* Strikethrough on name text only */
.device-item--disabled .device-name-text {
    text-decoration: line-through;
    opacity: 0.45;
}
.device-item--disabled .device-row-name {
    color: var(--text3);
}

.device-coming-soon {
    font-size: 10px;
    font-weight: 700;
    color: var(--text3);
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    flex-shrink: 0;
    text-decoration: none;
}

/* 3. Right side layout (Badge + Chevron)
 Elements will flow naturally based on direction.
 */
.device-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.device-chevron {
    width: 16px;
    height: 16px;
    color: var(--text3);
    transition: transform 0.22s ease;
    flex-shrink: 0;
}
.device-row[aria-expanded="true"] .device-chevron {
    transform: rotate(180deg);
}


/* ── Badge ────────────────────────────────────────────── */
.device-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  padding: 3px 9px;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.badge-mfi  { background: var(--mfi); }
.badge-ble  { background: var(--ble); }
.badge-wifi { background: #30C55A; }

/* ── Detail panel ─────────────────────────────────────── */
.device-detail {
  display: none;
  padding: 0 20px 18px;
  animation: fadeSlide 0.2s ease;
}
.device-item.open .device-detail { display: block; }

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

/* 2. Tags — no shadow, flat border */
.device-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 14px;
}

.device-tag {
  font-size: 12px;
  font-weight: 500;
  color: var(--text2);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 999px;
}

/* 3. Links — square with rounded corners, not pill */
.device-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
[dir="rtl"] .device-links { justify-content: flex-end; }


.device-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 7px 16px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
}
.device-link:hover {
  background: var(--accent);
  color: var(--accent-text);
}

/* ── Disabled ─────────────────────────────────────────── */
.device-item--disabled .device-row { cursor: default; }
.device-item--disabled .device-badge { opacity: 0.45; }
.device-item--disabled .device-chevron { opacity: 0.3; }

.device-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.device-head .device-badge { margin-bottom: 0; }


/* ===== Shared by Adapters / FAQ / Roadmap / What's New / Known Issues ===== */
:root { --mfi:#6200EE; --ble:#0071E3; }
[data-theme="dark"] { --mfi:#9D4EDD; --ble:#0A84FF; }

.pp-sub { font-size: 17px; color: var(--text2); line-height: 1.65; margin-bottom: 40px; }
.pp-title + .pp-sub { margin-top: 4px; }

/* Adapters */
.device-group { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; overflow: hidden; margin-bottom: 24px; }
.device-group--choice { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.device-thumb { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.device-row-name { gap: 12px; }
.device-links { justify-content: flex-start; }
[dir="rtl"] .device-links { justify-content: flex-start; }

/* FAQ */
.faq-list { display: flex; flex-direction: column; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
summary.faq-q {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; font-size: 15px; font-weight: 600; color: var(--text);
  cursor: pointer; user-select: none; list-style: none;
}
summary.faq-q::-webkit-details-marker { display: none; }
.faq-chev { width: 18px; height: 18px; flex-shrink: 0; color: var(--text2); transition: transform 0.3s; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
details[open] .faq-chev { transform: rotate(180deg); }
.faq-a { padding: 14px 22px 18px; font-size: 15px; color: var(--text2); line-height: 1.65; border-top: 1px solid var(--border); }

/* Roadmap / What's New / Known Issues */
.pp-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px 24px; margin-bottom: 12px; }
.pp-card h3 { font-size: 17px; font-weight: 700; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pp-card p { font-size: 15px; color: var(--text2); line-height: 1.65; margin: 0; }
.pp-card ul { margin-top: 10px; }
.pp-card .meta { font-size: 13px; color: var(--text3); margin-bottom: 10px; }
.pp-pill { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text2); background: var(--surface2); border: 1px solid var(--border); padding: 2px 10px; border-radius: 999px; }
.pp-pill.accent { color: var(--accent); background: rgba(245,166,35,0.14); border-color: transparent; }

/* Show the correct language before JS runs */
html[lang="ar"] #content-en { display: none !important; }
html[lang="ar"] #content-ar { display: block !important; }
html[lang="en"] #content-ar { display: none !important; }
html[lang="ar"] #btn-en.active { background: none; color: var(--text2); }
html[lang="ar"] #btn-ar { background: var(--accent); color: var(--accent-text); }
