@tailwind base;
@tailwind components;
@tailwind utilities;

/* Base styles */
html {
  direction: rtl;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  direction: rtl;
  text-align: right;
}

/* Custom Scrollbar - Light & Dark mode */
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  background-color: transparent;
}

::-webkit-scrollbar-thumb {
  background-color: #d85772;
  border-radius: 10px;
  border: 1px solid transparent;
}

/* Dark mode override */
.dark ::-webkit-scrollbar-thumb {
  background-color: #d85772;
}

.dark body {
  background-color: #1e293b;
}


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

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

@keyframes gradient {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Utility classes */
.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-pulse-slow {
  animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.gradient-animate {
  background-size: 200% 200%;
  animation: gradient 3s ease infinite;
}

/* Glass morphism effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass {
  background: rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Custom button styles */
.btn-primary {
  @apply bg-primary text-white font-semibold rounded-xl px-6 py-3 shadow hover:bg-secondary hover:text-primary transition-all duration-200;
}
.btn-secondary {
  @apply bg-secondary text-primary font-semibold rounded-xl px-6 py-3 shadow hover:bg-primary hover:text-white transition-all duration-200;
}

/* Form styles */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 dark:border-slate-600 rounded-xl bg-white dark:bg-slate-700 text-gray-900 dark:text-white focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 dark:text-gray-300 mb-2;
}

/* Card styles */
.card {
  @apply bg-white/80 dark:bg-slate-800/80 backdrop-blur-md rounded-2xl p-6 border border-gray-200/50 dark:border-slate-700/50 hover:shadow-xl transition-all duration-300;
}

.card-primary {
  background: #f4d0d8;
  color: #545454;
}

/* Text gradient */
.text-gradient {
  @apply bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent;
}

.heading-gradient {
  background: linear-gradient(90deg, #d85772 0%, #f4d0d8 150%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
}

.text-logo {
  color: #545454;
}

/* סלוגן מתחת ללוגו */
.logo-slogan {
  font-size: 1.1rem;
  color: #545454;
  font-weight: 500;
  margin-top: 0.25rem;
  text-align: center;
  letter-spacing: 0.02em;
}

/* Responsive text sizes */
.text-responsive-xl {
  @apply text-2xl md:text-3xl lg:text-4xl;
}

.text-responsive-lg {
  @apply text-lg md:text-xl lg:text-2xl;
}

/* Hover effects */
.hover-lift {
  @apply hover:shadow-xl hover:scale-105 transition-all duration-300;
}

.hover-glow {
  @apply hover:shadow-lg hover:shadow-blue-500/25 transition-all duration-300;
}

/* Focus styles for accessibility */
.focus-ring {
  @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 dark:focus:ring-offset-slate-800;
}

/* Loading states */
.loading {
  @apply animate-pulse bg-gray-200 dark:bg-slate-700;
}

/* Success/Error states */
.success {
  @apply text-green-600 dark:text-green-400;
}

.error {
  @apply text-red-600 dark:text-red-400;
}

/* Custom spacing for RTL */
.space-x-reverse > * + * {
  margin-right: 0.5rem;
  margin-left: 0;
}

/* Mobile menu styles */
.mobile-menu {
  @apply fixed inset-0 bg-black/50 backdrop-blur-sm z-50 md:hidden;
}

.mobile-menu-content {
  @apply fixed right-0 top-0 h-full w-64 bg-white dark:bg-slate-800 shadow-xl transform transition-transform duration-300;
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    @apply border-2 border-gray-900 dark:border-white;
  }
  
  .btn-primary {
    @apply border-2 border-blue-900;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* התאמת שדה הטלפון של intl-tel-input לעיצוב של שאר השדות */
.iti {
  width: 100%;
}
.iti--allow-dropdown input,
.iti--allow-dropdown input[type=tel] {
  width: 100%;
  padding-right: 52px !important; /* מקום לדגל */
  direction: ltr;
  text-align: left;
  background: transparent;
  border-radius: 0.75rem; /* כמו rounded-xl */
  border: 1px solid #d1d5db; /* כמו border-gray-300 */
  height: 48px; /* כמו py-3 */
  font-size: 1rem;
  color: #111827; /* כמו text-gray-900 */
  box-sizing: border-box;
  transition: border-color 0.2s;
}
.dark .iti--allow-dropdown input,
.dark .iti--allow-dropdown input[type=tel] {
  border-color: #334155; /* dark:border-slate-600 */
  background: #334155;   /* dark:bg-slate-700 */
  color: #fff;
}
.iti__flag-container {
  right: 8px;
  left: auto;
}
[dir="rtl"] .iti__flag-container {
  left: 8px;
  right: auto;
}
.iti--allow-dropdown input:focus {
  border-color: #2563eb; /* focus:ring-blue-500 */
  outline: none;
  box-shadow: 0 0 0 2px #2563eb33;
}
