/* ===== Ballarat Garage Sales - shared styles ===== */
:root {
  --paper: #fbf6ec;
  --paper-2: #f4ecdc;
  --card: #ffffff;
  --ink: #1d2327;
  --ink-2: #4a4f52;
  --muted: #7a7266;
  --line: #e8dcc6;
  --red: #e2412d;
  --red-d: #b82e1d;
  --yellow: #ffcf3d;
  --yellow-l: #fff4cc;
  --teal: #12715f;
  --teal-l: #dff2ec;
  --kraft: #d9b98a;
  --shadow: 0 1px 2px rgba(60, 40, 10, .06), 0 6px 20px rgba(60, 40, 10, .08);
  --r: 14px;
  --head: 'Bricolage Grotesque', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --hand: 'Caveat', 'Comic Sans MS', cursive;
  --page: #fffdf7;          /* book page paper */
  --stage: #2a2320;         /* book background */
  --stage-2: #4a3c33;
  --map-bg: #f3ecdd;        /* drawn map page */
  --head-weight: 800;
  --head-case: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--red-d); }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.1; margin: 0 0 .4em; letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* ---- header ---- */
.site-head { position: sticky; top: 0; z-index: 1000; background: rgba(251, 246, 236, .96); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.brand img { width: 38px; height: 38px; flex: none; }
.brand b { font: 800 19px/1 var(--head); letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--paper-2); }
.nav .btn { margin-left: 6px; }
@media (max-width: 720px) {
  .site-head .wrap { height: 58px; gap: 8px; }
  .brand b { font-size: 16px; }
  .brand img { width: 32px; height: 32px; }
  .nav a.hide-sm { display: none; }
  .nav a { padding: 7px 9px; font-size: 14px; }
  .nav .btn { padding: 8px 12px; margin-left: 2px; }
}
@media (max-width: 400px) { .brand b { display: none; } }

/* ---- buttons ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  background: var(--red); color: #fff !important; font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 2px 0 var(--red-d); transition: transform .08s, background .15s; white-space: nowrap; }
.btn:hover { background: #d23a26; }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--red-d); }
.btn.ghost { background: transparent; color: var(--ink) !important; box-shadow: inset 0 0 0 1.5px var(--line); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.yellow { background: var(--yellow); color: var(--ink) !important; box-shadow: 0 2px 0 #d9a91c; }
.btn.yellow:hover { background: #ffc61a; }
.btn.dark { background: var(--ink); box-shadow: 0 2px 0 #000; }
.btn.teal { background: var(--teal); box-shadow: 0 2px 0 #0b5446; }
.btn.small { font-size: 13px; padding: 7px 12px; }
.btn.big { font-size: 17px; padding: 14px 26px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---- pills & chips ---- */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill.now { background: var(--teal); color: #fff; }
.pill.now::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #7dffd9; animation: pulse 1.4s infinite; }
.pill.today { background: var(--yellow); color: var(--ink); }
.pill.cancel { background: #3a3a3a; color: #fff; }
.pill.demo { background: #ece4f7; color: #5b3d8a; }
@keyframes pulse { 50% { opacity: .3; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink-2); user-select: none; }
.chip:hover { border-color: var(--kraft); }
.chip.on, .chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---- forms ---- */
label.f { display: block; font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }
.in, select.in, textarea.in { width: 100%; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 11px 13px; font-size: 16px; outline: none; transition: border-color .15s, box-shadow .15s; }
.in:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29, 35, 39, .08); }
textarea.in { resize: vertical; min-height: 110px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check input { width: 20px; height: 20px; accent-color: var(--red); margin: 2px 0 0; flex: none; }

/* ---- cards ---- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; opacity: 0; transition: .25s; z-index: 5000; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---- footer ---- */
.site-foot { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: 14px; margin-top: 40px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.site-foot a { color: var(--ink-2); }

/* ---- leaflet tweaks ---- */
.leaflet-container { font: inherit; background: #e9e4d8; }
.leaflet-popup-content-wrapper { border-radius: 14px; padding: 0; overflow: hidden; }
.leaflet-popup-content { margin: 0; width: 240px !important; }
.pop img { width: 100%; height: 130px; object-fit: cover; }
.pop .pb { padding: 10px 12px 12px; }
.pop h4 { font-size: 16px; margin: 0 0 4px; }
.pop .w { font-size: 13px; color: var(--ink-2); margin-bottom: 8px; }
.pop .btns { display: flex; gap: 6px; }
.pop .btn { font-size: 13px; padding: 7px 12px; }

.pin { width: 30px; height: 40px; position: relative; }
.pin svg { width: 30px; height: 40px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .3)); }
.pin svg path { fill: var(--red); }
.pin span { position: absolute; top: 5px; left: 0; width: 30px; text-align: center; font: 800 12px/20px var(--body); color: #fff; }
.pin.sel svg path { fill: var(--ink); }
.pin.route svg path { fill: #e8a800; }
.pin.route span { color: var(--ink); }
.pin.live svg path { fill: var(--teal); }
.pin.hl { z-index: 9999 !important; }
.pin.hl svg { transform: scale(1.18); transform-origin: 50% 100%; }
.ico { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
