/* Custom CSS for Schedule Manager PWA */

:root {
  --primary-purple: #6f42c1;
  --primary-blue: #007bff;
  --success: #28a745;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #17a2b8;
  --light: #f8f9fa;
  --dark: #212529;
  --border: #dee2e6;
  --text-muted: #6c757d;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Global Styles */
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #f8f9fa;
  padding-top: 76px; /* Account for fixed navbar */
  padding-bottom: 80px; /* Account for bottom nav on mobile */
}

@media (min-width: 768px) {
  body {
    padding-bottom: 0;
  }
}

/* Custom gradient backgrounds */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
}

.text-primary {
  color: var(--primary-purple) !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
  border: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Navigation Styles */
.navbar-brand {
  font-size: 1.25rem;
}

.nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link.active {
  color: var(--primary-purple) !important;
}

.nav-link:hover {
  color: var(--primary-purple) !important;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 156px);
}

/* Card Styles */
.card {
  border: none;
  border-radius: 12px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Event Cards */
.event-card {
  border-left: 4px solid var(--primary-purple);
  margin-bottom: 1rem;
}

.event-card.completed {
  border-left-color: var(--success);
  opacity: 0.8;
}

.event-card.missed {
  border-left-color: var(--danger);
}

.event-card.upcoming {
  border-left-color: var(--info);
}

.event-time {
  font-weight: 600;
  color: var(--primary-purple);
  font-size: 1.1rem;
}

.event-title {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.event-duration {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.event-tags {
  margin-top: 0.5rem;
}

.event-tag {
  display: inline-block;
  background: var(--light);
  color: var(--dark);
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 1rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
}

.timeline-marker {
  position: absolute;
  left: -2rem;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary-purple);
  border: 3px solid white;
  box-shadow: var(--shadow);
}

.timeline-marker.current {
  background: var(--info);
  animation: pulse 2s infinite;
}

.timeline-marker.completed {
  background: var(--success);
}

.timeline-marker.missed {
  background: var(--danger);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(23, 162, 184, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(23, 162, 184, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(23, 162, 184, 0);
  }
}

/* Floating Action Button */
.fab-container {
  position: fixed;
  bottom: 90px;
  right: 1rem;
  z-index: 1000;
}

@media (min-width: 768px) {
  .fab-container {
    bottom: 2rem;
  }
}

.fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all 0.3s ease;
}

.fab:hover {
  transform: scale(1.1);
}

.fab i {
  font-size: 1.5rem;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-top: 1px solid var(--border);
  padding: 0.5rem 0;
  z-index: 1000;
}

.bottom-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.3s ease;
  padding: 0.25rem;
}

.bottom-nav-link.active,
.bottom-nav-link:hover {
  color: var(--primary-purple);
  text-decoration: none;
}

.bottom-nav-link i {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.bottom-nav-link small {
  font-size: 0.75rem;
  font-weight: 500;
}

/* Form Styles */
.form-control {
  border-radius: 8px;
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--dark);
  margin-bottom: 0.5rem;
}

/* Toggle Switch */
.form-switch .form-check-input {
  width: 3rem;
  height: 1.5rem;
  background-color: var(--border);
  border: none;
  border-radius: 1rem;
}

.form-switch .form-check-input:checked {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-blue) 100%);
}

/* Badge Styles */
.badge {
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
}

/* Alert Styles */
.alert {
  border: none;
  border-radius: 8px;
  font-weight: 500;
}

/* Loading States */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(111, 66, 193, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-purple);
  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: loading 1.5s infinite;
}

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

/* Responsive Utilities */
@media (max-width: 767px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .display-6 {
    font-size: 1.75rem;
  }
  
  .fab-container {
    bottom: 90px;
  }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here */
}

/* Print styles */
@media print {
  .navbar,
  .bottom-nav,
  .fab-container {
    display: none !important;
  }
  
  body {
    padding-top: 0;
    padding-bottom: 0;
  }
}

/* Accessibility improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 1px solid var(--dark);
  }
}

