@import url('utilities/variables.css');
@import url('utilities/animations.css');
@import url('utilities/utilities.css');

@import url('components/dashboard.css');
@import url('components/control-panel.css');
@import url('components/map.css');
@import url('components/auth.css');
@import url('components/charts.css');
@import url('components/unified-dashboard.css');


/* GLOBAL STYLES BELOW */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    color: var(--text-dark);
}

.hidden { display: none !important; }

#main-container {
    width: 95%;
    max-width: 1200px;
    margin: 20px auto;
}

h2 { color: #333; margin-bottom: 20px; }

.float-panel {
    background-color: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Footer base styles */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    font-size: 0.9em;
    color: white;
    text-align: center;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.site-footer i {
    color: #ffd700;
}

.site-footer a {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.site-footer a:hover {
    background: rgba(255, 255, 255, 0.2);
    text-decoration: none;
}

/* Desktop: always visible */
@media (min-width: 481px) {
  .site-footer.visible {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Mobile responsiveness - keep global */
@media (max-width: 768px) {
    #dashboard-container {
        flex-direction: column;
        grid-template-columns: 1fr;
    }
    .dashboard-panel {
        min-width: 100%;
    }
    .leaflet-popup-content {
        font-size: 14px;
        margin: 8px;
    }    
    #leaflet-map {
        height: 400px; /* Slightly shorter on mobile */
    }
    .course-panel {
        max-width: 180px;
        font-size: 11px;
    }
    #course-control-panel {
        padding: 10px !important;
    }
    
    #course-location, #course-type {
        width: 90px !important;
        padding: 6px !important;
    }
    
    #toggle-course-btn, #clear-course-btn {
        padding: 6px 10px !important;
        font-size: 12px;
    }
    .map-controls-container {
        padding: 4px;
    }
    
    .map-control-btn {
        width: 28px;
        height: 28px;
        font-size: 13px;
        padding: 4px;
    }

    .race-info-item {
        font-size: 11px;
    }
    
    .race-info-card {
        padding: 10px;
        min-width: 200px;

        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    .race-timer {
        font-size: 14px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
  .site-footer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 20px;
    font-size: 0.9em;
    color: white;
    text-align: center;
    z-index: 1001;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 -2px 10px rgba(102, 126, 234, 0.3);
    transform: translateY(100%); /* Hidden state */
  }
  
  /* Visible state */
  .site-footer.visible {
    transform: translateY(0);
    opacity: 1;
    bottom: 0;
  }
  
  /* Pull-up indicator */
  .site-footer::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 25px;
    background: 
      radial-gradient(circle at 50% 0%, rgba(52, 152, 219, 0.3) 0%, transparent 70%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8c8d'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat center;
    background-size: 100% 100%, 24px 24px;
    cursor: pointer;
  }
  
  /* Footer content animation */
  .site-footer > * {
    transition: opacity 0.3s ease;
  }
  
  .site-footer:not(.visible) > * {
    opacity: 0;
  }
  
  .site-footer.visible > * {
    opacity: 1;
  }
}

/* Your existing global styles continue here... */