/* TimeScroll Custom Styles */

/* Simple & Clean CSS Variables */
:root {
  /* Primary Colors - Minimal Palette */
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Simple Accent */
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --green-500: #10b981;
  --red-500: #ef4444;
  --yellow-500: #f59e0b;
  
  /* Clean Backgrounds */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-dark: #1e293b;
  --bg-accent: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
  
  /* Simple Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  
  /* Border Radius */
  --radius: 0.375rem;
  --radius-lg: 0.5rem;
  
  /* Transitions */
  --transition: 0.15s ease;
  --transition-fast: 0.1s ease;
  --transition-normal: 0.2s ease;
  
  /* Primary Color System (for missing variables) */
  --primary-50: #f8fafc;
  --primary-100: #f1f5f9;
  --primary-200: #e2e8f0;
  --primary-300: #cbd5e1;
  --primary-400: #94a3b8;
  --primary-500: #64748b;
  --primary-600: #475569;
  --primary-700: #334155;
  --primary-800: #1e293b;
  --primary-900: #0f172a;
  
  /* Accent Colors */
  --accent-orange: #f97316;
  
  /* Additional Shadows */
  --shadow-soft: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 4px 8px rgba(0, 0, 0, 0.1);
  
  /* Border Radius Extension */
  --radius-xl: 0.75rem;
}

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

html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  font-variation-settings: 'opsz' 32;
}

/* Typography Classes - Force Light Mode */
.text-brand-primary {
  color: #0f172a !important;
}

.text-brand-secondary {
  color: #475569 !important;
}

.text-accent {
  color: var(--blue-600) !important;
}

.font-mono {
  font-family: 'JetBrains Mono', 'Menlo', 'Monaco', 'Consolas', monospace;
}

/* Enhanced Heading Styles */
.heading-xl {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: var(--bg-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heading-lg {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
  position: relative;
}

.heading-md {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  position: relative;
}

.heading-sm {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
  position: relative;
  transition: all var(--transition-fast);
}

.heading-sm:hover {
  transform: translateX(2px);
}

/* Enhanced Event Title Styling */
.event-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--primary-900);
  margin-bottom: 0.5rem;
  transition: all var(--transition-fast);
  position: relative;
}

.event-title::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--bg-accent);
  transition: width var(--transition-normal);
}

.event-title:hover::before {
  width: 100%;
}

.event-title:hover {
  color: var(--accent-orange);
}

/* Body Text */
.body-lg {
  font-size: 1.125rem;
  line-height: 1.7;
  font-weight: 400;
}

.body-md {
  font-size: 1rem;
  line-height: 1.6;
  font-weight: 400;
}

.body-sm {
  font-size: 0.875rem;
  line-height: 1.5;
  font-weight: 400;
}

/* Background Utilities - Force Light Mode */
.bg-brand-primary {
  background: #ffffff !important;
}

.bg-brand-secondary {
  background: #f8fafc !important;
}

.bg-accent {
  background: var(--blue-500) !important;
}

/* Simple Card Design - Force Light Mode */
.card-elevated {
  background: #ffffff !important;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition);
}

.card-elevated:hover {
  box-shadow: var(--shadow-md);
}

/* Simple Glass Effect - Force White Background with Clear Borders */
.glass {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important; /* gray-300 equivalent */
  border-radius: var(--radius);
  transition: border-color var(--transition);
}

.glass:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  outline: none;
}

.glass-dark {
  background: var(--bg-dark);
  border: 1px solid var(--gray-700);
  color: white;
}

/* Simple Button Design */
.btn-primary {
  background: var(--blue-500);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background-color var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 2.5rem;
}

.btn-primary:hover {
  background: var(--blue-600);
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-primary);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 2.5rem;
}

.btn-secondary:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  text-decoration: none;
}

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 400;
  font-size: 0.875rem;
  transition: background-color var(--transition);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-ghost:hover {
  background: var(--gray-100);
  text-decoration: none;
}

/* Simple Timeline Design */
.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue-500);
  border: 2px solid white;
  box-shadow: var(--shadow);
}

.timeline-line {
  background: var(--gray-300);
  width: 2px;
}

/* Simple Category Badge Design */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--gray-300);
  background: var(--gray-50);
}

.category-badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
  font-size: 0.65rem;
  font-weight: 500;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.9);
}

.glass-subtle {
  background: #ffffff !important;
  border: 1px solid #d1d5db !important; /* gray-300 equivalent */
  border-radius: var(--radius);
}

.glass-subtle:focus {
  border-color: var(--blue-500);
  outline: none;
}

/* Simple Animation Utilities */
.animate-fade-in {
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
}

.animate-fade-in-delayed {
  opacity: 0;
  animation: fadeIn 0.3s ease 0.1s forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

/* Toast Animation */
.toast-enter {
  opacity: 0;
  transform: translateX(100%) scale(0.9);
  animation: toastSlideIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(100%) scale(0.9);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-text {
  height: 1rem;
  border-radius: 4px;
}

.skeleton-text-lg {
  height: 1.25rem;
  border-radius: 6px;
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
}

.skeleton-button {
  height: 2.5rem;
  border-radius: 6px;
}

/* Enhanced Button Loading States */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: currentColor;
  animation: spin 1s ease-in-out infinite;
}

.btn-loading .btn-text {
  opacity: 0;
}

/* Form Loading States */
.form-loading {
  position: relative;
  opacity: 0.6;
  pointer-events: none;
}

.form-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.form-loading::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 3px solid rgba(59, 130, 246, 0.3);
  border-radius: 50%;
  border-top-color: #3b82f6;
  animation: spin 1s ease-in-out infinite;
  z-index: 11;
}

/* Pulse Animation for Loading States */
.pulse-loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

/* Line Clamp Utility */
.line-clamp-1 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.line-clamp-2 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.line-clamp-3 {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.interactive {
  transform: translateY(0);
  transition: all 0.2s ease-out;
}

.interactive:hover {
  transform: translateY(-2px);
}

.interactive:active {
  transform: translateY(0);
}

/* Results Summary Styling */
.results-summary {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin: 1rem 0;
  box-shadow: var(--shadow-soft);
}

/* Responsive Typography */
@media (max-width: 768px) {
  .heading-xl {
    font-size: 2.5rem;
  }
  
  .heading-lg {
    font-size: 2rem;
  }
  
  .heading-md {
    font-size: 1.25rem;
  }
}

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

/* Enhanced Mobile Timeline Card Styling */
.mobile-timeline-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-medium);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
  margin-bottom: 1rem;
}

.mobile-timeline-card:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-soft);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* Mobile Header */
  .mobile-header {
    padding: 0.5rem 1rem;
    min-height: 60px;
  }
  
  .mobile-logo {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .mobile-title {
    font-size: 1.125rem;
    font-weight: 700;
  }
  
  /* Mobile Timeline */
  .mobile-timeline-container {
    padding: 0.75rem;
  }
  
  .mobile-timeline-line {
    display: none; /* Hide timeline line on mobile */
  }
  
  /* Mobile Cards */
  .mobile-card {
    margin-bottom: 0.75rem;
    padding: 1rem;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }
  
  .mobile-card-spacing {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
  }
  
  /* Mobile Date Headers */
  .mobile-date-header {
    position: sticky;
    top: 70px; /* Account for mobile header height */
    z-index: 20;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .mobile-date-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-700);
  }
  
  /* Mobile Typography */
  .mobile-event-title {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
  }
  
  .mobile-event-time {
    font-size: 0.75rem;
  }
  
  .mobile-category-badge {
    padding: 0.125rem 0.5rem;
    font-size: 0.625rem;
    border-radius: 0.375rem;
  }
  
  /* Mobile Filter */
  .mobile-filter {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
  }
  
  .mobile-filter-button {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    min-width: 60px;
  }
  
  /* Touch Targets */
  .mobile-touch-target {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Mobile Loading */
  .mobile-loading {
    padding: 1rem;
    margin: 1rem;
  }
  
  /* Reduce margins and paddings */
  .mobile-reduced-spacing .space-y-6 > * + * {
    margin-top: 0.75rem;
  }
  
  .mobile-reduced-spacing .space-y-4 > * + * {
    margin-top: 0.5rem;
  }
  
  .mobile-reduced-spacing .space-y-3 > * + * {
    margin-top: 0.5rem;
  }
  
  /* Mobile scroll behavior */
  .mobile-timeline-container {
    scroll-behavior: smooth;
    transition: transform 0.2s ease-out;
  }
  
  /* Mobile card hover effects */
  .mobile-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease-out;
  }
  
  /* Mobile swipe feedback */
  .mobile-timeline-container:not(:active) {
    transition: transform 0.3s ease-out;
  }
  
  /* Mobile card transitions */
  .mobile-card {
    transition: all 0.2s ease-out;
  }
  
  /* Mobile filter animation */
  .mobile-filter {
    transition: background-color 0.2s ease-out;
  }
  
  /* Mobile comment section styling */
  .mobile-card .comment {
    font-size: 0.75rem;
    line-height: 1.4;
  }
  
  .mobile-card .comment-toggle {
    color: var(--primary-600);
    transition: color 0.2s ease-out;
  }
  
  .mobile-card .comment-toggle:hover {
    color: var(--accent-orange);
  }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
  .mobile-header {
    padding: 0.375rem 0.75rem;
  }
  
  .mobile-timeline-container {
    padding: 0.5rem;
  }
  
  .mobile-card {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .mobile-date-header {
    top: 60px;
    padding: 0.375rem 0.75rem;
    margin-bottom: 0.5rem;
  }
}

/* Force Light Mode - Disable Dark Mode */
html {
  color-scheme: light only !important;
}

html, body {
  background-color: #ffffff !important;
  color: #000000 !important;
}

/* Force all elements to use light theme */
* {
  color-scheme: light only !important;
}

/* Force all input elements to have white background and visible borders */
input, textarea, select {
  background-color: #ffffff !important;
  color: #000000 !important;
  border: 1px solid #d1d5db !important; /* gray-300 equivalent */
  border-radius: 0.375rem !important;
  padding: 0.5rem 0.75rem !important;
}

input:focus, textarea:focus, select:focus {
  background-color: #ffffff !important;
  color: #000000 !important;
  border-color: #3b82f6 !important; /* blue-500 */
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  outline: none !important;
}

/* Exception for checkbox and radio inputs */
input[type="checkbox"], input[type="radio"] {
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  border-radius: 0.25rem !important;
}

input[type="file"] {
  padding: 0.375rem 0 !important;
  border: 1px solid #d1d5db !important;
}

/* Dark mode disabled - keeping code commented for future use
@media (prefers-color-scheme: dark) and (max-width: 0px) {
  :root {
    --bg-secondary: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    
    /* Override text colors for dark mode */
    --primary-900: #f1f5f9;  /* Light text for dark backgrounds */
    --primary-800: #e2e8f0;
    --primary-700: #cbd5e1;
    --primary-600: #94a3b8;
    --primary-500: #64748b;
    --primary-400: #475569;
    --primary-300: #334155;
    --primary-200: #1e293b;
    --primary-100: #0f172a;
    --primary-50: #020617;
  }
  
  /* Dark mode text utilities */
  .text-brand-primary {
    color: var(--primary-900);
  }
  
  .text-brand-secondary {
    color: var(--primary-600);
  }
  
  /* Dark mode card styling */
  .card-elevated {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .card-elevated::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  }
  
  .card-elevated:hover {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(255, 255, 255, 0.2);
  }
  
  .card-elevated:hover::before {
    background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.3), rgba(236, 72, 153, 0.3), rgba(139, 92, 246, 0.3), transparent);
  }
  
  /* Dark mode glass styling */
  .glass {
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
  
  .glass:focus {
    border-color: rgba(59, 130, 246, 0.8);
  }
  
  /* Dark mode date header styling */
  .mobile-date-header {
    background: rgba(15, 23, 42, 0.95);
    color: var(--primary-900);
  }
  
  .mobile-date-text {
    color: var(--primary-700);
  }
  
  /* Dark mode loading indicator */
  .results-summary {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
  }
  
  /* Dark mode timeline elements */
  .timeline-dot {
    border-color: rgba(30, 41, 59, 0.8);
  }
  
  .timeline-dot::after {
    background: var(--primary-900);
  }
  
  @media (max-width: 768px) {
    .mobile-date-header {
      background: rgba(15, 23, 42, 0.95);
    }
  }
}