/* ==========================================================================
   TakinCyber - Legal Documents & Policies Dedicated Stylesheet
   Strict RTL • Heebo Typography • Dark Obsidian Palette • Print Ready
   ========================================================================== */

:root {
  --bg-obsidian: #07090e;
  --bg-darker: #020617;
  --bg-slate: #0f172a;
  --bg-surface: rgba(15, 23, 42, 0.85);
  --glass-border: rgba(14, 165, 233, 0.22);
  --glass-border-hover: rgba(0, 240, 255, 0.45);

  --cyan-glow: #00f0ff;
  --cyber-blue: #0ea5e9;
  --cyber-emerald: #10b981;
  --cyber-warning: #f59e0b;
  --cyber-critical: #ef4444;

  --text-bright: #f8fafc;
  --text-secondary: #94a3b8;
  --text-dim: #64748b;
  --text-heading: #ffffff;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-obsidian);
  color: var(--text-bright);
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

/* --- Legal Top Navigation --- */
.legal-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(7, 9, 14, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(14, 165, 233, 0.15);
}

.legal-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-heading);
  font-weight: 800;
  font-size: 1.25rem;
}

.legal-brand-shield {
  color: var(--cyan-glow);
  font-size: 1.4rem;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(14, 165, 233, 0.1);
  color: var(--cyan-glow);
  border: 1px solid rgba(14, 165, 233, 0.3);
  padding: 0.5rem 1.15rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.btn-back-home:hover {
  background: rgba(0, 240, 255, 0.2);
  border-color: var(--cyan-glow);
  box-shadow: 0 0 12px rgba(0, 240, 255, 0.3);
}

/* --- Legal Container & Typography --- */
.legal-wrapper {
  max-width: 940px;
  margin: 2.5rem auto 4rem;
  padding: 0 1.5rem;
}

.legal-card {
  background: var(--bg-surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 3rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.legal-header {
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.legal-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: var(--text-heading);
  margin-bottom: 0.6rem;
  line-height: 1.25;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  color: var(--text-dim);
  font-size: 0.9rem;
}

.legal-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- Callout Alert Boxes --- */
.legal-callout {
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  margin: 1.75rem 0;
  line-height: 1.7;
}

.legal-callout.warning {
  background: rgba(245, 158, 11, 0.08);
  border-right: 4px solid var(--cyber-warning);
  border-top: 1px solid rgba(245, 158, 11, 0.2);
  border-bottom: 1px solid rgba(245, 158, 11, 0.2);
  border-left: 1px solid rgba(245, 158, 11, 0.2);
}

.legal-callout.emerald {
  background: rgba(16, 185, 129, 0.08);
  border-right: 4px solid var(--cyber-emerald);
  border-top: 1px solid rgba(16, 185, 129, 0.2);
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  border-left: 1px solid rgba(16, 185, 129, 0.2);
}

.legal-callout.cyan {
  background: rgba(0, 240, 255, 0.08);
  border-right: 4px solid var(--cyan-glow);
  border-top: 1px solid rgba(0, 240, 255, 0.2);
  border-bottom: 1px solid rgba(0, 240, 255, 0.2);
  border-left: 1px solid rgba(0, 240, 255, 0.2);
}

.legal-callout-title {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-callout.warning .legal-callout-title { color: var(--cyber-warning); }
.legal-callout.emerald .legal-callout-title { color: var(--cyber-emerald); }
.legal-callout.cyan .legal-callout-title { color: var(--cyan-glow); }

/* --- Document Content Sections --- */
.legal-section {
  margin: 2rem 0;
}

.legal-section h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--cyan-glow);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-section h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-bright);
  margin: 1.25rem 0 0.5rem;
}

.legal-section p {
  margin-bottom: 1rem;
  color: #cbd5e1;
  font-size: 1rem;
}

.legal-section ul, .legal-section ol {
  margin: 0.75rem 1.5rem 1.25rem 0;
  color: #cbd5e1;
}

.legal-section li {
  margin-bottom: 0.5rem;
}

.legal-section strong {
  color: #ffffff;
}

/* --- Cancellation Form Component --- */
.cancel-form-box {
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 1.75rem;
  margin-top: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
}

.form-input {
  width: 100%;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: var(--cyan-glow);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.btn-submit-legal {
  background: linear-gradient(135deg, var(--cyber-blue), #2563eb);
  color: #fff;
  border: none;
  padding: 0.85rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-submit-legal:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.4);
}

/* --- Legal Footer --- */
.legal-footer {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  color: var(--text-dim);
  font-size: 0.85rem;
}

.legal-footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.legal-footer-links a {
  color: var(--cyan-glow);
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-footer-links a:hover {
  text-decoration: underline;
  color: #fff;
}

/* --- Print Styles --- */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  .legal-nav, .btn-back-home, .cancel-form-box, .legal-footer-links {
    display: none !important;
  }
  .legal-card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    background: #fff !important;
  }
  .legal-callout {
    border: 1px solid #ccc !important;
    background: #f9f9f9 !important;
    color: #000 !important;
  }
}
