/* "What's nearby" page (area.html, js/area/main.js). Buttons (.ibtn) come from css/island.css. */
.area-main { padding: 0; }
.area [hidden] { display: none !important; }
.area {
  position: relative; overflow: hidden; isolation: isolate;
  height: calc(100svh - var(--area-top, 72px)); min-height: 520px;
  background: linear-gradient(180deg, #4d9ee6 0%, #cfe9ff 100%);
  color: var(--ink);
}
.area-stage { position: absolute; inset: 0; z-index: 1; }
.area-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.area-stage canvas:active { cursor: grabbing; }
.area-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

/* place tags */
.ptag {
  position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  padding: 3px 8px 3px 5px; border-radius: 999px; border: 0;
  font: 700 12px/1.2 var(--font-body, system-ui, sans-serif); color: #23302b;
  background: rgba(255, 255, 255, 0.94); box-shadow: 0 2px 8px rgba(20, 30, 50, 0.22);
  transform: translate(-50%, -100%); transition: opacity 0.15s;
}
.ptag::after { /* little stem down to the pin */
  content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px;
  border: 5px solid transparent; border-bottom: 0; border-top-color: rgba(255, 255, 255, 0.94);
}
.ptag .e { font-size: 14px; line-height: 1; }
.ptag:hover, .ptag:focus-visible { background: #fff; outline: 2px solid var(--green); z-index: 3; }
.ptag.is-on { background: var(--green); color: #fff; z-index: 4; }
.ptag.is-on::after { border-top-color: var(--green); }
.ptag.home { background: #F2B66B; color: #3a2414; font-size: 13px; padding: 5px 11px; z-index: 3; cursor: default; }
.ptag.home::after { border-top-color: #F2B66B; }
.ptag.road { background: rgba(255, 250, 238, 0.82); color: #5E534B; font-weight: 600; font-size: 11px; padding: 1px 7px; box-shadow: none; cursor: default; transform: translate(-50%, -50%); }
.ptag.road::after { display: none; }

/* the intro tag with the size switch */
.area-intro {
  position: absolute; z-index: 3; left: 16px; top: 16px; max-width: 320px;
  padding: 12px 16px 13px; border-radius: 16px;
  background: rgba(251, 246, 238, 0.9); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(20, 30, 50, 0.16);
}
.area-intro h1 { font-size: 1.6rem; line-height: 1.05; margin: 0 0 4px; }
.area-intro .lead { font-size: 0.9rem; line-height: 1.4; margin: 0 0 10px; color: #3A2A22; }
.area-size { display: flex; gap: 6px; }
.area-size button, .area-filters button {
  font: 700 0.84rem/1.2 var(--font-body, system-ui, sans-serif); cursor: pointer;
  border: 1.5px solid rgba(47, 93, 80, 0.35); background: #fff; color: var(--green); border-radius: 999px; padding: 7px 12px;
}
.area-size button span { display: block; font-weight: 600; font-size: 0.72rem; opacity: 0.8; }
.area-size button { border-radius: 12px; flex: 1; text-align: left; }
.area-size button[aria-pressed="true"], .area-filters button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.area-size button:focus-visible, .area-filters button:focus-visible { outline: 3px solid var(--gold, #F2B66B); outline-offset: 2px; }

.area-filters {
  position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 16px;
  display: flex; gap: 6px; overflow-x: auto; padding: 2px; scrollbar-width: none; justify-content: center;
}
.area-filters::-webkit-scrollbar { display: none; }
.area-filters button { flex: none; box-shadow: 0 2px 8px rgba(20, 30, 50, 0.14); }

.area-controls { position: absolute; z-index: 3; right: 16px; top: 16px; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 60%; }
.area-controls a.ibtn { text-decoration: none; }

/* the place card */
.area-card {
  position: absolute; z-index: 5; right: 16px; top: 70px; width: min(360px, calc(100% - 32px));
  max-height: calc(100% - 150px); overflow: auto;
  background: var(--cream, #FBF6EE); border-radius: 18px; padding: 18px 18px 14px;
  box-shadow: 0 14px 40px rgba(20, 30, 50, 0.28);
}
.area-card .x { position: absolute; right: 10px; top: 10px; }
.area-card .em { font-size: 2rem; line-height: 1; margin-bottom: 6px; }
.area-card h2 { font-size: 1.3rem; margin: 0 36px 4px 0; }
.area-card .kind { font-weight: 700; color: var(--green); margin: 0 0 8px; font-size: 0.92rem; }
.area-card p { margin: 0 0 8px; font-size: 0.93rem; line-height: 1.45; }
.area-card .addr { color: var(--ink-soft, #5E534B); }
.area-card .btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 6px; }
.area-card .fine { font-size: 0.78rem; color: var(--ink-soft, #5E534B); margin: 4px 0 0; }

.area-credit { position: absolute; z-index: 3; right: 10px; bottom: 62px; margin: 0; font-size: 0.68rem; color: #2c3a44; background: rgba(255, 255, 255, 0.6); padding: 1px 6px; border-radius: 6px; }
.area-credit a { color: inherit; }
.area-noscript, .area.area-failed::before { position: absolute; z-index: 6; inset: 40% 20px auto; text-align: center; font-weight: 700; }
.area.area-failed::before { content: "The map couldn't load on this device."; }

@media (max-width: 700px) {
  .area-intro { left: 10px; right: 10px; top: 10px; max-width: none; padding: 10px 12px; }
  .area-intro h1 { font-size: 1.3rem; }
  .area-intro .lead { display: none; }
  .area-controls { top: auto; bottom: 74px; right: 10px; left: 10px; max-width: none; justify-content: flex-start; }
  .area-controls [data-turn], .area-controls [data-zoom] { display: none; }
  .area-filters { left: 10px; right: 10px; bottom: 12px; justify-content: flex-start; }
  .area-card { left: 10px; right: 10px; width: auto; top: auto; bottom: 10px; max-height: 60%; }
  .area-credit { bottom: 54px; right: 10px; font-size: 0.6rem; }
}
