/* England Journey Map — shared styles.
   Accessibility: base font 19px, dark text on white, 48px+ tap targets,
   strong visible focus. Plain HTML/CSS/vanilla JS, no build step. */

* { box-sizing: border-box; }

html { font-size: 19px; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: #111111;
  background: #ffffff;
}

main, header, footer { max-width: 900px; margin: 0 auto; padding: 0 1rem; }

header { padding-top: 1rem; padding-bottom: 0.5rem; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 0.4rem 0 0.3rem; }
h2 { font-size: 1.4rem; line-height: 1.3; margin: 1.6rem 0 0.6rem; }
h3 { font-size: 1.15rem; margin: 0.8rem 0 0.4rem; }
p { margin: 0.5rem 0; }

a { color: #003d99; text-decoration: underline; }
a:visited { color: #4b0082; }

:focus-visible {
  outline: 3px solid #005fcc;
  outline-offset: 2px;
}

/* Buttons and inputs: at least 48px tall, large text. */
button, .button-link, input, textarea, select {
  font-size: 1.05rem;
  line-height: 1.4;
  color: #111111;
}

button, .button-link {
  display: inline-block;
  min-height: 52px;
  min-width: 48px;
  padding: 0.7rem 1.2rem;
  margin: 0.4rem 0.4rem 0.4rem 0;
  border: 2px solid #003d33;
  border-radius: 8px;
  background: #00695c;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
button:hover, .button-link:hover { background: #004d40; }
button:disabled { background: #595959; border-color: #595959; cursor: not-allowed; }

button.secondary {
  background: #ffffff;
  color: #003d33;
  border-color: #003d33;
}
button.secondary:hover { background: #e6f2f0; }

button.danger {
  background: #ffffff;
  color: #8f0000;
  border-color: #8f0000;
}
button.danger:hover { background: #fdecea; }

label { display: block; font-weight: 700; margin: 0.9rem 0 0.3rem; }

input[type="text"], input[type="password"], textarea {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0.6rem 0.7rem;
  border: 2px solid #333333;
  border-radius: 8px;
  background: #ffffff;
}
textarea { min-height: 88px; resize: vertical; }

input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* Map */
#map {
  width: 100%;
  height: 62vh;
  min-height: 420px;
  border: 2px solid #333333;
  border-radius: 8px;
  background: #e8e8e8;
  z-index: 0;
}
.leaflet-popup-content { font-size: 1.05rem; line-height: 1.5; }
.leaflet-popup-content img { max-width: 100%; height: auto; border-radius: 6px; }
.leaflet-popup-content p { margin: 0.4rem 0; }

/* Map marker pins (divIcon) */
.map-pin {
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.5);
  font-weight: 800; font-size: 1rem; color: #ffffff;
}
.map-pin span { transform: rotate(45deg); }
.map-pin-photo { background: #00695c; }
.map-pin-checkin { background: #003d99; }
.map-pin-now {
  width: 52px; height: 52px;
  background: #b00000;
  font-size: 1.1rem;
}
.map-pin-now span { font-size: 0.85rem; }

.legend { margin: 0.7rem 0; padding: 0.7rem 0.9rem; border: 2px solid #333333; border-radius: 8px; background: #f2f2f2; }
.legend ul { margin: 0.3rem 0 0; padding-left: 1.3rem; }
.legend li { margin: 0.35rem 0; }
.dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; margin-right: 0.4rem; vertical-align: middle; border: 2px solid #ffffff; box-shadow: 0 0 0 1px #333333; }
.dot-photo { background: #00695c; }
.dot-checkin { background: #003d99; }
.dot-now { background: #b00000; }

/* Sample badge — must be unmissable. */
.sample-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  margin: 0.2rem 0.2rem 0.2rem 0;
  border: 2px solid #8f0000;
  border-radius: 6px;
  background: #fdecea;
  color: #8f0000;
  font-weight: 800;
  font-size: 1rem;
}

.now-banner {
  padding: 0.9rem 1rem;
  margin: 0.8rem 0;
  border: 3px solid #b00000;
  border-radius: 8px;
  background: #fff3f3;
}
.now-banner p { margin: 0.2rem 0; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline > li {
  padding: 1rem 0.9rem;
  margin: 0 0 1rem;
  border: 2px solid #333333;
  border-radius: 8px;
  background: #ffffff;
}
.timeline time { font-weight: 700; }
.timeline img { max-width: 100%; height: auto; border-radius: 6px; margin-top: 0.5rem; }
.timeline .kind { font-weight: 800; }
.timeline .show-on-map { margin-top: 0.6rem; }

/* Status messages */
.status {
  padding: 0.8rem 1rem;
  margin: 0.8rem 0;
  border: 2px solid #333333;
  border-radius: 8px;
  background: #f2f2f2;
  font-weight: 600;
}
.status.error { border-color: #8f0000; background: #fdecea; color: #5c0000; }
.status.success { border-color: #00695c; background: #e6f2f0; color: #003d33; }

/* Upload page */
.key-box, .card {
  padding: 1rem;
  margin: 0 0 1.2rem;
  border: 2px solid #333333;
  border-radius: 8px;
  background: #ffffff;
}
.photo-preview { max-width: 100%; height: auto; border-radius: 6px; margin: 0.5rem 0; }
.gps-line { font-weight: 700; }
.hint { font-size: 1rem; }
.big-share {
  width: 100%;
  min-height: 72px;
  font-size: 1.3rem;
  padding: 1rem;
}
.edit-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.edit-row img { max-width: 140px; height: auto; border-radius: 6px; }
.muted-note { font-size: 1rem; }

footer { padding: 1.5rem 1rem 2rem; }
footer p { margin: 0.3rem 0; }
