/* Mama C's Boba Tea & More: shared styles (colors, type, buttons, cards, forms).
   Colors come from the logo and the butterfly decal: mint sky, sunny yellow, bubblegum pink,
   violet butterfly, orange flowers, and the logo's dark outline. */

:root {
  --ink: #0b2528;
  --ink-soft: #35555a;
  --paper: #fffaf0;
  --white: #ffffff;
  --mint: #6fe3c4;
  --mint-soft: #d5f7ec;
  --mint-deep: #0a7d6b;
  --teal: #0b5a4e;
  --pink: #ff82a3;
  --pink-soft: #ffdbe5;
  --berry: #d6336c;
  --violet: #a45bd8;
  --violet-mid: #c99cf0;
  --violet-soft: #ecdcfb;
  --sun: #fbcb68;
  --sun-soft: #fff0bf;
  --orange: #f2882b;

  --line: 3px;
  --radius: 22px;
  --radius-sm: 14px;
  --wrap: 1120px;

  --font-display: "Fredoka", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-script: "Pacifico", "Brush Script MT", cursive;
}

*, *::before, *::after { box-sizing: border-box; }

/* Author styles like "display: grid" would otherwise beat the browser's rule for the hidden attribute. */
[hidden] { display: none !important; }

/* Keep the map's own layers (they use z-index up to 1000) from painting over the sticky headers. */
.leaflet-container { isolation: isolate; }
/* Calm the map colors a little so they sit well with the pastel palette. */
.leaflet-tile-pane { filter: saturate(0.8) brightness(1.03); }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font: 400 1.0625rem/1.65 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; }

a { color: var(--mint-deep); text-underline-offset: 3px; }
a:hover { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--teal);
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.35rem, 5.4vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }

.script {
  font-family: var(--font-script);
  font-weight: 400;
  color: var(--berry);
  display: inline-block;
  line-height: 1.3;
}

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.muted { color: var(--ink-soft); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--sun);
  color: var(--ink);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  font: 600 1rem var(--font-display);
}
.skip-link:focus { top: 0.75rem; }

:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; }

.ico { width: 1.2em; height: 1.2em; fill: currentColor; flex: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  font: 600 1.05rem/1.1 var(--font-display);
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
}
.btn:hover { color: var(--ink); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; box-shadow: 0 4px 0 var(--ink); }
.btn-pink { background: var(--pink); }
.btn-mint { background: var(--mint); }
.btn-sun { background: var(--sun); }
.btn-violet { background: var(--violet-mid); }
.btn-lg { min-height: 56px; padding: 0.85rem 1.8rem; font-size: 1.2rem; }
.btn-sm { min-height: 40px; padding: 0.45rem 0.95rem; font-size: 0.95rem; box-shadow: 0 3px 0 var(--ink); }
.btn-danger { background: #ffe1e1; }

/* ---------- pills and cards ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  font: 600 0.9rem/1 var(--font-display);
  color: var(--ink);
  background: var(--sun-soft);
  border: 2px solid var(--ink);
  border-radius: 999px;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 0.6em;
  height: 0.6em;
  border-radius: 50%;
  background: currentColor;
}
.pill-open { background: var(--mint); }
.pill-open::before { background: var(--mint-deep); animation: blink 1.6s ease-in-out infinite; }
.pill-soon { background: var(--sun); }
.pill-closed { background: #e7e7e2; }
.pill-off { background: var(--pink-soft); }
.pill-new { background: var(--pink); }

@keyframes blink { 50% { opacity: 0.25; } }

.card {
  background: var(--white);
  border: var(--line) solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 0 6px 0 var(--ink);
  padding: 1.4rem;
}

/* ---------- forms ---------- */
.field { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.35rem; margin-bottom: 1rem; }
.field label { font: 600 1rem var(--font-display); }
.field .opt { font: 400 0.9rem var(--font-body); color: var(--ink-soft); }
.field-narrow { max-width: 16rem; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  background: var(--white);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 110px; }
input::placeholder, textarea::placeholder { color: #7a8f92; }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--violet);
  outline-offset: 2px;
  border-color: var(--berry);
}
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--berry);
  background: #fff5f8;
}

.form-hint { font-size: 0.95rem; color: var(--ink-soft); }
.form-status { min-height: 1.6em; margin: 0 0 0.75rem; font-weight: 700; }
.form-status.is-error { color: #b0163f; }
.form-status.is-ok { color: var(--mint-deep); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
