/* DADATOK Shared Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
}

.dark {
  color-scheme: dark;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.dark ::-webkit-scrollbar-thumb {
  background: #475569;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(37, 99, 235, 0.3); }
  50% { box-shadow: 0 0 40px rgba(37, 99, 235, 0.5); }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulse-glow 2s ease-in-out infinite;
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #2563eb, #7c3aed, #db2777);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.dark .glass {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hero gradient background */
.hero-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #f1f5f9 100%);
}
.dark .hero-gradient {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}

/* Feature card hover */
.feature-card {
  transition: all 0.3s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
}

/* Comparison slider */
.comparison-slider {
  position: relative;
  overflow: hidden;
}
.comparison-slider .before-image,
.comparison-slider .after-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.comparison-slider .after-image {
  clip-path: inset(0 50% 0 0);
}

/* Upload zone */
.upload-zone {
  border: 2px dashed #cbd5e1;
  transition: all 0.3s ease;
}
.upload-zone:hover,
.upload-zone.dragover {
  border-color: #2563eb;
  background: rgba(37, 99, 235, 0.05);
}
.dark .upload-zone {
  border-color: #475569;
}
.dark .upload-zone:hover,
.dark .upload-zone.dragover {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
}

/* Language dropdown */
.lang-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}
.lang-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.active {
  transform: translateX(0);
}

/* Pricing card featured */
.pricing-featured {
  position: relative;
  border: 2px solid #2563eb;
}
.pricing-featured::before {
  content: attr(data-label);
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #2563eb;
  color: white;
  padding: 2px 16px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

/* Step indicator */
.step-line {
  position: absolute;
  top: 24px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}
.dark .step-line {
  background: #334155;
}

/* Image before/after comparison */
.img-compare {
  position: relative;
  cursor: col-resize;
}
.img-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
  z-index: 10;
}
.img-compare-handle::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}
.dark .auth-divider::before,
.dark .auth-divider::after {
  background: #334155;
}

/* Toast notification */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
}
.toast {
  transform: translateX(120%);
  transition: transform 0.3s ease;
}
.toast.show {
  transform: translateX(0);
}

/* RTL support */
[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

/* ============================================
   Comprehensive RTL Support for Arabic (ar)
   ============================================ */

/* Base direction */
[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

/* Utility: flip horizontal transforms & margins for RTL */
[dir="rtl"] .rtl-flip {
  transform: scaleX(-1);
}

[dir="rtl"] .space-x-1 > * + * { margin-right: 0.25rem;  margin-left: 0; }
[dir="rtl"] .space-x-2 > * + * { margin-right: 0.5rem;   margin-left: 0; }
[dir="rtl"] .space-x-3 > * + * { margin-right: 0.75rem;  margin-left: 0; }
[dir="rtl"] .space-x-4 > * + * { margin-right: 1rem;     margin-left: 0; }
[dir="rtl"] .space-x-6 > * + * { margin-right: 1.5rem;   margin-left: 0; }
[dir="rtl"] .space-x-8 > * + * { margin-right: 2rem;     margin-left: 0; }

[dir="rtl"] .mr-1,  [dir="rtl"] .mr-2,  [dir="rtl"] .mr-3,
[dir="rtl"] .mr-4,  [dir="rtl"] .mr-6,  [dir="rtl"] .mr-8,
[dir="rtl"] .mr-10, [dir="rtl"] .mr-12 {
  margin-right: 0 !important;
}
[dir="rtl"] .ml-1,  [dir="rtl"] .ml-2,  [dir="rtl"] .ml-3,
[dir="rtl"] .ml-4,  [dir="rtl"] .ml-6,  [dir="rtl"] .ml-8,
[dir="rtl"] .ml-10, [dir="rtl"] .ml-12 {
  margin-left: 0 !important;
}

[dir="rtl"] .pr-1,  [dir="rtl"] .pr-2,  [dir="rtl"] .pr-3,
[dir="rtl"] .pr-4,  [dir="rtl"] .pr-6,  [dir="rtl"] .pr-8 {
  padding-right: 0 !important;
}
[dir="rtl"] .pl-1,  [dir="rtl"] .pl-2,  [dir="rtl"] .pl-3,
[dir="rtl"] .pl-4,  [dir="rtl"] .pl-6,  [dir="rtl"] .pl-8 {
  padding-left: 0 !important;
}

/* Reverse flex rows */
[dir="rtl"] .flex-row {
  flex-direction: row-reverse;
}
[dir="rtl"] .md\:flex-row {
  flex-direction: row-reverse;
}
[dir="rtl"] .lg\:flex-row {
  flex-direction: row-reverse;
}

/* Text alignment */
[dir="rtl"] .text-left   { text-align: right; }
[dir="rtl"] .text-right  { text-align: left;  }
[dir="rtl"] .text-center { text-align: center; }

/* Floats */
[dir="rtl"] .float-left  { float: right; }
[dir="rtl"] .float-right { float: left;  }

/* Inset positioning */
[dir="rtl"] .left-0  { right: 0;  left: auto; }
[dir="rtl"] .right-0 { left: 0;   right: auto; }
[dir="rtl"] .inset-y-0.right-0 { left: 0; right: auto; }

/* Border radius corners */
[dir="rtl"] .rounded-l-lg { border-radius: 0 0.5rem 0.5rem 0; }
[dir="rtl"] .rounded-r-lg { border-radius: 0.5rem 0 0 0.5rem; }
[dir="rtl"] .rounded-l-md { border-radius: 0 0.375rem 0.375rem 0; }
[dir="rtl"] .rounded-r-md { border-radius: 0.375rem 0 0 0.375rem; }
[dir="rtl"] .rounded-l-xl { border-radius: 0 0.75rem 0.75rem 0; }
[dir="rtl"] .rounded-r-xl { border-radius: 0.75rem 0 0 0.75rem; }

/* Transform translateX flips */
[dir="rtl"] .translate-x-1\/2  { transform: translateX(-50%); }
[dir="rtl"] .-translate-x-1\/2 { transform: translateX(50%); }
[dir="rtl"] .translate-x-full   { transform: translateX(-100%); }
[dir="rtl"] .-translate-x-full  { transform: translateX(100%); }

/* Toast slide-in direction */
[dir="rtl"] .toast {
  transform: translateX(-120%);
}
[dir="rtl"] .toast.show {
  transform: translateX(0);
}

/* Navbar / dropdown positioning */
[dir="rtl"] .origin-top-right {
  transform-origin: top left;
}
[dir="rtl"] #language-dropdown {
  right: auto;
  left: 0;
}

/* Grid & card layouts: keep natural order for content reading,
   but reverse icon+text pairs inside cards */
[dir="rtl"] .grid > .flex-row {
  flex-direction: row-reverse;
}
