/*
   Author: Your Name
   Date: Today's Date
   Filename: styles.css
   Description: Style sheet for Hands-on Project 10-3 (Boulder Bike Routes)
*/

/* Reset basic element paddings and margins */
* {
   box-sizing: border-box;
}

html, body {
   margin: 0;
   padding: 0;
   font-family: Arial, Helvetica, sans-serif;
   background-color: #f4f4f9;
   color: #333;
}

/* Header Styles */
header {
   background-color: #2c3e50;
   color: #ffffff;
   padding: 20px;
   text-align: center;
}

header h1 {
   margin: 0;
   font-size: 2rem;
}

/* Layout Containers */
article {
   max-width: 1200px;
   margin: 30px auto;
   padding: 20px;
   background-color: #ffffff;
   box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
   border-radius: 8px;
}

h2 {
   color: #2c3e50;
   border-bottom: 2px solid #ecf0f1;
   padding-bottom: 10px;
   margin-top: 0;
}

/* Control Selectors Bar */
#controls {
   display: flex;
   flex-wrap: wrap;
   gap: 15px;
   align-items: center;
   margin-bottom: 20px;
   padding: 15px;
   background-color: #f8f9fa;
   border: 1px solid #e9ecef;
   border-radius: 6px;
}

#controls label {
   font-weight: bold;
   color: #495057;
}

#controls select {
   padding: 8px 12px;
   font-size: 1rem;
   border: 1px solid #ced4da;
   border-radius: 4px;
   background-color: #ffffff;
   outline: none;
   cursor: pointer;
}

#controls select:focus {
   border-color: #2c3e50;
}

/* Map and Direction Panel Grid Layout */
#map-container {
   display: flex;
   flex-direction: row;
   gap: 20px;
   height: 500px; /* Base height for the application elements */
}

/* Google Map Container Element */
#map {
   flex: 2; /* Takes up 2/3 of the space */
   height: 100%;
   border: 1px solid #ced4da;
   border-radius: 6px;
   background-color: #e5e3df; /* Map loading background placeholder color */
}

/* Turn-by-Turn Panel Container Element */
#bikeDirections {
   flex: 1; /* Takes up 1/3 of the space */
   height: 100%;
   overflow-y: auto; /* Adds a scrollbar if the route instructions are long */
   border: 1px solid #ced4da;
   border-radius: 6px;
   padding: 15px;
   background-color: #ffffff;
   font-size: 0.95rem;
   line-height: 1.4;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 768px) {
   #map-container {
      flex-direction: column;
      height: auto;
   }
   
   #map {
      height: 350px;
      flex: none;
   }
   
   #bikeDirections {
      height: 300px;
      flex: none;
   }
}