/* App layout: full-height map with list panel (desktop) / bottom sheet (mobile) */
.app-body { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

.app-header {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px;
  background: var(--paper);
  border-bottom: 4px solid var(--asphalt);
  border-image: repeating-linear-gradient(90deg, var(--asphalt) 0 40px, transparent 40px 64px) 4;
  z-index: 1001;
}
.app-header .brand { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; text-decoration: none; }
.app-header .brand img { width: 26px; height: 26px; border-radius: 6px; }
@media (max-width: 560px) { .app-header .brand span { display: none; } }

.filters { display: flex; gap: 8px; overflow-x: auto; }
.chip {
  font-family: var(--font-body); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 999px;
  border: 2px solid var(--asphalt); background: transparent; color: var(--asphalt);
  cursor: pointer; white-space: nowrap;
}
.chip.active { background: var(--marigold); }
.chip:focus-visible { outline: 3px solid var(--marigold-deep); outline-offset: 2px; }

.app-main { flex: 1; display: flex; position: relative; min-height: 0; }
#map { flex: 1; min-height: 0; z-index: 1; }

/* Desktop list panel */
.truck-list {
  width: 340px; overflow-y: auto; background: var(--paper);
  border-left: 1px solid var(--hairline); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
@media (max-width: 820px) { .truck-list { display: none; } }

.truck-card {
  background: #FFFFFF; border: 1px solid var(--hairline); border-radius: 12px;
  padding: 14px; cursor: pointer; text-align: left; font-family: var(--font-body);
  transition: border-color 0.12s ease;
}
.truck-card:hover, .truck-card.selected { border-color: var(--asphalt); }
.truck-card:focus-visible { outline: 3px solid var(--marigold-deep); outline-offset: 2px; }
.truck-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.truck-card h3 { font-size: 16px; font-family: var(--font-display); }
.truck-card .meta { font-size: 13px; color: var(--muted); margin: 4px 0 0; }

/* Detail sheet: bottom sheet on mobile, right overlay on desktop */
.sheet {
  position: absolute; z-index: 1000; background: #FFFFFF;
  border: 1px solid var(--hairline); box-shadow: 0 -6px 24px rgba(30,27,22,0.12);
  left: 0; right: 0; bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  max-height: 62%; overflow-y: auto;
}
@media (min-width: 821px) {
  .sheet { left: auto; top: 14px; right: 354px; bottom: 14px; width: 360px; max-height: none; border-radius: 16px; box-shadow: 0 6px 24px rgba(30,27,22,0.14); }
}
.sheet-close {
  position: absolute; top: 10px; right: 12px;
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--asphalt); background: var(--paper);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.sheet h2 { font-size: 22px; padding-right: 40px; }
.sheet .sub { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }
.sheet .loc { font-size: 14px; margin: 0 0 14px; }

.menu-item {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--hairline);
}
.menu-item .name { font-weight: 600; font-size: 15px; }
.menu-item .desc { font-size: 13px; color: var(--muted); margin: 2px 0 0; }
.menu-item .price { font-weight: 600; white-space: nowrap; }
.menu-item.soldout { opacity: 0.45; }
.menu-item.soldout .name::after { content: " · 86'd"; color: #A32D2D; font-size: 12px; }
.add-btn {
  border: 2px solid var(--asphalt); background: var(--paper); border-radius: 8px;
  width: 34px; height: 34px; font-size: 18px; cursor: pointer; flex-shrink: 0;
}
.add-btn:hover { background: var(--marigold); }

.sheet-cta { position: sticky; bottom: 0; background: #FFFFFF; padding-top: 12px; margin-top: 6px; }
.sheet-cta .btn { width: 100%; }

.fav-btn { background: none; border: none; font-size: 20px; cursor: pointer; padding: 4px; }

/* Leaflet pin markers */
.ftf-pin { background: none; border: none; }
.ftf-pin .pinbody {
  width: 34px; height: 34px; border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--asphalt);
  background: #B4B2A9;
  box-shadow: 0 2px 6px rgba(30,27,22,0.3);
}
.ftf-pin.live .pinbody { background: var(--live); }
.ftf-pin .pinbody span { transform: rotate(45deg); font-size: 15px; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: var(--asphalt); color: var(--paper);
  padding: 12px 20px; border-radius: 10px; font-size: 14px; font-weight: 500;
  z-index: 2000;
}
