/* Marathon Training App - Day View Styles */
/* Mobile-first design optimized for iPhone 16 Pro */
/* Theme-aware design system */

/* Default/fallback theme variables - only for properties not defined in theme files */
:root {
  /* Core layout variables (not theme-specific) */
  --border-radius: 0px;
  --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --touch-target: 48px;
  
  /* Typography fallback */
  --font-family-primary: "Helvetica Neue", Helvetica, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Reset and base styles */
* {
  box-sizing: border-box;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Screen reader only class */
.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 for accessibility */
a:focus,
button:focus,
[tabindex]:focus {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Ensure all interactive elements meet WCAG 2.2 AA touch target requirements */
button,
input[type="button"],
input[type="submit"],
input[type="reset"],
a,
a.btn,
.action-btn,
.nav-btn,
.route-auth-btn,
.route-link,
.playlist-link,
[role="button"],
[href] {
  min-height: 44px !important;
  min-width: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  padding: 8px !important;
}

/* High contrast focus for better visibility */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8);
}

body.day-view {
  font-family: var(--font-family-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: var(--light-gray);
  color: var(--dark-gray);
}

.wrapper {
  max-width: 100%;
  padding: 0 10px;
  margin: 0 auto;
}

/* Header - Subway Station Style */
.site-header {
  background: var(--nyc-white, white);
  border-top: 10px solid var(--nyc-black);
  border-bottom: 2px solid var(--nyc-black, #e9ecef);
  padding: 8px 0 12px 0;
  position: relative;
}


.site-header .wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding-left: 16px;
}

.site-title {
  font-family: "Helvetica Neue", Helvetica, sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--nyc-black);
  text-align: left;
  width: 100%;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: nowrap;
  width: 100%;
}

.nav-link {
  text-decoration: none;
  color: var(--medium-gray);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 20px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-link.active {
  background: var(--primary-color);
  color: white;
}

/* Main content container */
.day-view-container {
  padding: 4px 0 8px 0;
  max-width: 480px;
  margin: 0 auto;
}

/* Date Display */
.current-date {
  text-align: center;
  margin-bottom: 12px;
  padding: 0;
}

/* Date Navigation - NYC Subway Style */
.date-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.nav-btn {
  background: var(--nyc-white);
  color: var(--nyc-black);
  border: 2px solid var(--nyc-black);
  border-top: 6px solid var(--nyc-black);
  border-radius: 0;
  padding: 18px 24px;
  font-family: var(--font-family-primary);
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 140px;
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  position: relative;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.12);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


.nav-btn:hover {
  background: var(--nyc-blue-bg);
  color: var(--primary-color);
}

/* Make SVG backgrounds transparent on hover to blend with light blue background */
.nav-btn:hover svg rect[fill="white"] {
  fill: transparent;
}

.nav-btn:active {
  opacity: 0.8;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* NYC Subway Style Arrows - Authentic SVG Design */
.nav-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  position: relative;
}

/* Left Arrow for Previous - NYC Standards Manual Style */
.prev-day .nav-icon {
  background-image: url('/assets/images/arrow-left.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 16px;
}

/* Right Arrow for Next - NYC Standards Manual Style */
.next-day .nav-icon {
  background-image: url('/assets/images/arrow-right.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 32px 16px;
}

/* Remove the old CSS triangle fallbacks */
.prev-day .nav-icon::before,
.next-day .nav-icon::before {
  display: none;
}

/* Text positioning - Previous (text after arrow) */
.prev-day {
  flex-direction: row;
}


.date-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  color: var(--dark-gray);
  text-align: center;
}

.jump-to-today-link {
  display: block;
  text-align: center;
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.jump-to-today-link:hover {
  text-decoration: underline;
}

/* Progress Indicator - Subway Line Style */
.progress-container {
  margin-bottom: 12px;
  padding: 16px 8px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
}

.progress-bar {
  position: relative;
  width: 100%;
  height: 6px;
  background: var(--nyc-gray, #6c757d);
  border-radius: 3px;
  margin: 20px 0;
}

.progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--primary-color);
  border-radius: 3px;
  transition: width 0.3s ease;
  z-index: 1;
}

/* Subway stops/stations */
.progress-stops {
  position: absolute;
  top: -7px;
  left: 0;
  width: 100%;
  height: 20px;
  z-index: 2;
}

.progress-stop {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--nyc-white, white);
  border: 3px solid var(--nyc-gray, #6c757d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--nyc-gray, #6c757d);
  transition: all 0.3s ease;
}

.progress-stop.completed {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--nyc-white, white);
}

.progress-stop.current {
  background: var(--nyc-white, white);
  border-color: var(--primary-color);
  color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color);
}

.progress-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--nyc-black);
  margin: 0 0 6px 0;
}

.weekly-volume {
  text-align: center;
  font-size: 0.85rem;
  color: var(--nyc-black);
  font-weight: 600;
  margin: 0;
}

/* Main Workout Card */
.workout-card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--card-shadow);
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary-color);
}

.workout-card.rest {
  border-left-color: var(--workout-rest);
}

.workout-card.aerobic {
  border-left-color: var(--workout-aerobic);
}

.workout-card.recovery {
  border-left-color: var(--workout-recovery);
}

.workout-card.speed {
  border-left-color: var(--workout-speed);
}

.workout-card.tempo {
  border-left-color: var(--workout-tempo);
}

.workout-card.long_run {
  border-left-color: var(--workout-long-run);
}

.workout-card.race {
  border-left-color: var(--workout-race);
}

.workout-card.trail {
  border-left-color: var(--workout-trail);
}

.workout-header {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

.workout-type {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--dark-gray);
}

.workout-badge {
  background: var(--light-gray);
  color: var(--medium-gray);
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.workout-badge.aerobic {
  background: rgba(40, 167, 69, 0.1);
  background: color-mix(in srgb, var(--workout-aerobic) 10%, transparent);
  color: var(--workout-aerobic);
}

.workout-badge.recovery {
  background: rgba(23, 162, 184, 0.1);
  background: color-mix(in srgb, var(--workout-recovery) 10%, transparent);
  color: var(--workout-recovery);
}

.workout-badge.speed {
  background: rgba(220, 53, 69, 0.1);
  background: color-mix(in srgb, var(--workout-speed) 10%, transparent);
  color: var(--workout-speed);
}

.workout-badge.tempo {
  background: rgba(255, 193, 7, 0.1);
  background: color-mix(in srgb, var(--workout-tempo) 10%, transparent);
  color: var(--workout-tempo);
}

.workout-badge.long_run {
  background: rgba(0, 123, 255, 0.1);
  background: color-mix(in srgb, var(--workout-long-run) 10%, transparent);
  color: var(--workout-long-run);
}

.workout-badge.race {
  background: rgba(40, 167, 69, 0.1);
  background: color-mix(in srgb, var(--workout-race) 10%, transparent);
  color: var(--workout-race);
}

.workout-badge.trail {
  background: rgba(111, 66, 193, 0.1);
  background: color-mix(in srgb, var(--workout-trail) 10%, transparent);
  color: var(--workout-trail);
}

.workout-details {
  margin-bottom: 20px;
}

.workout-duration {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.duration-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--nyc-black);
  line-height: 1;
}

.duration-unit {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--nyc-black);
}

.workout-description {
  font-size: 1.1rem;
  color: var(--nyc-black);
  margin-bottom: 16px;
  line-height: 1.5;
}

.workout-intensity {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: var(--light-gray);
  border-radius: 8px;
}

.intensity-label {
  font-weight: 600;
  color: var(--nyc-black);
}

.intensity-value {
  font-weight: 700;
  color: var(--primary-color);
}

/* Cross-training note */
.cross-training-note {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: rgba(111, 66, 193, 0.1);
  background: color-mix(in srgb, var(--workout-trail) 10%, transparent);
  border-radius: 8px;
  margin-top: 12px;
}

.cross-training-label {
  font-weight: 600;
  color: var(--workout-trail);
}

.cross-training-value {
  font-weight: 600;
  color: var(--dark-gray);
}

/* ===== MAF TEST STYLING ===== */

/* Special styling for MAF test workouts */
.workout-card.maf-test {
  border-left-color: var(--nyc-red);
  background: linear-gradient(135deg, white 0%, rgba(238, 53, 46, 0.05) 100%);
  position: relative;
}

.workout-card.maf-test::before {
  content: "🏃‍♂️🏁 MAF TEST";
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--nyc-red);
  color: white;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.maf-test-badge {
  background: var(--nyc-red);
  color: white;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.track-recommendations {
  margin-top: 16px;
  padding: 16px;
  background: #F5F5F5;
  border-radius: 8px;
  border: 1px solid var(--nyc-gray);
}

.track-recommendations h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: var(--nyc-red);
  display: flex;
  align-items: center;
  gap: 8px;
}

.track-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.track-item {
  padding: 12px 0;
  border-bottom: 1px solid rgba(238, 53, 46, 0.1);
}

.track-item:last-child {
  border-bottom: none;
}

.track-name {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 4px;
}

.track-location {
  font-size: 0.85rem;
  margin-bottom: 4px;
}

.track-location a {
  color: var(--primary-color);
  text-decoration: none;
}

.track-location a:hover {
  text-decoration: underline;
}

.track-hours {
  font-size: 0.8rem;
  color: var(--nyc-red);
  font-weight: 500;
}

.track-reliability {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 8px;
}

.track-reliability.high {
  background: var(--nyc-green);
  color: var(--nyc-white);
}

.track-reliability.medium {
  background: var(--nyc-orange);
  color: var(--nyc-white);
}

.track-reliability.low {
  background: var(--nyc-red);
  color: var(--nyc-white);
}

.track-access-tips {
  margin-top: 12px;
  padding: 12px;
  background: rgba(238, 53, 46, 0.03);
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--medium-gray);
}

/* ===== SUBWAY-INSPIRED ELEMENTS ===== */

/* Workout Type Bullet (Train Line Style) */
.workout-type-bullet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.workout-bullet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: white;
  font-weight: 700;
  font-size: 0.75rem;
  text-align: center;
  background-color: var(--primary-color);
}

.workout-bullet.rest { background-color: var(--workout-rest); }
.workout-bullet.aerobic { background-color: var(--workout-aerobic); }
.workout-bullet.recovery { background-color: var(--workout-recovery); }
.workout-bullet.speed { background-color: var(--workout-speed); }
.workout-bullet.tempo { background-color: var(--workout-tempo); }
.workout-bullet.long_run { background-color: var(--workout-long-run); }
.workout-bullet.trail { background-color: var(--workout-trail); }
.workout-bullet.race { 
  background-color: var(--workout-race); 
  color: var(--nyc-black, black);
}

/* Workout Options */
.workout-options {
  margin-top: 20px;
  padding: 16px;
  background: rgba(0, 123, 255, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(0, 123, 255, 0.1);
}

.workout-options h4 {
  margin: 0 0 12px 0;
  font-size: 1rem;
  color: var(--primary-color);
}

.options-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.options-list li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(0, 123, 255, 0.1);
  font-size: 0.95rem;
}

.options-list li:last-child {
  border-bottom: none;
}

/* Workout Segments */
.workout-segments {
  margin-top: 20px;
  padding: 16px;
  background: rgba(40, 167, 69, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(40, 167, 69, 0.1);
}

.workout-segments h4 {
  margin: 0 0 16px 0;
  font-size: 1rem;
  color: var(--success-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.segments-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.workout-segment {
  background: white;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid var(--success-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.segment-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.segment-number {
  background: var(--success-color);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.segment-phase {
  font-weight: 600;
  color: var(--dark-gray);
  flex: 1;
}

.segment-duration {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
}

.segment-details {
  margin-left: 36px;
}

.segment-intensity {
  background: var(--light-gray);
  color: var(--medium-gray);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 4px;
}

.segment-description {
  margin: 4px 0 0 0;
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.4;
}


/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.action-btn {
  flex: 1;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  padding: 16px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--touch-target);
}

.action-btn.secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.action-btn:hover {
  background: var(--nyc-blue-bg);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
  opacity: 0.8;
}

.btn-icon {
  font-size: 1.2rem;
}

/* Footer */
.site-footer {
  background: white;
  border-top: 1px solid #e9ecef;
  padding: 20px 0;
  margin-top: 40px;
  text-align: center;
}

.attribution {
  font-size: 0.8rem;
  color: var(--medium-gray);
  margin: 0 0 8px 0;
}

.links a,
.links button {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  min-height: var(--touch-target-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.add-to-home-link {
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  font: inherit;
  min-height: var(--touch-target-sm);
  min-width: var(--touch-target-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.add-to-home-link:hover {
  text-decoration: underline;
}

.add-to-home-link.hidden {
  display: none;
}

/* About page content styling */
.about-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 20px 16px;
}

.about-content h1 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 2rem;
}

.about-content h2 {
  color: var(--dark-gray);
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.4rem;
}

.about-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.about-content ul {
  margin-bottom: 1.5rem;
}

.about-content li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.about-content strong {
  color: var(--primary-color);
}

/* Mobile Navigation Adjustments */
@media (max-width: 767px) {
  .date-navigation {
    margin-bottom: 20px;
    gap: 12px;
  }
  
  .nav-btn {
    padding: 14px 18px;
    font-size: 16px;
    min-width: 110px;
    gap: 10px;
  }
  
  .nav-icon {
    width: 30px;
    height: 30px;
  }
  
  /* Smaller SVG arrows on mobile */
  .prev-day .nav-icon {
    background-size: 26px 13px;
  }
  
  .next-day .nav-icon {
    background-size: 26px 13px;
  }
}

/* Responsive Design */
@media (min-width: 768px) {
  .day-view-container {
    max-width: 600px;
    padding: 32px 20px;
  }
  
  .workout-card {
    padding: 32px;
  }
  
  .duration-number {
    font-size: 4rem;
  }
  
  .workout-type {
    font-size: 1.6rem;
  }
}

/* Dark mode support for iPhone */
@media (prefers-color-scheme: dark) {
  body.day-view {
    background-color: #000;
    color: #fff;
  }
  
  /* Fix header text */
  .site-header h1 {
    color: #fff;
  }
  
  /* Fix all headings with proper specificity */
  body.day-view h1, 
  body.day-view h2, 
  body.day-view h3, 
  body.day-view h4, 
  body.day-view h5, 
  body.day-view h6 {
    color: #fff;
  }
  
  /* Specifically target dynamically generated headings */
  body.day-view .playlist-suggestion h2,
  body.day-view .route-suggestions h2,
  body.day-view #route-container h2,
  body.day-view #playlist-container h2 {
    color: #fff;
  }
  
  .site-header,
  .workout-card,
  .progress-container,
  .track-recommendations {
    background: #1c1c1e;
    border-color: #38383a;
  }
  
  /* Fix progress container text visibility */
  .progress-container {
    background: #2c2c2e;
  }
  
  .progress-text,
  .weekly-volume {
    color: #fff;
  }
  
  /* Fix workout card text visibility */
  .workout-card {
    color: #fff;
  }
  
  .workout-card h2,
  .workout-card h3,
  .workout-card h4,
  .workout-card p,
  .workout-card span,
  .workout-card div {
    color: #fff;
  }
  
  /* Ensure all content areas have proper text color */
  .playlist-suggestion,
  .route-suggestions,
  .quick-actions {
    color: #fff;
  }
  
  /* These selectors are now handled above with proper specificity */
  
  .site-footer {
    background: #1c1c1e;
    border-color: #38383a;
  }
  
  .nav-btn {
    background: transparent;
    border-color: var(--primary-color);
    color: var(--primary-color);
  }
  
  .nav-btn:hover {
    background: var(--primary-color);
    color: white;
  }
  
  /* Navigation buttons dark mode colors */
  .nav-btn,
  .nav-btn:visited {
    color: #64b5f6;
    border-color: #64b5f6;
    background: transparent;
  }
  
  /* Fix navigation arrow icons for dark mode */
  .nav-icon {
    filter: invert(1) brightness(0.8);
  }
  
  /* Track recommendations dark mode */
  .track-recommendations {
    background: #2c2c2e;
    border-color: #48484a;
  }
  
  .track-item {
    border-bottom-color: #48484a;
  }
  
  /* Workout segments dark mode */
  .workout-segments {
    background: rgba(40, 167, 69, 0.15);
    border-color: rgba(40, 167, 69, 0.3);
  }
  
  .workout-segment {
    background: #2c2c2e;
    border-color: var(--success-color);
  }
  
  /* MAF test styling dark mode */
  .workout-card.maf-test {
    background: linear-gradient(135deg, #1c1c1e 0%, rgba(238, 53, 46, 0.15) 100%);
  }
  
  /* Cross-training note dark mode */
  .cross-training-note {
    background: rgba(111, 66, 193, 0.35);
    border: 1px solid rgba(111, 66, 193, 0.5);
  }
  
  /* Route suggestion cards dark mode */
  .route-suggestion {
    background: #1c1c1e;
    border-color: #38383a;
  }
  
  body.day-view .route-match {
    background: #2c2c2e;
    border-color: #48484a;
  }
  
  /* Fix all route match content text colors */
  body.day-view .route-match-name {
    color: #fff;
  }
  
  body.day-view .route-match-details {
    color: #b0b0b0;
  }
  
  body.day-view .route-match-score {
    background: var(--workout-trail);
    color: white;
  }
  
  .route-requirements {
    background: rgba(111, 66, 193, 0.2);
    border-color: rgba(111, 66, 193, 0.3);
  }
  
  .route-match-distance,
  .route-match-duration,
  .route-match-elevation {
    background: #5a5a5a;
    color: #ffffff;
  }
  
  .playlist-match {
    background: #2c2c2e;
    border-color: #48484a;
  }
  
  .playlist-requirements {
    background: rgba(0, 123, 255, 0.25);
    border-color: rgba(0, 123, 255, 0.5);
  }
  
  .playlist-match-tracks,
  .playlist-match-duration {
    background: #48484a;
    color: #f2f2f7;
  }
  
  /* Footer links dark mode */
  body.day-view .links a {
    color: #64b5f6;
  }
  
  /* Fix visited link colors in dark mode for better contrast */
  body.day-view a:visited {
    color: #8ab4f6;
  }
  
  /* More specific selectors for route links */  
  body.day-view .route-link:visited,
  body.day-view .route-auth-btn:visited,
  body.day-view .route-match-actions a:visited {
    color: #8ab4f6;
  }
  
  /* Ensure footer links maintain proper visited state */
  body.day-view .links a:visited {
    color: #7bb3f7;
  }
  
  :root {
    --light-gray: #1c1c1e;
    --medium-gray: #b0b0b0;
    --dark-gray: #fff;
    --primary-color: #64b5f6;
  }
}

/* Playlist Suggestion Styles */
.playlist-suggestion {
  margin-top: 1.5rem;
}

.playlist-suggestion h2 {
  margin: 0 0 1rem 0;
  color: var(--nyc-black);
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-family-primary);
}

.playlist-details {
  margin-bottom: 1.5rem;
}

.playlist-name {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.playlist-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.playlist-specs span {
  background: var(--medium-gray);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.playlist-description {
  color: var(--medium-gray);
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 1rem;
}

.song-suggestion {
  background: rgba(0, 123, 255, 0.1);
  border-left: 3px solid var(--primary-color);
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.9rem;
}

.song-suggestion small {
  color: var(--medium-gray);
  font-size: 0.8rem;
}

.playlist-actions {
  display: flex;
  justify-content: center;
  margin-top: 1rem;
}

.playlist-btn {
  min-width: 200px;
}

.playlist-tip {
  text-align: center;
  color: var(--medium-gray);
  font-style: italic;
  padding: 0.5rem;
}

/* Playlist match styles */
.playlist-requirements {
  background: rgba(0, 123, 255, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(0, 123, 255, 0.1);
}

.requirement-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.requirement-specs span {
  background: var(--nyc-black);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.requirement-description {
  font-size: 0.9rem;
  color: var(--dark-gray);
  line-height: 1.4;
}

.playlist-matches {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.playlist-match {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.playlist-match-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.playlist-match-name {
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 1rem;
  flex: 1;
}

.playlist-match-score {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.playlist-match-details {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--medium-gray);
}

.playlist-match-tracks,
.playlist-match-duration {
  padding: 0.2rem 0.4rem;
  background: var(--light-gray);
  border-radius: 8px;
  font-weight: 500;
}

.playlist-match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.match-reason {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.playlist-match-actions {
  display: flex;
  justify-content: center;
}

.playlist-play-btn {
  min-width: 180px;
}

.playlist-fallback {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 193, 7, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.fallback-message {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.fallback-suggestion {
  color: var(--medium-gray);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.fallback-action {
  display: flex;
  justify-content: center;
}

.playlist-create-btn {
  min-width: 200px;
}

/* Loading spinner for playlist search */
.playlist-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--medium-gray);
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--light-gray);
  border-top: 2px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.playlist-error {
  text-align: center;
  padding: 1.5rem;
  color: var(--medium-gray);
  background: rgba(220, 53, 69, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.1);
}

/* Playlist search links */
.playlist-search-links {
  margin-top: 1rem;
}

.search-links-header {
  text-align: center;
  margin-bottom: 1rem;
  color: var(--medium-gray);
  font-size: 0.9rem;
}

.playlist-search-link {
  margin-bottom: 0.75rem;
}

.playlist-search-link.primary .search-link-btn {
  background: var(--primary-color);
  color: white;
  border: 2px solid var(--primary-color);
}

.playlist-search-link.secondary .search-link-btn {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.search-link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  min-height: var(--touch-target);
}

.search-link-btn:hover {
  background: var(--nyc-blue-bg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-link-btn:active {
  opacity: 0.8;
}

.search-link-btn .external-icon {
  font-size: 0.8rem;
  opacity: 0.8;
}


/* Responsive playlist layout */
@media (min-width: 768px) {
  .playlist-specs {
    justify-content: flex-start;
  }
  
  .song-suggestion {
    font-size: 1rem;
  }
  
  .playlist-match-header {
    align-items: center;
  }
  
  .playlist-match-details {
    font-size: 0.9rem;
  }
  
  .requirement-specs {
    justify-content: flex-start;
  }
  
  .search-link-btn {
    font-size: 1rem;
    padding: 1rem 1.5rem;
  }
}

/* Route Suggestion Styles */
.route-suggestion {
  margin-top: 1.5rem;
}

.route-suggestion h2 {
  margin: 0 0 1rem 0;
  color: var(--nyc-black);
  font-size: 1.3rem;
  font-weight: 700;
  font-family: var(--font-family-primary);
}

.strava-icon {
  color: #FC4C02;
  font-size: 1.2em;
  margin-right: 0.5rem;
}

/* Route requirements display */
.route-requirements {
  background: rgba(111, 66, 193, 0.05);
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(111, 66, 193, 0.1);
}

.route-requirements .requirement-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.route-requirements .requirement-specs span {
  background: var(--workout-trail);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.requirement-note {
  font-size: 0.85rem;
  color: var(--medium-gray);
  margin: 0;
}

/* Route matches */
.route-matches {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.route-match {
  background: white;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.route-match-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.route-map-preview {
  margin-bottom: 0.75rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.route-map-preview:hover {
  opacity: 0.9;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.route-map-placeholder {
  background: linear-gradient(135deg, #e8f4fd 0%, #cde7f8 100%);
  border: 2px dashed var(--primary-color);
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--primary-color);
  font-weight: 600;
}

.map-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.map-text {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.map-coordinates {
  font-size: 0.75rem;
  opacity: 0.8;
  font-family: monospace;
}

.route-map-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

.route-match-name {
  font-weight: 600;
  color: var(--dark-gray);
  font-size: 1rem;
  flex: 1;
  margin-right: 1rem;
}

.route-match-score {
  background: var(--workout-trail);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.route-match-details {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--medium-gray);
  flex-wrap: wrap;
}

.route-match-distance,
.route-match-duration,
.route-match-elevation {
  padding: 0.2rem 0.4rem;
  background: var(--light-gray);
  border-radius: 8px;
  font-weight: 500;
}

.route-match-attributes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.route-surface,
.route-type,
.transport-method {
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 500;
}

.route-surface.road {
  background: rgba(0, 123, 255, 0.1);
  color: var(--primary-color);
}

.route-surface.dirt {
  background: rgba(111, 66, 193, 0.1);
  color: var(--workout-trail);
}

.route-surface.mixed {
  background: rgba(255, 193, 7, 0.1);
  color: var(--workout-tempo);
}

.route-type.loop {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.route-type.out_and_back {
  background: rgba(220, 53, 69, 0.1);
  color: var(--workout-speed);
}

.transport-method {
  background: var(--light-gray);
  color: var(--medium-gray);
}

.transport-method.home {
  background: rgba(40, 167, 69, 0.1);
  color: var(--success-color);
}

.transport-method.work {
  background: rgba(0, 123, 255, 0.1);
  color: var(--primary-color);
}

.route-match-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-start;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.route-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 0.25rem 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.route-link:hover {
  color: var(--workout-trail);
  text-decoration: underline;
}

.route-link.strava-link {
  color: #B8390A;  /* Darker orange for WCAG 2.2 AA compliance (4.5:1 on white) */
  font-weight: 600;
}

.route-link.strava-link:hover {
  color: #e63946;
}

.route-link.maps-link {
  color: var(--medium-gray);
}

.route-link.maps-link:hover {
  color: var(--primary-color);
}

/* Route loading and error states */
.route-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  color: var(--medium-gray);
}

.route-auth-required {
  text-align: center;
  padding: 1.5rem;
  color: var(--medium-gray);
}

.route-auth-required p {
  margin-bottom: 1rem;
}

.route-auth-btn {
  min-width: 160px;
}

.route-fallback {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 193, 7, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(255, 193, 7, 0.2);
}

.route-fallback .fallback-message {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 0.5rem;
}

.route-fallback .fallback-suggestion {
  color: var(--medium-gray);
  font-size: 0.9rem;
  margin: 0;
}

.route-error {
  text-align: center;
  padding: 1.5rem;
  color: var(--medium-gray);
  background: rgba(220, 53, 69, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(220, 53, 69, 0.1);
}

/* Responsive route layout */
@media (min-width: 768px) {
  .route-match-header {
    align-items: center;
  }
  
  .route-match-details {
    font-size: 0.9rem;
  }
  
  .route-requirements .requirement-specs {
    justify-content: flex-start;
  }
  
  .route-link {
    font-size: 1rem;
  }
}