/* ==========================================================================
   CAB Jordan — Legal Pages Stylesheet
   Used by: privacy.html, terms.html, cancellation.html,
            account-deletion.html, support.html
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared legal page layout
   -------------------------------------------------------------------------- */
.legal-page {
  min-height: 100vh;
  background: var(--bg, #080808);
  color: var(--white, #fff);
}

/* Sticky mini-navbar for legal pages */
.legal-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(8,8,8,0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  padding: 14px 0;
}

.legal-navbar-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.legal-nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #fff;
  text-decoration: none;
}

.legal-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
}
.legal-back-link:hover { color: #28D7E0; border-color: rgba(40,215,224,0.3); }

/* --------------------------------------------------------------------------
   Legal content wrapper
   -------------------------------------------------------------------------- */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* Page header */
.legal-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.legal-page-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #28D7E0;
  margin-bottom: 16px;
}

.legal-page-tag::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: #28D7E0;
  border-radius: 2px;
}

.legal-page-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin-bottom: 16px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
}

.legal-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Draft notice banner */
.legal-draft-notice {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 40px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.draft-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.draft-text {
  font-size: 0.85rem;
  color: rgba(245,158,11,0.9);
  line-height: 1.6;
}

.draft-text strong { color: #f59e0b; }

/* --------------------------------------------------------------------------
   Legal prose typography
   -------------------------------------------------------------------------- */
.legal-body {
  font-size: 0.95rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.75);
}

.legal-body h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin: 40px 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  letter-spacing: -0.01em;
}

.legal-body h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: rgba(255,255,255,0.9);
  margin: 28px 0 10px;
}

.legal-body p {
  margin-bottom: 16px;
  color: rgba(255,255,255,0.68);
}

.legal-body strong {
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.legal-body a {
  color: #28D7E0;
  text-decoration: none;
  border-bottom: 1px solid rgba(40,215,224,0.3);
  transition: border-color 0.2s;
}
.legal-body a:hover { border-color: #28D7E0; }

.legal-body ul,
.legal-body ol {
  margin: 12px 0 20px 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-body li {
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
}

.legal-body li::marker { color: #7D39EB; }

/* Highlight boxes */
.legal-highlight {
  background: rgba(40,215,224,0.06);
  border: 1px solid rgba(40,215,224,0.18);
  border-radius: 12px;
  padding: 20px 24px;
  margin: 24px 0;
}

.legal-highlight p { margin-bottom: 0; color: rgba(255,255,255,0.7); }

.legal-highlight-purple {
  background: rgba(125,57,235,0.07);
  border-color: rgba(125,57,235,0.2);
}

.legal-highlight-warn {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
}

/* Data table */
.legal-table-wrapper {
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.legal-table th {
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.5);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.75rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.legal-table td {
  padding: 12px 16px;
  color: rgba(255,255,255,0.65);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
  line-height: 1.6;
}

.legal-table tr:last-child td { border-bottom: none; }
.legal-table td strong { color: rgba(255,255,255,0.85); }

/* Contact box */
.legal-contact-box {
  background: rgba(125,57,235,0.08);
  border: 1px solid rgba(125,57,235,0.2);
  border-radius: 16px;
  padding: 28px 32px;
  margin-top: 48px;
}

.legal-contact-box h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}

.legal-contact-box p { margin-bottom: 8px; color: rgba(255,255,255,0.65); font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Support page specific
   -------------------------------------------------------------------------- */
.support-faq-item {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}

.support-faq-question {
  width: 100%;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  transition: background 0.2s;
}

.support-faq-question:hover { background: rgba(255,255,255,0.03); }

.support-faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(40,215,224,0.1);
  border: 1px solid rgba(40,215,224,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #28D7E0;
  transition: transform 0.25s;
}

.support-faq-item.open .support-faq-icon { transform: rotate(45deg); }

.support-faq-answer {
  display: none;
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.7;
}

.support-faq-item.open .support-faq-answer { display: block; }

/* Support topic cards */
.support-topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 24px 0;
}

.support-topic-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 20px;
  transition: all 0.2s;
}

.support-topic-card:hover {
  border-color: rgba(40,215,224,0.25);
  background: rgba(40,215,224,0.04);
}

.support-topic-icon {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.support-topic-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.support-topic-desc {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

/* Contact form area */
.support-contact-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  padding: 28px;
  margin-top: 32px;
}

.support-form-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.support-form-sub {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  margin-bottom: 20px;
}

.support-email-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #5E1278, #7D39EB 50%, #28D7E0);
  color: #fff;
  border-radius: 12px;
  padding: 14px 24px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
}

.support-email-cta:hover { opacity: 0.9; transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   Legal footer
   -------------------------------------------------------------------------- */
.legal-footer {
  background: #040404;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 28px 0;
  margin-top: 0;
}

.legal-footer-inner {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.legal-footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

.legal-footer-copy span { color: #28D7E0; }

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-footer-link {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
  text-decoration: none;
  transition: color 0.2s;
}

.legal-footer-link:hover { color: #fff; }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .legal-content { padding: 32px 16px 60px; }
  .legal-contact-box { padding: 20px; }
  .support-topics { grid-template-columns: 1fr; }
  .legal-footer-inner { flex-direction: column; align-items: flex-start; }
  .legal-body h2 { font-size: 1.15rem; }
}

/* ==========================================================================
   ARABIC / RTL — Legal pages
   ========================================================================== */

[dir="rtl"] .legal-page {
  font-family: 'Cairo', sans-serif;
}

[dir="rtl"] .legal-page-title,
[dir="rtl"] .legal-body h2,
[dir="rtl"] .legal-body h3,
[dir="rtl"] .legal-contact-box h3,
[dir="rtl"] .support-form-title,
[dir="rtl"] .support-topic-title {
  font-family: 'Cairo', sans-serif;
  letter-spacing: 0;
}

[dir="rtl"] .legal-body,
[dir="rtl"] .legal-header,
[dir="rtl"] .draft-text,
[dir="rtl"] .legal-contact-box p,
[dir="rtl"] .support-faq-answer {
  text-align: right;
}

[dir="rtl"] .legal-meta {
  direction: rtl;
}

[dir="rtl"] .legal-page-tag {
  flex-direction: row-reverse;
}

[dir="rtl"] .legal-back-link {
  flex-direction: row-reverse;
}

[dir="rtl"] .legal-footer-inner {
  flex-direction: row-reverse;
}

[dir="rtl"] .legal-footer-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .legal-draft-notice {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .legal-body ul,
[dir="rtl"] .legal-body ol {
  padding-left: 0;
  padding-right: 20px;
}

[dir="rtl"] .legal-table th,
[dir="rtl"] .legal-table td {
  text-align: right;
}

[dir="rtl"] .support-faq-question {
  flex-direction: row-reverse;
  text-align: right;
}

[dir="rtl"] .support-topic-card {
  text-align: right;
}

[dir="rtl"] .support-contact-card {
  text-align: right;
}

[dir="rtl"] .legal-nav-logo span {
  direction: ltr;
}
