:root {
  --primary-orange: #ff6600;
  --primary-blue: #0044aa;  
  --secondary-gray: #b7c4c8;
  --secondary-brown: #9B7653
}

body {
  font-family: 'Source Sans Pro', sans-serif;
  margin: 0;
  padding: 0;
}

a {
  transition: color 0.3s;
  color: var(--primary-blue);
  font-size: 0.8rem;
  text-decoration: none;
}
a:hover {
  color: var(--secondary-gray);
}

#map {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 100%;
}

.geocoder {
  top: 0.5rem;
  position: absolute;
  z-index: 2;
}

#theA {
  font-weight: bold;
  font-size: 0.8em;
}

/* Overall styling for the info box */
#info-box {
  position: absolute;
  left: 10px;
  top: 10px;
  width: 35vw;
  min-height: 250px;
  z-index: 2;
  padding: 8px;
  background-color: white;
  font-size: 1em;
  border-radius: 4px;
  display: flex;
  flex-direction: column; /* Stack children vertically */
}

/* Header styles */
#header {
  display: flex;
  justify-content: space-between; /* Space out brat and sothere */
  align-items: center; /* Vertically align content */
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

#brat {
  display: flex;
  align-items: center;
}

#brat img {
  height: 24px;
  margin-right: 8px;
}

#sothere {
  display: flex; /* Use flexbox for text and wrapper alignment */
  align-items: center; /* Vertically align text and emoji wrapper */
  gap: 0.2em; /* Control space between text and emoji */
  cursor: pointer; /* Pointer for interactivity */
  position: relative; /* Establish positioning context */
}

#sothere .text {
  font-size: 1em; /* Normal text size */
  line-height: 1; /* Eliminate extra vertical space */
}

#sothere .emoji-wrapper {
  position: relative; /* Position the emoji inside the wrapper */
  display: flex; /* Needed for wrapper alignment */
  align-items: center; /* Vertically align the emoji */
}

#sothere .emoji {
  font-size: 5em; /* Large font size for crisp rendering */
  line-height: 1; /* Prevent extra vertical space */
  transform: scale(0.2); /* Visually shrink the emoji initially */
  transition: transform 0.3s ease, rotate 0.3s ease; /* Smooth hover animation */
  position: absolute; /* Ignore the emoji's box size in the layout */
  left: 0; /* Align it to the wrapper's left */
  transform-origin: center left; /* Animate from the center-left point */
}

#sothere:hover .emoji {
  transform: scale(1) rotate(15deg); /* Scale up and tilt the emoji */
}

/* Controls below the header */
#controls {
  display: flex;
  justify-content: space-between; /* Space out share button and coords */
  align-items: center;
  padding: 8px 0;
}

#share-location-btn {
  border-radius: 5px;
  padding: 6px;
  border: none;
  background-color: var(--primary-orange);
  color: white;
  font-size: 1em;
  cursor: pointer;
}

#coords {
  background: #b7c4c8;
  font-size: 11px;
  border-radius: 8px;
  padding: 4px 8px;
  color: white;
}

/* Info content styling */
#info-content {
  margin-top: 16px;
  padding: 8px;
  background-color: #f9f9f9;
  border-radius: 4px;
  font-size: 0.9em;
  flex-grow: 1; /* Allow dynamic content to fill available space */
  overflow-y: auto; /* Add scrolling if the content overflows */
}

#pin {
  width: 40px;
}

#message {
  position: absolute;
  top: 280px;
  left: 10px;
  z-index: 999;
  padding: 8px;
  background-color: white;
  visibility: hidden;
  font-size: 1em;
}

.marker {
  width: 72px;
  height: 72px;
  background-image: url("bratlas-pin.svg");
  background-size: 100%;
  z-index: 1
}

 @media only screen and (max-width: 600px) {
  .mapboxgl-ctrl-top-right {
    right: none;
    width: 95%;
    height: 35px
  }

  #info-box {
    top: 60px;
    left: 5px;
    margin-top: 4px;
    width: 50%; /* Use a wider width for smaller screens */
    min-height: auto; /* Allow height to adjust dynamically */
    padding: 12px;
    font-size: 0.9em; /* Slightly smaller font size */
  }

  /* Header adjustments */
  #header {
    flex-wrap: wrap; /* Stack elements vertically if needed */
    justify-content: space-between;
    margin-bottom: 12px;
  }

  #brat {
    display: flex;
    flex-direction: row; /* Ensure the icon and text stay inline */
    align-items: center;
  }

  #pin {
    width: 24px; /* Smaller icon size */
    margin-right: 8px;
  }

  #bratlas {
    font-size: 1em; /* Adjust font size for readability */
  }

  #sothere {
    margin-top: 8px; /* Add space if it wraps below the title */
    font-size: 0.9em;
  }

  /* Button and coords alignment */
  #controls {
    flex-direction: column; /* Stack the button and coords */
    gap: 8px; /* Add spacing between elements */
  }

  #share-location-btn {
    width: 100%; /* Full width for the button */
    padding: 8px;
    font-size: 0.9em;
  }

  #coords {
    font-size: 0.85em; /* Smaller font size for coordinates */
    padding: 4px 6px;
    text-align: center;
    width: 100%; /* Full width for alignment */
  }

  /* Info content spacing */
  #info-content {
    margin-top: 12px;
    font-size: 0.85em;
  }
 }

 @media only screen and (min-width: 601px) and (max-width: 1024px) {
  #info-box {
    top: 20px;
    left: 20px;
    width: 45%; /* Slightly wider for better content space */
    padding: 16px;
    font-size: 1em;
    border-radius: 6px; /* Subtle rounding for a cleaner look */
  }

  /* Header adjustments */
  #header {
    display: flex;
    justify-content: space-between; /* Properly align title and sothere */
    align-items: center;
    flex-wrap: wrap; /* Ensure wrapping if content overflows */
    margin-bottom: 12px;
  }

  #brat {
    display: flex;
    align-items: center;
  }

  #pin {
    width: 28px; /* Balanced icon size for tablets */
    margin-right: 8px;
  }

  #sothere {
    font-size: 1em;
    text-align: right;
    flex: 1; /* Allow it to adjust and align better in the space */
    margin-top: 0;
  }

  /* Controls */
  #controls {
    display: flex;
    flex-direction: row; /* Align controls in a single row */
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
  }

  #share-location-btn {
    flex: 1; /* Allow button to stretch proportionally */
    max-width: 60%; /* Limit button width to avoid oversizing */
    padding: 10px;
    font-size: 1em;
    text-align: center;
  }

  #coords {
    font-size: 0.9em;
    padding: 6px 10px;
    border-radius: 4px;
    text-align: center;
    flex: 1; /* Stretch to align with the button */
    max-width: 35%; /* Keep it proportionate */
  }

  /* Info content */
  #info-content {
    margin-top: 12px;
    font-size: 0.95em; /* Slightly smaller for balanced proportions */
    line-height: 1.4; /* Improve readability */
  }
}
 
 @media only screen and (min-width: 601px) {
  #brat {
    top: 0.5rem;
    left: 0.5rem;
    font-size: 2.2em;
  }
 }

.primary-orange {
  color: var(--primary-orange)
}

.primary-blue {
  color: var(--primary-blue)
}

.secondary-gray {
  color: var(--secondary-gray)
}

.secondary-brown {
  color: var(--primary-brown)
}