/* /styles.css */

/* ============================
   Brand Theme (Thrifters Guide)
   ============================ */
:root{
  --brand-pink: #ee5aa6;
  --brand-pink-ink: #cc3e88;
  --brand-teal: #1fb8b6;
  --brand-sand: #fff7ef;
  --brand-ink: #1b1e26;
  --brand-muted: #6b7280;

  --bg: var(--brand-sand);
  --border: #000000;
  --muted: var(--brand-muted);
  --text: var(--brand-ink);
  --accent: var(--brand-pink);
}

/* Global base */
* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: "Quicksand", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  padding-bottom: 34px;
}

/* ============================
   Layout
   ============================ */
.app{ display:flex; min-height:100vh; }

/* Sidebar (desktop) */
.sidebar{
  width:360px;
  max-width:100%;
  border-right:1px solid var(--border);
  background:#fff;
  display:flex;
  flex-direction:column;
  height:100vh;
  overflow:hidden;
}

/* Map column (desktop) */
.map{
  flex:1;
  position:relative;
  height:100vh;
  background: radial-gradient(1200px 800px at 30% -10%, #ffeaf4 0%, transparent 60%) no-repeat;
}

/* IMPORTANT: let Leaflet fill the map column (desktop) */
#map{
  height: 100%;
  width: 100%;
}

/* Stacked layout (mobile) */
@media (max-width: 900px){
  .app.stacked{ flex-direction:column; }
  .app.stacked .sidebar{
    width:100%;
    border-right:none;
    border-bottom:1px solid var(--border);
    height:auto;
  }

  /* IMPORTANT: preserve your mobile look (map ~50vh) */
  .app.stacked .map{
    height: 50vh;
  }

  /* keep Leaflet filling whatever height we give it */
  #map{
    height: 100%;
    width: 100%;
  }
}

/* ============================
   Collapsible list / panel
   ============================ */
/* On DESKTOP collapse, hide the list */
.app:not(.stacked) .sidebar.collapsed .panel + .list,
.app:not(.stacked) .sidebar.collapsed .list{ display:none; }

/* On MOBILE (stacked), keep the list visible while collapsed.
   The JS pins a single item, so the list will show just that one. */
.app.stacked .sidebar.collapsed .list{ display:block; }

/* Collapse button */
.collapse-btn{
  display:inline-block;
  margin:0 0 0 12px;
  padding:6px 10px;
  border-radius:10px;
  border:1px solid var(--border);
  background: #fff;
  cursor:pointer;
  font-size:12px;
}

.panel-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-top:6px;
}

/* ============================
   Panel & form controls
   ============================ */
.panel{
  position:sticky; top:0; z-index:2;
  background:#fff;
  border-bottom:1px solid var(--border);
  padding:16px;
}

.panel h1{
  margin:0 0 8px;
  font-size:22px;
  font-family: "Pacifico", cursive;
  color: var(--brand-pink);
  letter-spacing: 0.2px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.7);
}

.row{ display:flex; gap:8px; margin-bottom:8px; }

input[type="text"], select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  font-size:14px;
  background:#fff;
}

.muted{ color:var(--muted); font-size:12px; margin:6px 0 0; }

/* Pills */
#categoryPills{
  display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 10px;
}
#categoryPills button{
  padding:7px 12px;
  border-radius:999px;
  border:1px solid #f1d7e6;
  background:#fff;
  cursor:pointer;
  font-size:12px; line-height:1;
}
#categoryPills button:hover{
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(238,90,166,0.12);
}

/* List */
.list{ list-style:none; margin:0; padding:0; }
#list{
  flex:1;
  overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;

  /* Approximate one row height for smooth math; tweak if your LI height changes */
  --row-height: 76px;
  transition: max-height 220ms ease;
}

.list li{
  padding:12px 16px;
  border-bottom:1px solid var(--border);
  transition: background 120ms ease;
}
.list li:hover{ background:#fff7fb; }

.store-name{ font-weight:700; font-size:14px; color:var(--text); }
.store-meta{ font-size:12px; color:var(--muted); }

/* Actions */
.actions{ display:flex; gap:10px; margin-top:8px; flex-wrap:wrap; }
.actions a{
  font-size:12px;
  text-decoration: underline;
  color: var(--brand-pink-ink);
}
.actions a:hover{
  text-decoration: none;
  filter: saturate(1.1);
}

/* ============================
   Map controls + logo
   ============================ */
.geo-btn, .fit-btn{
  position:absolute;
  top:12px; right:12px;
  z-index:1000;
  padding:8px 10px;
  border-radius:12px;
  border:1px solid var(--border);
  background: #fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
  font-size:12px; cursor:pointer;
}
.fit-btn{ top:52px; }

.geo-btn:hover, .fit-btn:hover{
  border-color: var(--brand-pink);
  box-shadow: 0 0 0 3px rgba(238,90,166,0.12);
}

.map-logo{
  padding:6px;
  background:#fff;
  border-radius:12px;
  box-shadow:0 3px 10px rgba(0,0,0,0.15);
}

/* Pink frame */
.map { position: relative; }
.map-frame {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 300;
  border: 6px solid var(--brand-pink);
}

/* === Collapsed list viewport (shows ~2 items, still scrollable) === */
#list.list--collapsed {
  max-height: calc(var(--row-height) * 2 + 2px);
  overflow-y: auto;
}

/* Override earlier rule that hid the list entirely on desktop when collapsed */
.app:not(.stacked) .sidebar.collapsed .list{ display:block; }
.app:not(.stacked) .sidebar.collapsed #list{ display:block; }

/* === Tighter spacing between countShown and filter options === */
.panel p.muted {
  margin-bottom: 4px; /* default was ~8px → 50% tighter */
  line-height: 1.1;
}

#filtersToggle {
  margin-top: 4px; /* pulls the filter button closer to the count */
}
/* ============================
   News Ticker (seamless, mobile-safe)
   ============================ */

.news-ticker{
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 34px;
  background: #FACACC;
  color: #000000;
  overflow: hidden;
  z-index: 2000;
  display: flex;
  align-items: center;
  font-size: 13px;
}

.news-track{
  width: 100%;
  overflow: hidden;
}

/* We animate the TEXT using vw so it always travels fully across any screen */
#newsTickerText{
  display: inline-block;
  white-space: nowrap;
  will-change: transform;

  /* start off-screen right */
  transform: translateX(100vw);

  /* default desktop speed */
  animation-name: tickerScroll;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: 45s;
}

/* end off-screen left */
@keyframes tickerScroll{
  0%   { transform: translateX(100vw); }
  100% { transform: translateX(-100%); }
}

/* Mobile: a bit faster, but still readable */
@media (max-width: 900px){
  #newsTickerText{
    animation-duration: 26s;
  }
}
/* ============================
   Map cluster + list polish
   ============================ */
.store-cluster-icon {
  background: transparent;
  border: 0;
}

.store-cluster-square {
  width: 42px;
  height: 42px;
  background: #0F4A9C;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
}

.store-name-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.store-name-left,
.store-name-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.store-number-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--brand-pink);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  flex: 0 0 auto;
}

.store-status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.store-status-text {
  font-size: 12px;
  color: var(--text);
  font-weight: 700;
}

.store-description-wrap {
  margin-bottom: 8px;
}

.store-description {
  line-height: 1.45;
}

.store-location-line {
  margin-bottom: 4px;
}

.desc-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--brand-pink-ink);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  padding: 0;
  margin-left: 6px;
  text-decoration: underline;
}

.desc-toggle:hover {
  text-decoration: none;
}