/* Ailsa's Dog Walking — friendly, bright, and easy for kids and grown-ups. */
:root {
  --sky: #7cc6fe;
  --sky-deep: #3b9be8;
  --grass: #7bd389;
  --sun: #ffd23f;
  --coral: #ff7a59;
  --coral-deep: #ef5f3c;
  --ink: #2b2d42;
  --cloud: #ffffff;
  --paper: #fff9f0;
  --muted: #6b7280;
  --ring: rgba(59, 155, 232, 0.35);
  --shadow: 0 10px 30px rgba(43, 45, 66, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Baloo 2", "Comic Sans MS", "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 20% -10%, #fff 0, transparent 40%),
    linear-gradient(180deg, var(--sky) 0%, #d9f0ff 45%, var(--paper) 100%);
  min-height: 100vh;
  line-height: 1.5;
}

.wrap { max-width: 900px; margin: 0 auto; padding: 20px 18px 60px; }

/* ---- Header ---- */
header.hero {
  text-align: center;
  padding: 28px 16px 10px;
}
header.hero .pups { font-size: 46px; letter-spacing: 4px; }
header.hero h1 {
  margin: 6px 0 2px;
  font-size: clamp(30px, 6vw, 48px);
  color: var(--ink);
  text-shadow: 2px 3px 0 #fff;
}
header.hero p.tag {
  margin: 0;
  font-size: clamp(15px, 3vw, 20px);
  color: var(--sky-deep);
  font-weight: 700;
}
.topnav { text-align: center; margin-top: 10px; }
.topnav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px dotted var(--muted);
}

/* ---- Cards ---- */
.card {
  background: var(--cloud);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin: 18px 0;
}
.card h2 { margin: 0 0 12px; font-size: 24px; }
.card h2 .emoji { margin-right: 6px; }

/* ---- Buttons ---- */
button, .btn {
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  border: none;
  border-radius: 16px;
  padding: 12px 20px;
  cursor: pointer;
  color: #fff;
  background: var(--coral);
  box-shadow: 0 4px 0 var(--coral-deep);
  transition: transform .05s ease, box-shadow .05s ease, background .15s ease;
}
button:hover, .btn:hover { background: var(--coral-deep); }
button:active, .btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--coral-deep); }
button.secondary {
  background: var(--sky-deep);
  box-shadow: 0 4px 0 #2b7fc4;
}
button.secondary:active { box-shadow: 0 1px 0 #2b7fc4; }
button.ghost {
  background: #fff;
  color: var(--sky-deep);
  box-shadow: 0 0 0 2px var(--sky-deep) inset;
}
button.tiny { font-size: 13px; padding: 7px 12px; border-radius: 12px; }
button:disabled { opacity: .5; cursor: not-allowed; }

/* ---- Slots grid (public) ---- */
.day-group { margin-bottom: 18px; }
.day-group h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--sky-deep);
}
.slots { display: flex; flex-wrap: wrap; gap: 10px; }
.slot-pill {
  background: var(--grass);
  color: #14532d;
  border: none;
  box-shadow: 0 4px 0 #57b268;
  min-width: 92px;
}
.slot-pill:hover { background: #6bc47b; }
.slot-pill:active { box-shadow: 0 1px 0 #57b268; }
.slot-taken {
  background: #e5e7eb;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  min-width: 92px;
  text-decoration: line-through;
}

/* ---- Forms ---- */
label { display: block; font-weight: 700; margin: 12px 0 4px; font-size: 15px; }
input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
input:focus, textarea:focus { outline: none; border-color: var(--sky-deep); box-shadow: 0 0 0 4px var(--ring); }
textarea { min-height: 70px; resize: vertical; }

/* ---- Modal ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(43,45,66,.55);
  display: none; align-items: center; justify-content: center; padding: 16px; z-index: 50;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff; border-radius: 22px; box-shadow: var(--shadow);
  padding: 22px; width: 100%; max-width: 440px;
}
.modal h3 { margin: 0 0 4px; font-size: 22px; }
.modal .when { color: var(--sky-deep); font-weight: 800; margin: 0 0 12px; }
.modal .row { display: flex; gap: 10px; margin-top: 16px; }
.modal .row button { flex: 1; }

/* ---- Location check & maps ---- */
#map {
  height: 220px;
  border-radius: 14px;
  margin-top: 10px;
  border: 2px solid #e5e7eb;
  z-index: 0; /* keep Leaflet under the modal buttons */
}
#areaMap, #adminMap {
  height: 320px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  z-index: 0;
}
#adminMap { cursor: crosshair; }
.loc-hint { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
#streetList { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.street-chip {
  background: #dcfce7; color: #166534;
  box-shadow: 0 0 0 2px #86efac inset;
  font-size: 14px; padding: 7px 12px; border-radius: 999px;
}
.street-chip:hover { background: #fee2e2; color: #991b1b; box-shadow: 0 0 0 2px #fca5a5 inset; }
.street-chip .x { font-weight: 900; margin-left: 4px; }

/* ---- Messages ---- */
.msg { padding: 12px 16px; border-radius: 14px; font-weight: 700; margin: 12px 0; }
.msg.ok { background: #dcfce7; color: #166534; }
.msg.err { background: #fee2e2; color: #991b1b; }
.empty { color: var(--muted); font-weight: 700; text-align: center; padding: 18px; }

/* ---- Admin ---- */
.time-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.time-toggle {
  background: #fff; color: var(--ink);
  box-shadow: 0 0 0 2px #e5e7eb inset;
  min-width: 84px;
}
.time-toggle.on {
  background: var(--grass); color: #14532d;
  box-shadow: 0 0 0 2px #57b268 inset;
}
.booking-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px; border-radius: 14px; background: var(--paper); margin-bottom: 8px;
}
.booking-row .who { font-weight: 800; }
.booking-row .meta { color: var(--muted); font-size: 14px; }
.booking-row .spacer { flex: 1; }
.pill-tag {
  font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
  background: #dbeafe; color: #1e40af;
}
.pill-tag.booked { background: #fee2e2; color: #991b1b; }

footer.foot { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }
.hidden { display: none !important; }
