/* ============================================================
   PLATESHAME.COM.AU — EARLY 2000s AESTHETIC
   ============================================================ */

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 8px;
  background-color: #808080;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent,
      transparent 2px,
      rgba(0,0,0,0.08) 2px,
      rgba(0,0,0,0.08) 4px
    );
  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: #111;
}

a { color: #0033cc; }
a:visited { color: #800080; }
a:hover { color: #cc0000; text-decoration: underline; }

/* ── WRAPPER ──────────────────────────────────────────── */
#wrapper {
  max-width: 860px;
  margin: 0 auto;
  background: #d4d0c8;
  border: 3px outset #fff;
}

/* ── HEADER ───────────────────────────────────────────── */
#header {
  background: linear-gradient(180deg, #000080 0%, #0000cc 50%, #000080 100%);
  padding: 12px 14px 8px;
  border-bottom: 3px solid #000;
}

#logo {
  font-family: 'Arial Black', Impact, sans-serif;
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #ffffff;
  text-shadow: 3px 3px 0 #cc0000, 4px 4px 0 #880000;
  line-height: 1;
}

#logo a {
  color: #fff;
  text-decoration: none;
}

#logo a:hover { color: #ffff00; }

.shame {
  color: #ff3300;
  text-shadow: 3px 3px 0 #000;
}

#tagline {
  color: #aaccff;
  font-size: 12px;
  margin-top: 3px;
  font-style: italic;
}

#visitorcounter {
  color: #aaccff;
  font-size: 11px;
  text-align: right;
  margin-top: 4px;
}

/* ── NAV ──────────────────────────────────────────────── */
#nav {
  background: #c0c0c0;
  border-bottom: 2px solid #808080;
  border-top: 2px solid #ffffff;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: bold;
}

#nav a {
  color: #000080;
  text-decoration: none;
  padding: 2px 4px;
}

#nav a:hover {
  background: #000080;
  color: #fff;
  text-decoration: none;
}

/* ── CONTENT ──────────────────────────────────────────── */
#content {
  padding: 10px 12px;
  background: #d4d0c8;
  min-height: 400px;
}

#content h2 {
  font-size: 18px;
  color: #000080;
  border-bottom: 2px solid #808080;
  padding-bottom: 4px;
}

#content h3 {
  font-size: 15px;
  color: #000080;
}

/* ── FOOTER ───────────────────────────────────────────── */
#footer {
  background: #c0c0c0;
  border-top: 2px solid #808080;
  padding: 6px;
  font-size: 11px;
  color: #444;
  text-align: center;
}

#footer a { color: #0033cc; }

/* ── WINDOWS-STYLE BOXES ──────────────────────────────── */
.win-box {
  background: #d4d0c8;
  border: 2px outset #fff;
  padding: 0;
  margin: 8px 0;
}

.win-box-title {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  font-weight: bold;
  font-size: 12px;
  padding: 3px 8px;
}

.win-box-body {
  padding: 8px;
}

/* ── BUTTONS (generic) ────────────────────────────────── */
button, .btn {
  font-family: Arial, sans-serif;
  cursor: pointer;
}

/* ── HORIZONTAL RULE ──────────────────────────────────── */
hr {
  border: none;
  border-top: 2px inset #808080;
  border-bottom: 1px solid #fff;
  margin: 12px 0;
}

/* ── RETRO BUTTON ─────────────────────────────────────── */
.retro-btn {
  display: inline-block;
  background: #d4d0c8;
  color: #000;
  border: 2px outset #fff;
  padding: 5px 12px;
  font: bold 13px Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}
.retro-btn:hover, .retro-btn:active { border-style: inset; background: #c4c0b8; }
.retro-btn:focus-visible, #share-sheet a:focus-visible, #share-sheet button:focus-visible { outline: 2px dotted #000; outline-offset: -4px; }

/* ── THE WALL ─────────────────────────────────────────── */
.lead { margin: 0 0 8px; font-size: 13px; color: #555; }
#stats-bar {
  background: #f0f0f0;
  border: 2px solid #ccc;
  padding: 8px;
  margin: 8px 0;
  font-size: 12px;
  text-align: center;
}
.sort-tabs { font-size: 13px; margin: 10px 0; }
.sort-tabs a { display: inline-block; padding: 3px 10px; margin: 2px; border: 2px outset #fff; background: #d4d0c8; color: #000; text-decoration: none; font-weight: bold; }
.sort-tabs a.on { border-style: inset; background: #fff; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.wall-card { margin: 0; display: flex; flex-direction: column; }
.wall-card .win-box-title, #share-sheet .win-box-title { display: flex; justify-content: space-between; align-items: center; }
.wall-card .win-box-body { display: flex; flex-direction: column; flex: 1; }
.wall-photo { display: block; border: 2px inset #fff; background: #808080; }
.wall-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.no-photo { display: block; padding: 40px 0; text-align: center; color: #fff; }
.plate-tag {
  align-self: center;
  margin: 8px 0 4px;
  font: bold 22px 'Courier New', monospace;
  letter-spacing: 3px;
  background: #fff;
  color: #000;
  border: 3px solid #222;
  border-radius: 5px;
  padding: 2px 12px;
  text-decoration: none;
}
.wall-caption { font-size: 13px; font-style: italic; margin: 4px 0; }
.wall-roast { background: #ffffcc; border: 1px solid #cccc66; padding: 6px 8px; font-size: 13px; margin: 6px 0; flex: 1; }
.wall-roast.none { background: none; border: 1px dashed #999; color: #666; }
.wall-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.wall-actions .retro-btn { flex: 1; text-align: center; white-space: nowrap; }
.pager { text-align: center; margin: 16px 0 4px; font-size: 13px; }
.pager span { margin: 0 10px; }
.empty-wall { color: #666; text-align: center; padding: 30px; }

/* ── SHARE SHEET ──────────────────────────────────────── */
#share-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 10px;
}
#share-overlay[hidden] { display: none; }
#share-sheet { width: 100%; max-width: 460px; max-height: 100%; overflow-y: auto; margin: 0; box-shadow: 4px 4px 0 #000; }
#share-close { background: #d4d0c8; border: 2px outset #fff; width: 24px; height: 22px; line-height: 1; font-weight: bold; padding: 0; }
#share-tabs { display: flex; gap: 2px; }
#share-tabs button { flex: 1; background: #d4d0c8; border: 2px outset #fff; border-bottom: none; padding: 5px 4px; font: bold 12px Arial, sans-serif; }
#share-tabs button.on { background: #fff; border-style: inset; border-bottom: none; }
#share-preview { background: #fff; border: 2px inset #fff; height: 230px; display: flex; align-items: center; justify-content: center; padding: 6px; }
#share-preview img { max-width: 100%; max-height: 100%; box-shadow: 2px 2px 0 #808080; }
.share-label { display: block; font-size: 12px; font-weight: bold; margin: 8px 0 2px; }
#share-msg { width: 100%; box-sizing: border-box; border: 2px inset #fff; padding: 4px; font-size: 13px; }
#share-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
#share-actions a, #share-actions button {
  background: #d4d0c8; color: #000; border: 2px outset #fff;
  padding: 8px 4px; font: bold 12px Arial, sans-serif;
  text-align: center; text-decoration: none; cursor: pointer;
}
#share-actions a:hover, #share-actions button:hover { border-style: inset; }
#share-native { grid-column: 1 / -1; background: #cc0000 !important; color: #fff !important; font-size: 14px !important; }
#share-native[hidden] { display: none; }
#share-status { min-height: 16px; margin: 8px 0 0; font-size: 12px; font-weight: bold; color: #006600; text-align: center; }

/* ── MOBILE ───────────────────────────────────────────── */
@media (max-width: 600px) {
  body { padding: 4px; }
  #logo { font-size: 26px; }
  #matchup { flex-direction: column; align-items: center; }
  #vs-label { transform: rotate(90deg); margin: 4px 0; font-size: 24px; }
  .plate-card { width: 100%; max-width: 340px; }
  #wrapper { border-width: 1px; }
  #nav { font-size: 12px; }
  #nav a { display: inline-block; margin: 2px 0; }
}

/* ── REMOVAL FORM ─────────────────────────────────────── */
.removal-form { max-width: 500px; background: #fff; border: 2px outset #ccc; padding: 14px; }
.removal-form label { display: block; font-weight: bold; font-size: 13px; margin: 10px 0 2px; }
.removal-form input[type=text], .removal-form input[type=email], .removal-form select, .removal-form textarea {
  width: 100%; box-sizing: border-box; border: 2px inset #aaa; padding: 5px; font: 14px Arial, sans-serif;
}

/* ── TOP ROASTERS ─────────────────────────────────────── */
.roasters .win-box-body { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; }

/* ── SEARCH ───────────────────────────────────────────── */
#plate-search { display: inline-flex; gap: 2px; margin-left: 10px; vertical-align: middle; }
#plate-search input { width: 120px; border: 2px inset #fff; padding: 2px 4px; font: 12px Arial, sans-serif; text-transform: uppercase; }
#plate-search button { border: 2px outset #fff; background: #d4d0c8; font: bold 12px Arial, sans-serif; padding: 2px 8px; cursor: pointer; }
.big-search { display: flex; gap: 6px; max-width: 420px; margin: 10px 0 16px; }
.big-search input { flex: 1; border: 2px inset #aaa; padding: 8px; font: bold 20px 'Courier New', monospace; letter-spacing: 2px; text-transform: uppercase; min-width: 0; }

/* ── PLATE OF THE WEEK ────────────────────────────────── */
.potw { border-color: #ffcc00; }
.potw .win-box-title { background: #ffcc00; color: #000; text-align: center; font-size: 14px; letter-spacing: 1px; }
.potw .win-box-body { display: flex; gap: 12px; flex-wrap: wrap; }
.potw .wall-photo { flex: 1 1 240px; max-width: 360px; }
.potw-text { flex: 1 1 240px; display: flex; flex-direction: column; align-items: flex-start; }
.potw-text p { margin: 4px 0; font-size: 13px; }
.potw-text .plate-tag { align-self: flex-start; font-size: 28px; }
.potw-text .wall-roast { flex: 0; }

/* ── SIGHTINGS ────────────────────────────────────────── */
.sightings { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.sighting { background: #fff; border: 2px outset #ccc; padding: 6px; font-size: 12px; }
.sighting img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: 4px; }
.sighting-note { font-style: italic; margin: 2px 0; }

/* ── POST BUTTON THAT FOLLOWS YOU (phones) ────────────── */
#snap-fab { display: none; }
@media (max-width: 600px) {
  #snap-fab {
    display: block; position: fixed; right: 12px; bottom: 12px; z-index: 50;
    background: #cc0000; color: #fff; border: 3px outset #ff6666;
    padding: 12px 16px; font: bold 16px Arial, sans-serif; text-decoration: none;
    box-shadow: 3px 3px 0 #000;
  }
  #plate-search { display: flex; margin: 6px 0 0; }
  #plate-search input { flex: 1; font-size: 16px; }
}

/* ── HIT COUNTER ──────────────────────────────────────── */
.counter-label { display: block; margin-bottom: 2px; }
.odometer { display: inline-flex; gap: 1px; background: #333; padding: 2px; border: 1px solid #888; }
.odometer span {
  background: linear-gradient(#000, #2a2a2a 50%, #000);
  color: #fff; font: bold 14px 'Courier New', monospace;
  padding: 1px 3px; min-width: 9px; text-align: center;
}
#read-status { font-size: 13px; margin: 0 0 8px; padding: 6px 8px; border: 1px solid #9999cc; background: #e8e8ff; }
#read-status[hidden] { display: none; }
#read-status.warn { background: #ffffcc; border-color: #cccc66; }
