/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Timeline specific styles */
.timeline-horizontal {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f1f5f9;
}

.timeline-horizontal::-webkit-scrollbar {
  height: 6px;
}

.timeline-horizontal::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 3px;
}

.timeline-horizontal::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.timeline-horizontal::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

.milestone-card {
  transition: all 0.2s ease-in-out;
}

.milestone-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.timeline-dot {
  transition: all 0.2s ease-in-out;
}

.timeline-item:hover .timeline-dot {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.confidence-badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.category-badge {
  font-size: 0.75rem;
  font-weight: 500;
}

.year-badge {
  font-size: 0.875rem;
  font-weight: 600;
}

/* Mobile responsiveness for timeline */
@media (max-width: 1024px) {
  .timeline-horizontal {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .timeline-milestone {
    width: 16rem;
  }
}

@media (max-width: 768px) {
  .timeline-milestone {
    width: 14rem;
  }
  
  .timeline-vertical .milestone-card {
    padding: 1rem;
  }
  
  .milestone-value {
    font-size: 1.5rem;
  }
}

/* Hotwire Native specific styles */
@media (hotwire-native) {
  .web-only { 
    display: none !important; 
  }
  
  .native-hidden { 
    display: none !important; 
  }
  
  /* Optimize forms for mobile */
  .form-container {
    padding: 1rem;
    margin: 0;
  }
  
  /* Remove web-specific elements */  
  .footer { 
    display: none; 
  }
  
  .desktop-sidebar { 
    display: none; 
  }
  
  /* Improve touch targets */
  button, 
  .btn,
  input[type="submit"] {
    min-height: 44px;
    padding: 12px 16px;
  }
  
  /* Better form spacing on mobile */
  .form-group,
  .field {
    margin-bottom: 1.5rem;
  }
  
  /* Optimize input fields */
  input[type="text"],
  input[type="email"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: 12px;
    border-radius: 8px;
  }
}

.native-only { 
  display: none; 
}

@media (hotwire-native) {
  .native-only { 
    display: block; 
  }
}

/* Field with errors styling for Rails forms */
.field_with_errors {
  display: contents; /* Prevents wrapper from breaking layout */
}

.field_with_errors input,
.field_with_errors select,
.field_with_errors textarea {
  border-color: rgb(239 68 68) !important; /* red-500 */
  background-color: rgb(254 242 242); /* red-50 */
}

.field_with_errors input:focus,
.field_with_errors select:focus,
.field_with_errors textarea:focus {
  border-color: rgb(239 68 68) !important; /* red-500 */
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.field_with_errors label {
  color: rgb(220 38 38); /* red-600 */
}
