/* Fix for making the page fit completely on screen without scrolling */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  padding-bottom: 0 !important;
  overflow: hidden;
}

.header {
  margin-bottom: 8px;
}

.track-selector {
  margin-bottom: 8px;
}

#map-container {
  flex: 1;
  min-height: 0; /* Critical for Firefox */
  overflow: hidden;
  max-height: calc(100vh - 250px); /* Dynamically adjust map height */
}

.button-container {
  margin: 8px 0;
}

.footer {
  position: relative !important; /* Override absolute/fixed positioning */
  bottom: auto !important;
  height: auto !important;
  max-height: 90px;
  padding: 5px 0;
}

/* Override the fixed positioning from main.css */
body:not(.android-device) .footer {
  position: relative !important;
  bottom: auto !important;
}

body:not(.android-device) .container {
  padding-bottom: 0 !important;
}

/* Adjust map height for mobile */
@media (max-width: 768px) {
  #map-container {
    min-height: 50vh;
  }
}

/* Adjust logo size in footer for better fit */
#logo-ffs-occitanie {
  max-width: 180px;
  position: relative;
  bottom: auto;
  left: auto;
  transform: none;
}
