/* style.css - Complete Stylesheet for Mobile Shops Market Analysis Dashboard */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800;900&family=Tajawal:wght@400;500;700;900&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
}

html.dark {
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #93c5fd;
  --bg-main: #0b0f19;
  --bg-card: #151d30;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #243049;
}

body {
  font-family: 'Tajawal', 'Cairo', 'Inter', system-ui, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* RTL / LTR tweaks */
html[dir="rtl"] body {
  font-family: 'Tajawal', 'Cairo', sans-serif;
}

html[dir="ltr"] body {
  font-family: 'Inter', system-ui, sans-serif;
}

/* Badges */
.badge-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  vertical-align: middle;
}

.badge-verified {
  background-color: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

html.dark .badge-verified {
  background-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.35);
}

.badge-estimated {
  background-color: rgba(245, 158, 11, 0.12);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

html.dark .badge-estimated {
  background-color: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.35);
}

.badge-calculated {
  background-color: rgba(59, 130, 246, 0.12);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.25);
}

html.dark .badge-calculated {
  background-color: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.badge-assumption {
  background-color: rgba(168, 85, 247, 0.12);
  color: #7c3aed;
  border: 1px solid rgba(168, 85, 247, 0.25);
}

html.dark .badge-assumption {
  background-color: rgba(168, 85, 247, 0.2);
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
}

.badge-opinion {
  background-color: rgba(244, 63, 94, 0.12);
  color: #e11d48;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

html.dark .badge-opinion {
  background-color: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.35);
}

/* Navigation Buttons */
.nav-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 0.6rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  background: transparent;
  border: none;
  cursor: pointer;
}

.nav-tab-btn:hover {
  color: var(--primary);
  background-color: rgba(37, 99, 235, 0.08);
}

.nav-tab-btn.active {
  color: #ffffff;
  background-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Sub-tabs */
.top20-subtab-btn {
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.top20-subtab-btn.active {
  background-color: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* Modal styling */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}
html.dark ::-webkit-scrollbar-thumb {
  background: #334155;
}

/* Print Friendly */
@media print {
  .nav-bar, #themeToggleBtn, #langToggleBtn, .no-print {
    display: none !important;
  }
}
