:root {
  --color-bg: #f8f8f8;
  --color-border: #ccc;
  --color-highlight: #c8ffd0;
  --color-service-highlight-bg: #c8e2ff;
  --color-service-highlight-border: rgb(139, 191, 250);
  --color-service-highlight-shadow: #c8e2ff;
}

#hospiz-map-container {
  display: flex;
  flex-direction: row;
  gap: 2rem;
  margin: 2rem 0;
  scroll-behavior: smooth;
}
#hospiz-map-svg {
  width: 100%;
  max-width: 600px;
  height: auto;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}
#hospiz-map-sidebar {
  flex: 1;
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 1rem;
  min-width: 250px;
  scroll-margin-top: 100px; /* Increased from 20px to account for fixed header */
}
#hospiz-map-headline {
  margin-bottom: 1rem;
}
.hospiz-district {
  cursor: pointer;
  transition: fill 0.2s;
}
.hospiz-district:hover,
.hospiz-district.active {
  fill: var(--color-highlight) !important;
}
.hospiz-service-icon {
  pointer-events: none;
}

/* Make service labels clickable like regions */
.hospiz-service-label {
  cursor: pointer;
}

.service-detail.highlighted {
  background: var(--color-service-highlight-bg);
  border-left: 4px solid var(--color-service-highlight-border);
  box-shadow: 0 0 8px var(--color-service-highlight-shadow);
}
.hospiz-service-label.highlighted {
  filter: drop-shadow(0 0 6px var(--color-service-highlight-shadow));
  stroke: var(--color-service-highlight-border);
  stroke-width: 2;
}

.service-link-arrow {
  display: inline-block;
  font-size: 0.9em;
  background-color: #3a9d5d; /* Green background */
  color: white; /* White text */
  text-decoration: none !important; /* No underline */
  padding: 0.3em 0.7em;
  border-radius: 6px; /* Rounded corners */
  margin-top: 0.5em;
  transition: background-color 0.2s, transform 0.1s;
}

.service-link-arrow:hover {
  background-color: #2e8a4e; /* Slightly darker green on hover */
  color: white;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.service-link-arrow:active {
  transform: translateY(1px);
}

/* Service name link styling */
.service-name-link {
  color: inherit; /* Keeps the black color from the <strong> tag */
  text-decoration: none !important;
}

.service-name-link:hover {
  text-decoration: none !important;
  color: inherit;
}

/* Responsive layout for mobile devices */
@media (max-width: 768px) {
  #hospiz-map-container {
    flex-direction: column;
    gap: 1rem;
  }

  #hospiz-map-svg {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 300px;
  }

  #hospiz-map-sidebar {
    min-width: 100%;
    box-sizing: border-box;
    padding-top: 20px; /* Add some top padding for better spacing */
  }

  /* Make touch targets larger on mobile */
  .hospiz-service-label,
  .hospiz-district {
    stroke-width: 1.5;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  #hospiz-map-svg {
    min-height: 250px;
  }
}
