.content-edit {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  max-width: 36rem;
  padding-bottom: 1rem;
}

/* hidden attribute controls visibility */
.content-edit[hidden] {
  display: none;
}

.content-edit label {
  font-size: 0.85rem;
  color: #555;
  display: inline;
}

.content-edit label:has(+ input:required):after,
.content-edit label:has(+ select:required):after,
.content-edit label:has(input:required)::after {
  content: ' *';
  color: red;
}

.content-edit input,
.content-edit select,
.content-edit textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
}

.content-edit textarea {
  resize: vertical;
}

.content-edit a {
  font-size: 0.85rem;
  color: #0066cc;
}

.content-edit .form-actions {
  display: flex;
  gap: 0.75rem;
}

.content-edit .edit-row {
  display: inline;
  gap: 0.75rem;
}

/* viwe mode layout*/
.content-view {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 40rem;
}

.view-group h3 {
  font-size: 1rem;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.25rem;
}

.view-row {
  display: flex;
  gap: 1rem;
  font-size: 1rem;
}

.view-row .label {
  min-width: 6rem;
  color: #555;
}

.view-row a {
  color: #0066cc;
  text-decoration: none;
}

.view-row a:hover {
  text-decoration: underline;
}

.view-notes {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* bigger space around rows on mobile for better touch targets */
@media (max-width: 39.99em) {
  #content-view .view-group .view-row {
    padding: 0.25rem 0;
  }

  #content-view .view-group .view-row+.view-row {
    margin-top: 0.25rem;
  }
}



.nav-actions {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  align-items: center;
}

.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  border-radius: 10px;
  background: #f5f5f5;
  text-decoration: none;
}

.content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}


#view-description {
  white-space: pre-wrap;
  /* preserve newlines in description */
  margin-top: 0;
}

/* Slightly larger touch targets on mobile */
.nav-icon img {
  width: 42px;
  height: 42px;
}

/* Desktop: just a bit tighter */
@media (min-width: 40em) {
  .nav-icon {
    padding: 0.5rem;
  }

  .nav-icon img {
    width: 32px;
    height: 32px;
  }
}

.nav-icon:active {
  transform: scale(0.96);
}

.nav-icon:hover {
  background: #eaeaea;
}



/* Group lat/long fields in edit view together */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.coord-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.osm-link {
  grid-column: 1 / -1;
  font-size: 0.85rem;
  color: #0066cc;
  text-decoration: none;
}

.osm-link:hover {
  text-decoration: underline;
}


@media (min-width: 40em) {
  .coord-controls {
    grid-template-columns: 1fr 1fr auto;
    align-items: center;
  }

  .osm-link {
    grid-column: auto;
    white-space: nowrap;
    margin-left: 0.5rem;
  }
}


/* RATING STARS */
.rating {
  display: flex;
  gap: 0.25rem;
  margin-top: 0rem;
}

.star {
  width: 1.1rem;
  height: 1.1rem;
}

/* outline: always full */
.star-outline {
  fill: none;
  stroke: #000;
  stroke-width: 1.25;
  /* ↓ from 1.6 */
}


/* fill layer: clipped */
.star-fill {
  fill: #f5b301;
  stroke: none;

  /* visually shrink fill so it sits inside stroke */
  transform: scale(0.92);
  transform-origin: center;

  clip-path: inset(0 100% 0 0);
  /* default: empty */
}


/* full star */
.star.filled .star-fill {
  clip-path: inset(0 0 0 0);
}

/* half star (left half filled, outline stays full) */
.star.half .star-fill {
  clip-path: inset(0 50% 0 0);
}



.campsite-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.15rem;

  font-size: 0.8rem;
  color: #666;
}

.campsite-author {
  white-space: nowrap;
}

.campsite-author-name {
  font-weight: 500;
}

.campsite-separator {
  opacity: 0.6;
}

.campsite-rating {
  color: #444;
  /* slightly stronger but still secondary */
}


/* Prefilled (OSM-detected) values */
.content-edit input.prefilled,
.content-edit select.prefilled {
  background-color: #fff8d6;
  transition: background-color 120ms ease-out;
}