:root {
  --border: #ddd;
  --bg: #fafafa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.4;
}

.site-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: white;
}

.site-header h1 {
  margin: 0 0 4px;
  font-size: 20px;
}

.site-header h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.tagline {
  margin: 0;
  color: #444;
  font-size: 15px;
}

.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 12px;
  padding: 12px;
}

.panel {
  min-height: 70vh;
}

.map {
  width: 100%;
  height: 70vh;
  border: 1px solid var(--border);
  border-radius: 10px;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar h2 {
  margin: 0;
  font-size: 16px;
}

.card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  padding: 10px;
  display: grid;
  align-items: center;
}

.footer {
  padding: 12px;
  border-top: 1px solid var(--border);
  color: #555;
  font-size: 12px;
}

button:focus-visible, a:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.tab {
  border: 1px solid var(--border);
  background: white;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
}

.tab.is-active {
  background: var(--bg);
  font-weight: 600;
}

/* helps on keyboard focus */
.tab:focus-visible {
  outline: 3px solid #000;
  outline-offset: 2px;
}

.stars {
  display: inline-flex;
  flex-direction: row-reverse; 
  gap: 4px;
}

.stars input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.stars label {
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  opacity: 0.35;
}

/* Focus ring for keyboard users */
.stars input:focus-visible + label {
  outline: 3px solid #000;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Fill stars on hover */
/* stylelint-disable-next-line no-descending-specificity */
.stars label:hover,
.stars label:hover ~ label {
  opacity: 1;
}

/* Fill stars when selected */
.stars input:checked + label,
.stars input:checked + label ~ label {
  opacity: 1;
}

.overlay[hidden] {
  display: none;
}

.overlay {
  position: absolute;
  inset: 0;               /* top/right/bottom/left:0 */
  display: grid;
  place-items: center;
  background: rgba(0 0 0 / 35%);
  padding: 12px;
  z-index: 10;
}

/* Make sure panel-review can contain the absolutely positioned overlay */
#panel-review {
  position: relative;
}

.overlay-card {
  width: min(420px, 100%);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}

.overlay-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

#clear-filters {
  margin-top: 8px;
  width: 100%;
}

@media (width <= 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .map {
    height: 60vh;
  }
}