/* 
 * EduLMS - Global Styles
 * Tailwind CSS Custom Extensions
 */

/* RTL/LTR Transitions */
* {
  transition: all 0.3s ease;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2563eb, #1d4ed8);
}

/* Glassmorphism effect */
.glass {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Card hover effects */
.card-hover {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Button animations */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

/* Floating label animation */
.floating-label {
  position: relative;
}

/* Auth page language toggle positioning */
[dir="rtl"] .auth-language-toggle {
  right: auto;
  left: 1rem;
}

@media (min-width: 640px) {
  [dir="rtl"] .auth-language-toggle {
    left: 1.5rem;
  }
}

@media (max-width: 375px) {
  .auth-page {
    padding: 0.75rem;
  }

  .auth-page .auth-shell {
    max-width: 100%;
  }

  .auth-page .auth-card {
    padding: 1rem;
    border-radius: 1.5rem;
  }

  .auth-page .auth-back-link {
    margin-bottom: 0.75rem;
  }

  .auth-page .auth-language-toggle {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.5rem;
  }

  [dir="rtl"] .auth-page .auth-language-toggle {
    right: auto;
    left: 0.75rem;
  }

  .auth-page .auth-language-toggle i {
    font-size: 0.95rem;
  }
}

/* RTL specific adjustments */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .flex {
  flex-direction: row-reverse;
}

[dir="rtl"] .flex-col {
  flex-direction: column-reverse;
}

/* Loading spinner */
.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Countdown timer */
.countdown-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3b82f6;
}

/* Progress bar animation */
.progress-bar {
  transition: width 1s ease-in-out;
}

/* Sidebar transitions */
.sidebar {
  transition: transform 0.3s ease;
}

/* Dashboard responsive improvements */
@media (max-width: 768px) {
  .sidebar {
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }
  
  main {
    padding: 1rem !important;
  }
  
  .stat-number {
    font-size: 2rem !important;
  }
  
  .chart-container {
    height: 250px !important;
  }
}

/* Mobile menu */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

[dir="rtl"] .mobile-menu {
  transform: translateX(100%);
}

.mobile-menu.active {
  transform: translateX(0);
}

/* Chart containers */
.chart-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* Stats counter animation */
.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3b82f6;
}

/* Testimonial card */
.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 2rem;
}

[dir="rtl"] .timeline-item {
  padding-left: 0;
  padding-right: 2rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  background: #3b82f6;
}

[dir="rtl"] .timeline-item::before {
  left: auto;
  right: 0;
}

/* Form validation */
.input-error {
  border-color: #ef4444;
}

.input-success {
  border-color: #10b981;
}

.error-message {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Responsive utilities */
@media (max-width: 640px) {
  .mobile-hide {
    display: none;
  }
  
  .mobile-show {
    display: block;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
}
