body {
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

header {
  position: relative;
}

.header-progress-bar-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: rgb(1 31 91 / 10%);
  overflow: hidden;
}

.header-progress-bar {
  height: 100%;
  width: 0%;
  background-color: var(--color-secondary);
  transition: width 0.2s ease;
}

main {
  flex-grow: 1;
  padding: 0;
  overflow: hidden;
}

.sidebar-layout {
  display: flex;
  height: 100%;
  width: 100%;
}

.sidebar {
  width: 24rem;
  max-width: 40%;
  background-color: var(--color-background);
  border-right: 2px solid var(--color-primary);
  padding: 1.25rem;
  box-sizing: border-box;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.controls {
  background-color: var(--color-background-header);
  border: 1px solid #ddd;
  border-top: 4px solid var(--color-primary);
  border-radius: 0.25rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgb(0 0 0 / 5%);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.controls h2 {
  margin-top: 0;
  margin-bottom: 0.25rem;
  font-size: 1.2rem;
  color: var(--color-primary);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: bold;
}

.form-group select {
  width: 100%;
  box-sizing: border-box;
}

.country-loading {
  background-color: var(--color-background);
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  padding: 0.75rem;
}

.country-loading .loading-message {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  font-family: var(--font-mono);
  color: var(--color-primary);
}

.card {
  background-color: var(--color-background);
  border: 1px solid var(--color-primary);
  border-radius: 0.25rem;
  padding: 1rem;
}

.pollution-summary {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.pollution-summary p {
  margin: 0;
  line-height: 1.5;
}

.pollution-summary .station-highlight {
  font-weight: bold;
  color: var(--color-secondary);
}

.pollution-summary .value-highlight {
  font-family: var(--font-mono);
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--color-secondary);
}

.map-section {
  flex-grow: 1;
  height: 100%;
  position: relative;
}

.visualization-container {
  height: 100%;
  width: 100%;
}

@media (width <= 768px) {
  .sidebar-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 2px solid var(--color-primary);
  }

  .map-section {
    height: 100%;
  }
}
