/*
 * runpdx.net - Keep Portland Running Together
 * Mobile-first CSS for Hotwire Native iOS/Android app
 */

/* ============================================
   CSS CUSTOM PROPERTIES - PORTLAND PALETTE
   ============================================ */
:root {
  /* Portland-inspired colors */
  --rainy-gray: #6B7C7E;
  --bridge-orange: #FF6B35;
  --forest-green: #2D5F3F;
  --neon-pink: #FF10F0;
  --tracksuit-teal: #00CED1;
  --tracksuit-purple: #9B59B6;
  --misty-blue: #B8D4E3;
  --pavement-dark: #2C3E50;
  --sweat-drop: #4DD0E1;
  --finish-line: #FFD700;

  /* Functional colors */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --text-primary: #2C3E50;
  --text-secondary: #6B7C7E;
  --error-red: #E74C3C;
  --success-green: #2ECC71;

  /* Spacing (mobile-first) */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;

  /* Touch targets */
  --tap-target: 44px;

  /* Typography */
  --font-display: 'Courier New', 'Courier', monospace;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-handwritten: 'Comic Sans MS', 'Marker Felt', cursive;
}

/* ============================================
   BASE STYLES
   ============================================ */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--misty-blue) 0%, var(--bg-primary) 100%);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Animated rain drops background */
body::before {
  content: '';
  position: fixed;
  top: -100vh;
  left: 0;
  width: 100%;
  height: 200vh;
  background-image:
    radial-gradient(ellipse 1px 8px, #4DD0E1 50%, transparent 50%),
    radial-gradient(ellipse 1px 8px, #4DD0E1 50%, transparent 50%),
    radial-gradient(ellipse 1px 8px, #4DD0E1 50%, transparent 50%),
    radial-gradient(ellipse 1px 8px, #4DD0E1 50%, transparent 50%),
    radial-gradient(ellipse 1px 8px, #4DD0E1 50%, transparent 50%);
  background-size:
    150px 200px,
    200px 180px,
    180px 220px,
    220px 190px,
    190px 210px;
  background-position:
    0px 0px,
    50px 40px,
    100px 80px,
    150px 20px,
    200px 60px;
  animation: rainFall 3s linear infinite;
  opacity: 0.4;
  pointer-events: none;
  z-index: 1;
}

@keyframes rainFall {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(100vh);
  }
}

/* VHS glitch effect on page transitions (Turbo compatible) - DISABLED */
/* Uncomment to re-enable glitch effect:
body.turbo-loading {
  animation: vhsGlitch 0.3s ease-in-out;
}

@keyframes vhsGlitch {
  0%, 100% {
    filter: none;
    transform: translateX(0);
  }
  20% {
    filter: hue-rotate(90deg);
    transform: translateX(-5px);
  }
  40% {
    filter: hue-rotate(-90deg);
    transform: translateX(5px);
  }
  60% {
    filter: saturate(3);
    transform: translateX(-3px);
  }
  80% {
    filter: brightness(1.5);
    transform: translateX(3px);
  }
}
*/

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: bold;
  letter-spacing: 0.05em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1 {
  font-size: 2rem;
  text-shadow: 2px 2px 0px var(--bridge-orange),
               4px 4px 0px var(--tracksuit-teal);
}

@keyframes neonPulse {
  0%, 100% {
    text-shadow: 2px 2px 0px var(--bridge-orange),
                 4px 4px 0px var(--tracksuit-teal);
  }
  50% {
    text-shadow: 2px 2px 8px var(--bridge-orange),
                 4px 4px 12px var(--tracksuit-teal);
  }
}

h2 {
  font-size: 1.5rem;
  color: var(--forest-green);
}

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--bridge-orange);
  text-decoration: none;
  position: relative;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--neon-pink);
}

/* Sliding underlines removed */

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.app-container {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header with runpdx.net branding */
.app-header {
  background: linear-gradient(135deg, var(--pavement-dark) 0%, var(--forest-green) 100%);
  padding: var(--space-md);
  text-align: center;
  position: relative;
  border-bottom: 4px solid var(--bridge-orange);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

@media (min-width: 768px) {
  .app-header {
    flex-direction: row;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
  }
}

.app-logo {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: bold;
  color: var(--bg-primary);
  text-decoration: none;
  letter-spacing: 0.1em;
  display: inline-block;
  position: relative;
  text-shadow: 0 0 10px var(--neon-pink),
               0 0 20px var(--neon-pink),
               0 0 30px var(--bridge-orange);
  animation: neonFlicker 4s ease-in-out infinite;
}

@keyframes neonFlicker {
  0%, 100% { opacity: 1; }
  92%, 94%, 96% { opacity: 0.8; }
  93%, 95% { opacity: 1; }
}

.app-logo::before {
  content: '🏃';
  margin-right: var(--space-xs);
  animation: runnerBounce 1s ease-in-out infinite;
}

@keyframes runnerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Navigation */
.app-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
  justify-content: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid transparent;
  transition: all 0.3s ease;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  min-height: var(--tap-target);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link::after {
  display: none;
}

.nav-link:hover {
  background: rgba(255, 107, 53, 0.3);
  border-color: var(--bridge-orange);
  color: white;
  transform: translateY(-2px);
}

.nav-admin {
  background: var(--bridge-orange);
  border-color: var(--bridge-orange);
}

.nav-admin:hover {
  background: var(--neon-pink);
  border-color: var(--neon-pink);
}

.nav-signout {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  font-family: inherit;
}

.nav-signout:hover {
  background: rgba(231, 76, 60, 0.3);
  border-color: var(--error-red);
}

/* Profile menu */
.profile-menu {
  position: relative;
}

.profile-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bridge-orange), var(--neon-pink));
  color: white;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: bold;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.profile-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  min-width: 240px;
  padding: var(--space-sm);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
}

.profile-dropdown.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-dropdown-header {
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.profile-dropdown-header strong {
  color: var(--pavement-dark);
  font-size: 1rem;
}

.profile-email {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.profile-dropdown-divider {
  height: 1px;
  background: var(--rainy-gray);
  opacity: 0.3;
  margin: var(--space-xs) 0;
}

.profile-dropdown-link {
  display: block;
  width: 100%;
  padding: var(--space-sm);
  text-align: left;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--pavement-dark);
  font-weight: 500;
  text-decoration: none;
}

.profile-dropdown-link:hover {
  background: var(--bg-secondary);
}

.profile-dropdown-item {
  width: 100%;
  padding: var(--space-sm);
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--error-red);
  font-weight: 600;
}

.profile-dropdown-item:hover {
  background: rgba(231, 76, 60, 0.1);
}

/* Main content area */
.app-main {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  max-width: 600px;
  width: 100%;
  margin: 0 auto;
}

/* Footer with Mount Hood silhouette */
.app-footer {
  background: linear-gradient(to top, var(--pavement-dark) 0%, transparent 100%);
  padding: var(--space-xl) var(--space-md) var(--space-md);
  text-align: center;
  position: relative;
  margin-top: var(--space-xl);
}

.app-footer::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 80px solid transparent;
  border-right: 80px solid transparent;
  border-bottom: 40px solid var(--rainy-gray);
  opacity: 0.3;
}

.app-footer-text {
  font-size: 1.1rem;
  color: var(--pavement-dark);
  font-family: var(--font-handwritten);
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.footer-links {
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-top: var(--space-sm);
}

.footer-links a {
  color: var(--pavement-dark);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.footer-links a:hover {
  color: var(--bridge-orange);
}

/* Footer link underlines removed */

/* ============================================
   FORMS - Hand-drawn squiggly style
   ============================================ */
.form-container {
  background: var(--bg-primary);
  border: 3px solid var(--pavement-dark);
  border-radius: 20px;
  padding: var(--space-lg);
  position: relative;
  box-shadow: 8px 8px 0px var(--tracksuit-teal),
              16px 16px 0px var(--tracksuit-purple);
}

.form-group {
  margin-bottom: var(--space-md);
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  color: var(--forest-green);
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="time"],
textarea,
select {
  width: 100%;
  min-height: var(--tap-target);
  padding: var(--space-sm);
  font-size: 1rem;
  border: 2px solid var(--rainy-gray);
  border-radius: 8px;
  background: var(--bg-secondary);
  font-family: var(--font-body);
  transition: all 0.3s ease;
  position: relative;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--bridge-orange);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.2),
              inset 2px 2px 0px var(--tracksuit-teal);
  transform: translateY(-2px);
}

/* Special styling for magic link code input */
input.magic-code {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.5em;
  text-align: center;
  font-weight: bold;
  background: var(--pavement-dark);
  color: var(--finish-line);
  border: 3px solid var(--bridge-orange);
  text-shadow: 0 0 10px var(--finish-line);
}

/* ============================================
   BUTTONS - Neon glow with retro vibes
   ============================================ */
button,
.btn,
input[type="submit"] {
  min-height: var(--tap-target);
  padding: var(--space-sm) var(--space-lg);
  font-size: 1rem;
  font-weight: bold;
  font-family: var(--font-display);
  letter-spacing: 0.05em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  text-transform: uppercase;
  display: inline-block;
  width: 100%;
  text-align: center;
}

.btn-primary,
input[type="submit"] {
  background: linear-gradient(135deg, var(--bridge-orange), var(--neon-pink));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4),
              0 0 20px rgba(255, 16, 240, 0.3);
  border-radius: 25px;
  padding: var(--space-sm) var(--space-lg);
}

.btn-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 10px rgba(255, 107, 53, 0.4);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6),
              0 0 30px rgba(255, 16, 240, 0.5);
  animation: buttonPulse 0.5s ease-in-out;
}

@keyframes buttonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--rainy-gray);
}

.btn-secondary:hover {
  background: var(--rainy-gray);
  color: white;
  border-color: var(--pavement-dark);
}

/* ============================================
   FLASH MESSAGES - Toast style
   ============================================ */
.flash {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  padding: var(--space-md);
  border-radius: 12px;
  font-weight: 600;
  z-index: 1000;
  animation: slideDown 0.3s ease-out;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.flash-notice,
.flash-success {
  background: var(--success-green);
  color: white;
}

.flash-notice::before,
.flash-success::before {
  content: '🎉';
  margin-right: var(--space-xs);
}

.flash-alert,
.flash-error {
  background: var(--error-red);
  color: white;
}

.flash-alert::before,
.flash-error::before {
  content: '💦';
  margin-right: var(--space-xs);
}

/* ============================================
   ERROR MESSAGES - "DNF" (Did Not Finish)
   ============================================ */
.error-explanation,
.field_with_errors {
  display: block;
  width: 100%;
}

.error-explanation {
  background: linear-gradient(135deg, #FFE5E5, #FFF0F0);
  border: 3px dashed var(--error-red);
  border-radius: 12px;
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  position: relative;
}

.error-explanation h2 {
  color: var(--error-red);
  font-size: 1.25rem;
  margin-bottom: var(--space-sm);
}

.error-explanation h2::before {
  content: 'DNF ';
  font-family: var(--font-handwritten);
}

.error-explanation ul {
  list-style: none;
  padding: 0;
}

.error-explanation li::before {
  content: '💔 ';
  margin-right: var(--space-xs);
}

.field_with_errors input {
  border-color: var(--error-red);
  background: #FFF0F0;
}

/* ============================================
   LINKS & NAVIGATION
   ============================================ */
.text-link {
  display: inline-block;
  margin-top: var(--space-md);
  font-size: 0.95rem;
}

/* ============================================
   DIVIDERS - Finish line tape
   ============================================ */
hr,
.divider {
  border: none;
  height: 8px;
  background: repeating-linear-gradient(
    45deg,
    var(--finish-line),
    var(--finish-line) 10px,
    var(--pavement-dark) 10px,
    var(--pavement-dark) 20px
  );
  margin: var(--space-lg) 0;
  border-radius: 4px;
}

/* ============================================
   LOADING INDICATOR - Sweat drops
   ============================================ */
.loading {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
}

.loading::after {
  content: '💦';
  font-size: 2rem;
  animation: loadingSpin 1s linear infinite;
}

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

/* ============================================
   RESPONSIVE - Desktop adjustments
   ============================================ */
@media (min-width: 768px) {
  .app-main {
    max-width: 800px;
    padding: var(--space-xl) var(--space-lg);
  }

  h1 {
    font-size: 2.5rem;
  }

  .form-container {
    padding: var(--space-xl);
  }

  .app-logo {
    font-size: 2rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: var(--space-md);
}

.mb-4 {
  margin-bottom: var(--space-md);
}

.hidden {
  display: none;
}

/* Ensure touch-friendly spacing on mobile */
@media (max-width: 767px) {
  button, .btn, a, input {
    margin: var(--space-xs) 0;
  }
}

/* ============================================
   RUN SUBMISSION & DISPLAY - Portland Style
   ============================================ */

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-display);
}

.status-pending {
  background: var(--bridge-orange);
  color: white;
}

.status-approved {
  background: var(--success-green);
  color: white;
}

.status-declined {
  background: var(--error-red);
  color: white;
}

/* User runs list */
.runs-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.runs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.run-card {
  background: white;
  border: 3px solid var(--bridge-orange);
  border-radius: 12px;
  padding: var(--space-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.run-card::before {
  content: '🏃';
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  opacity: 0.1;
}

.run-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
  gap: var(--space-sm);
}

.run-header h3 {
  font-family: var(--font-display);
  color: var(--pavement-dark);
  margin: 0;
  flex: 1;
}

.run-details p {
  margin: var(--space-xs) 0;
  line-height: 1.6;
}

.run-description {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-left: 4px solid var(--tracksuit-teal);
  border-radius: 4px;
  font-style: italic;
}

.admin-notes {
  margin-top: var(--space-sm);
  padding: var(--space-sm);
  background: #FFF4E6;
  border-left: 4px solid var(--bridge-orange);
  border-radius: 4px;
}

.admin-notes strong {
  color: var(--bridge-orange);
  font-family: var(--font-display);
}

.run-actions {
  margin-top: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 2px dashed var(--rainy-gray);
}

.empty-state {
  text-align: center;
  padding: var(--space-xl);
  background: white;
  border: 3px dashed var(--rainy-gray);
  border-radius: 12px;
  margin-top: var(--space-lg);
}

.empty-state p {
  margin: var(--space-sm) 0;
  font-size: 1.1rem;
}

/* Form styling enhancements */
.form-intro {
  text-align: center;
  margin-bottom: var(--space-lg);
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Distance fields with dynamic add/remove */
.form-hint {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
  font-style: italic;
}

.distance-field-group {
  margin-bottom: var(--space-sm);
}

.distance-input-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.distance-input {
  flex: 1;
}

.btn-remove-distance {
  background: var(--error-red);
  color: white;
  min-height: var(--tap-target);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.875rem;
  font-weight: bold;
  font-family: var(--font-body);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  width: auto;
}

.btn-remove-distance:hover {
  background: #C0392B;
  box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.btn-add-distance {
  background: var(--forest-green);
  color: white;
  min-height: var(--tap-target);
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.95rem;
  font-weight: bold;
  font-family: var(--font-body);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: var(--space-sm);
  width: 100%;
  text-align: center;
}

.btn-add-distance:hover {
  background: #1E4D2F;
  box-shadow: 0 2px 8px rgba(45, 95, 63, 0.3);
}

/* Public runs page */
.public-runs-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.public-runs-container h1 {
  text-align: center;
  margin-bottom: var(--space-xs);
}

.tagline {
  text-align: center;
  font-family: var(--font-body);
  color: var(--bridge-orange);
  font-size: 1.2rem;
  margin-bottom: var(--space-xl);
}

.runs-by-day {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.day-section {
  background: white;
  border-radius: 16px;
  padding: var(--space-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border: 3px solid var(--forest-green);
}

.day-header {
  font-family: var(--font-display);
  color: var(--forest-green);
  font-size: 2rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--forest-green);
  text-transform: uppercase;
  letter-spacing: 2px;
  position: relative;
}

.day-header::before {
  content: '🗓️';
  margin-right: var(--space-sm);
}

.day-runs {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.public-run-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.public-run-card-link::after {
  display: none;
}

.public-run-card {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: var(--space-md);
  padding: var(--space-md);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, white 100%);
  border-left: 5px solid var(--tracksuit-teal);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.public-run-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 206, 209, 0.3);
  border-left-color: var(--neon-pink);
}

/* One-time run styling with prominent neon green glow */
.public-run-card.one-time-run {
  border-left-color: var(--success-green);
  border: 2px solid var(--success-green);
  box-shadow:
    0 0 10px rgba(46, 204, 113, 0.6),
    0 0 20px rgba(46, 204, 113, 0.4),
    0 0 30px rgba(46, 204, 113, 0.2),
    0 4px 15px rgba(0, 0, 0, 0.1);
  animation: oneTimeGlow 3s ease-in-out infinite;
}

.public-run-card.one-time-run:hover {
  box-shadow:
    0 0 15px rgba(46, 204, 113, 0.8),
    0 0 25px rgba(46, 204, 113, 0.6),
    0 0 35px rgba(46, 204, 113, 0.4),
    0 6px 20px rgba(0, 0, 0, 0.15);
  border-color: var(--success-green);
}

@keyframes oneTimeGlow {
  0%, 100% {
    box-shadow:
      0 0 10px rgba(46, 204, 113, 0.6),
      0 0 20px rgba(46, 204, 113, 0.4),
      0 0 30px rgba(46, 204, 113, 0.2),
      0 4px 15px rgba(0, 0, 0, 0.1);
  }
  50% {
    box-shadow:
      0 0 15px rgba(46, 204, 113, 0.8),
      0 0 25px rgba(46, 204, 113, 0.5),
      0 0 35px rgba(46, 204, 113, 0.3),
      0 4px 15px rgba(0, 0, 0, 0.1);
  }
}

.event-date {
  color: var(--forest-green);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-family: var(--font-display);
}

.run-time {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--pavement-dark);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--finish-line);
  border-radius: 8px;
  padding: var(--space-sm);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.run-info h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  margin-bottom: var(--space-xs);
  color: var(--pavement-dark);
}

.run-info .location {
  color: var(--forest-green);
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.run-info .description {
  color: var(--text-secondary);
  margin: var(--space-sm) 0;
  line-height: 1.6;
}

.run-info .address {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: var(--space-xs);
}

.run-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.meta-item {
  background: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  border: 2px solid var(--misty-blue);
  word-break: break-word;
  overflow-wrap: break-word;
  color: var(--text-primary);
}

@media (min-width: 769px) {
  .meta-item {
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .public-run-card {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .run-time {
    font-size: 1.2rem;
    padding: var(--space-xs);
  }

  .day-header {
    font-size: 1.5rem;
  }
}

/* Admin dashboard */
.admin-runs-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.admin-section {
  margin-bottom: var(--space-xl);
  background: white;
  border-radius: 16px;
  padding: var(--space-lg);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.admin-section h2 {
  font-family: var(--font-display);
  color: var(--pavement-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 3px solid var(--bridge-orange);
}

.admin-runs-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.admin-run-card {
  border: 2px solid var(--rainy-gray);
  border-radius: 12px;
  padding: var(--space-md);
  background: var(--bg-secondary);
  transition: all 0.3s ease;
}

.admin-run-card.approved {
  border-color: var(--success-green);
  background: linear-gradient(135deg, #E8F8F5, white);
}

.admin-run-card.declined {
  border-color: var(--error-red);
  background: linear-gradient(135deg, #FFF0F0, white);
}

.admin-run-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.submitted-by {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: var(--space-xs) 0;
}

.submitted-at {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-style: italic;
}

.admin-actions-form {
  margin-top: var(--space-md);
  padding-top: var(--space-md);
  border-top: 2px dashed var(--rainy-gray);
}

.admin-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.action-buttons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.action-buttons-small {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.btn-approve,
.btn-decline,
.btn-edit {
  flex: 1;
  min-width: 120px;
  padding: var(--space-sm) var(--space-lg);
  font-weight: 700;
  border-radius: 25px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.3s ease;
  min-height: var(--tap-target);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-approve::before {
  content: "Approve";
}

.btn-decline::before {
  content: "Decline";
}

.btn-edit::before {
  content: "";
}

@media (max-width: 600px) {
  .btn-approve::before {
    content: "👍";
  }

  .btn-decline::before {
    content: "👎";
  }
}

.btn-approve {
  background: var(--success-green);
  color: white;
}

.btn-approve:hover {
  background: #27AE60;
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.4);
}

.btn-decline {
  background: var(--error-red);
  color: white;
}

.btn-decline:hover {
  background: #C0392B;
  box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.btn-edit {
  background: linear-gradient(135deg, var(--bridge-orange), var(--neon-pink));
  color: white;
  box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4),
              0 0 20px rgba(255, 16, 240, 0.3);
  border-radius: 25px;
  padding: var(--space-sm) var(--space-lg);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.btn-edit:hover {
  box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6),
              0 0 30px rgba(255, 16, 240, 0.5);
  color: white;
}

.btn-edit::after {
  display: none;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  min-height: var(--tap-target);
}

.inline-form {
  display: inline-block;
  margin-top: var(--space-sm);
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 5px rgba(255, 107, 53, 0.5);
  }
  50% {
    box-shadow: 0 0 20px rgba(255, 107, 53, 1),
                0 0 30px rgba(255, 16, 240, 0.5);
  }
}

/* ============================================
   RUN SHOW PAGE
   ============================================ */
.run-show-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.run-show-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 3px solid var(--bridge-orange);
}

.run-show-header h1 {
  font-family: var(--font-display);
  color: var(--pavement-dark);
  margin: 0;
  flex: 1;
}

.run-show-details {
  background: white;
  border: 3px solid var(--forest-green);
  border-radius: 12px;
  padding: var(--space-lg);
  margin-bottom: var(--space-xl);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-section {
  padding: var(--space-md) 0;
  border-bottom: 2px dashed var(--rainy-gray);
}

.detail-section:last-child {
  border-bottom: none;
}

.detail-section h3 {
  font-family: var(--font-display);
  color: var(--forest-green);
  font-size: 1.2rem;
  margin-bottom: var(--space-sm);
}

.detail-content {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin: 0 0 var(--space-xs) 0;
  line-height: 1.6;
}

.detail-secondary {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: var(--space-xs) 0;
}

.map-link {
  color: var(--bridge-orange);
  font-weight: 600;
}

.run-show-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

@media (min-width: 768px) {
  .run-show-actions {
    flex-direction: row;
    justify-content: center;
  }
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-container {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-lg);
}

.about-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 3px solid var(--bridge-orange);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto var(--space-lg);
}

.about-section {
  margin-bottom: var(--space-xl);
}

.about-section h2 {
  font-family: var(--font-display);
  color: var(--forest-green);
  margin-bottom: var(--space-md);
}

.about-section p {
  line-height: 1.8;
  color: var(--text-primary);
}

@media (max-width: 600px) {
  .about-image {
    max-width: 250px;
  }
}
