@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --background-color: #f8f9fa;
  --text-color: #333;
  --card-bg-color: #fff;
  --card-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

body {
  font-family: 'Roboto', sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--background-color);
  color: var(--text-color);
  margin: 0;
}

h1 {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-weight: 300;
  font-size: 1.2rem;
  color: var(--secondary-color);
  margin-top: 0;
  margin-bottom: 2rem;
}

.subtitle-small {
  font-size: 0.8rem;
}

.container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
  width: 90%;
  max-width: 1200px;
}

#map {
  flex: 4 1 600px;
  min-width: 0;
  height: 500px;
}

.jsvectormap-container {
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  background-color: var(--card-bg-color);
}

#info {
  flex: 1 1 320px;
  min-width: 280px;
  padding: 1.5rem;
  box-sizing: border-box;
  background-color: var(--card-bg-color);
  border-radius: 8px;
  box-shadow: var(--card-shadow);
  position: relative;
}

#info .autocomplete {
  position: relative;
  width: 100%;
}

#country-input {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 0.02rem;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

#country-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

#zone-info h2 {
  font-weight: 500;
  color: var(--primary-color);
  margin-top: 0;
  margin-bottom: 0.1rem;
}

#zone-info p {
  margin: 0.5rem 0;
  line-height: 1.4;
}

#zone-info strong {
  font-weight: 500;
}

#clear-selection {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 1rem;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#clear-selection:hover {
  background-color: #5a6268;
}

#zone-list {
  margin-top: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.zone-item {
  display: block;
  padding: 0.1rem 1rem;
  border-radius: 12px;
  margin: 0;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  background-color: var(--zone-color, var(--primary-color));
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.zone-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.18);
}

.zone-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.zone-details h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 500;
}

.zone-details p {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

.zone-item--matched {
  filter: brightness(1.15);
}

.zone-item--active {
  outline: 3px solid rgba(255,255,255,0.85);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.5);
}



.autocomplete-items {
  position: absolute;
  border: 1px solid #d4d4d4;
  border-bottom: none;
  border-top: none;
  z-index: 99;
  /*position the autocomplete items to be the same width as the container:*/
  top: 100%;
  left: 0;
  right: 0;
  max-height: 250px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 0 0 5px 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.autocomplete-items div {
  padding: 10px;
  cursor: pointer;
  background-color: #fff;
  border-bottom: 1px solid #d4d4d4;
}

.autocomplete-items div:hover {
  /*when hovering an item:*/
  background-color: #e9e9e9;
}

.autocomplete-active {
  /*when navigating through the items using the arrow keys:*/
  background-color: DodgerBlue !important;
  color: #ffffff;
}

.autocomplete-empty {
  padding: 10px;
  color: #666;
  font-style: italic;
}

@media (max-width: 1100px) {
  body {
    padding: 1.5rem 0;
  }

  .container {
    flex-direction: column;
    align-items: stretch;
    width: 95%;
  }

  #map,
  #info {
    flex: 1 1 auto;
    width: 100%;
  }

  #info {
    margin-top: 1.5rem;
  }
}
