*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Colors */
  --primary: #5b9dd9;
  --primary-dark: #4a8bc2;
  --primary-light: #7ab5e6;
  --secondary: #1e3a5f;
  --accent: #c9a961;
  --danger: #ef4444;
  --success: #10b981;
  
  /* Neutrals */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
  --shadow-primary: 0 8px 24px rgba(91, 157, 217, 0.35);
  --shadow-primary-hover: 0 12px 30px rgba(91, 157, 217, 0.45);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Background */
  --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e2ecf5 100%);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Cairo', 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', 
    'Roboto', 'Helvetica Neue', sans-serif;
  font-weight: 400;
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--gray-50);
  direction: rtl;
  overflow-x: hidden;
  min-height: 100vh;
}

#root {
  min-height: 100vh;
  width: 100%;
}

button {
  cursor: pointer;
  border: none;
  outline: none;
  font-family: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input, select, textarea {
  font-family: inherit;
  direction: rtl;
  -webkit-tap-highlight-color: transparent;
}

input:focus, select:focus, textarea:focus {
  outline: none;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

p {
  line-height: 1.7;
}

/* Prevent horizontal scrolling */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-300);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-400);
}

/* Selection */
::selection {
  background: var(--primary);
  color: white;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

/* ------------------------------------------------------------
   PHP-specific compatibility: anchor tags styled like buttons.
   In the React version these were <button> elements; here they
   are <a> tags for real navigation, so we need to reset their
   inline text default so shared button styles work correctly.
   ------------------------------------------------------------ */
a.search-lawyer-button,
a.admin-link-button,
a.search-again-button,
a.add-lawyer-button,
a.back-button-login,
a.back-button,
a.next-button,
a.reset-button,
a.location-button,
a.action-button,
a.retry-button,
a.submit-button {
  text-decoration: none;
  box-sizing: border-box;
}

a.nav-item {
  text-decoration: none;
  color: inherit;
}
