/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #202e48;
    --primaryLight: #326287;
    --secondary: #ffba43;
    --secondaryLight: #ffba43;
    --headerColor: #1a1a1a;
    --bodyTextColor: #4e4b66;
    --bodyTextColorWhite: #fafbfc;
    
    /* Add admin-specific variables */
    --admin-primary: var(--primary);
    --admin-text: #1a1a1a;
    --admin-border: #e2e8f0;
    --admin-hover: #326287;
    --primary-color: var(--primary); /* Add this line to fix the reference */
}

html, body {
    height: 100%;
    width: 100%;
    font-size: var(--bodyFontSize);
    color: var(--bodyTextColor);
    background-color: #fff;
}

body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    padding-top: 0; /* Remove any top padding by default */
    margin-top: 0; /* Remove any top margin by default */
}

/* Add padding to the body to account for fixed header */
@media only screen and (max-width: 1299.5px) {
    body {
        padding-top: 5rem; /* Consistent padding for mobile */
    }
}

@media only screen and (min-width: 1300px) {
    body {
        padding-top: 8.5rem; /* Match the --headerHeight value */
    }
}

h1, h2, h3, h4, h5, h6 {
    color: var(--headerColor);
    font-weight: 700;
    line-height: 1.2;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
}

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

a:hover {
    text-decoration: underline;
}

main {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--sectionPadding);
}

/* Page-specific main content spacing */
.race-results-page main,
.race-results-detail-page main {
    padding-top: 1rem; /* Consistent padding for all race results pages */
}

/* Form Elements */
.admin-form {
  /* Admin Layout Styles */
  .admin-content {
      max-width: 800px;
      margin: 2rem auto;
      padding: 0 1rem;
  }
  
  .admin-header {
      background: var(--primary);
      color: var(--bodyTextColorWhite);
      padding: 1rem 0;
  }
  
  .admin-nav {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 1rem;
  }
  
  /* Admin Components */
  .admin-card {
      background: white;  /* Changed from #202e48 to white */
      border-radius: 8px;
      box-shadow: 0 2px 4px rgba(0,0,0,0.1);
      padding: 2rem;
      margin-bottom: 2rem;
  }
  
  /* Update existing admin button styles */
  .btn-primary,
  .cs-button-primary {
      background: var(--primary);
      color: white;
      transition: background-color 0.2s;
  }
  
  .btn-primary:hover,
  .cs-button-primary:hover {
      background: var(--primaryLight);
  }
  
  /* Quick Actions buttons in admin */
  .quick-action {
      background: var(--primary);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 1rem;
      width: 100%;
      text-align: center;
      margin-bottom: 1rem;
      cursor: pointer;
      transition: background-color 0.2s;
      text-decoration: none;
      display: block;
  }
  
  .quick-action:hover {
      background: var(--primaryLight);
      text-decoration: none;
      color: white;
  }
  
  /* Admin text colors */
  .admin-body h1, 
  .admin-body h2, 
  .admin-body h3,
  .admin-body .cs-title,
  .admin-body .cs-card-title {
      color: var(--headerColor);
  }
  
  .admin-body p,
  .admin-body .cs-subtitle {
      color: var(--bodyTextColor);
  }
  
  .admin-body .cs-stats-card {
      color: white;
  }
  .form-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
  }
  
  .form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .form-group {
    flex: 1;
    margin-bottom: 1rem;
  }

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #2d3748;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  background: #f7fafc;
  transition: border-color 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin: 1rem 0;
}

.radio-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
}

.btn-primary {
  background: #2b6cb0;
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #2c5282;
}

.signature-field {
  background: white;
  border: 2px dashed #cbd5e0;
  height: 100px;
  padding: 1rem;
  border-radius: 4px;
}

/* Add Admin-specific styles */
.cs-button-primary {
    background: var(--admin-primary);
    color: white;
}

.cs-button-primary:hover {
    background: var(--admin-hover);
}

.cs-file-upload {
    border: 2px dashed var(--admin-border);
}

.cs-file-upload:hover {
    border-color: var(--admin-primary);
}

.cs-upload-icon {
    color: var(--admin-primary);
}

.cs-form-group label {
    color: var(--admin-text);
}

.cs-card-title {
    color: var(--admin-text);
}

.cs-title {
    color: var(--admin-text);
}
/* Admin Components */
.admin-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Add specific styling for stats cards in admin */
.cs-stats-card {
    background: linear-gradient(135deg, var(--primary-color), #004999);
    color: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
}

.cs-stats-card h3,
.cs-stats-card[data-astro-cid-a6awtiot] h3[data-astro-cid-a6awtiot] {
    color: white !important; /* Override the default heading color */
    font-size: 1rem;
    margin: 0;
    opacity: 0.9;
}

.cs-stats-number,
.cs-stats-number[data-astro-cid-a6awtiot] {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 0.5rem 0 0;
    color: white;
}

/* Rest of admin styles... */
/* Add this to your global.css file */
.dropdown-menu {
  background-color: white;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: 100%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.dropdown-menu > div {
  background-color: white;
  padding: 1.5rem;
}

.dropdown-menu h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  border-bottom: 2px solid var(--secondary);
  padding-bottom: 0.5rem;
}

.dropdown-menu ul {
  list-style: none;
  padding: 0;
}

.dropdown-menu li {
  margin-bottom: 0.75rem;
}

.dropdown-menu a {
  color: var(--bodyTextColor);
  text-decoration: none;
  transition: color 0.2s;
}

.dropdown-menu a:hover {
  color: var(--primary);
  text-decoration: underline;
}