/* The hover card and the "This area" card (map-site fix, 2026-12-01; js/hovercard.js, js/areacard.js).
   Lumen surfaces and type from app.css: frosted glass, 14 px names, 13 px details, WorldX blue for Directions. */

/* ------------------------------------------------------------ the hover card */
.hc { position: fixed; z-index: 1004; left: 0; top: 0; width: 288px; overflow: hidden; border-radius: var(--radius);
  background: var(--surface); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--stroke), inset 0 1px 0 var(--stroke-top), var(--shadow-l); }
.hc__photo { display: block; width: 100%; height: 132px; object-fit: cover; background: var(--surface-2); }
.hc__body { padding: 12px 14px 12px; display: grid; gap: 4px; }
.hc__name { justify-self: start; max-width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: pointer;
  font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hc__name:hover { text-decoration: underline; text-underline-offset: 2px; }
.hc__meta, .hc__hours { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-2); display: flex; align-items: center; gap: 4px;
  flex-wrap: wrap; }
.hc__rating { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; color: var(--ink); }
.hc__star { width: 14px; height: 14px; fill: #E8A317; stroke: none; }
.hc__count { color: var(--ink-3); }
.hc__dot { color: var(--ink-3); }
.hc__hours.is-open { color: #1E8A4C; }
.hc__hours.is-closed { color: #C8372D; }
:root[data-theme="dark"] .hc__hours.is-open { color: #5BD08C; }
:root[data-theme="dark"] .hc__hours.is-closed { color: #F08A82; }
.hc__acts { display: flex; gap: 8px; margin-top: 8px; }
.hc__acts .btn { height: 34px; font-size: 13.5px; padding: 0 14px 0 12px; }
.hc__acts .btn:not(.brand) { box-shadow: inset 0 0 0 1px var(--stroke); }

/* the keyboard's list of places on screen: out of sight until it has focus; a ring marks the place being read */
.kbd-places { position: fixed; z-index: 1004; left: calc(var(--rail) + var(--gap)); bottom: 120px; max-width: 280px; max-height: 1px;
  overflow: hidden; clip-path: inset(50%); }
.kbd-places.is-active { clip-path: none; max-height: none; padding: 6px 10px; border-radius: var(--radius-s); background: var(--surface-solid);
  box-shadow: var(--shadow); font-size: 13px; color: var(--ink-2); }
.kbd-places.is-active::before { content: "Places on the map: arrow keys to move, Enter to open, Esc to close"; display: block; }
.kbd-places__item { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
.kbd-ring { position: fixed; z-index: 1003; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 999px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--brand), 0 0 0 5px color-mix(in srgb, var(--brand) 25%, transparent); }

/* ------------------------------------------------------------ the "This area" card */
.areacard { position: absolute; z-index: 1001; top: calc(var(--gap) + 48px + 10px); left: calc(var(--rail) + var(--gap)); max-width: 344px;
  padding: 10px 14px 10px; border-radius: var(--radius); pointer-events: none;
  background: var(--surface); -webkit-backdrop-filter: blur(18px) saturate(150%); backdrop-filter: blur(18px) saturate(150%);
  box-shadow: inset 0 0 0 1px var(--stroke), inset 0 1px 0 var(--stroke-top), var(--shadow); }
.areacard p { margin: 0; }
.areacard__name { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.areacard__sub { font-size: 13px; line-height: 18px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.areacard__traffic { display: flex; align-items: flex-start; gap: 8px; margin-top: 6px !important; padding-top: 6px; border-top: 1px solid var(--line);
  font-size: 13px; line-height: 18px; color: var(--ink-2); }
.areacard__dot { width: 8px; height: 8px; margin-top: 5px; border-radius: 999px; flex: none; background: #2FA866; }
.areacard__traffic[data-level="slow"] .areacard__dot { background: #F0A020; }
.areacard__traffic[data-level="heavy"] .areacard__dot { background: #E5483B; }

/* tablets and small laptops: the chips have their own row under the search box */
@media (min-width: 720px) and (max-width: 1099px) {
  .areacard { top: calc(var(--gap) + 48px + 60px); }
}
/* phones: one compact line under the search box */
@media (max-width: 719px) {
  .hc, .kbd-places, .kbd-ring { display: none !important; }
  .areacard { top: calc(env(safe-area-inset-top) + 10px + 54px + 8px); left: var(--edge); max-width: calc(100vw - 2 * var(--edge));
    padding: 6px 12px; border-radius: 999px; }
  .areacard__sub { display: none; }
  .areacard__name { font-size: 13px; line-height: 18px; }
  .areacard__traffic { margin-top: 0 !important; padding-top: 0; border-top: 0; font-size: 12.5px; }
  .areacard:has(.areacard__traffic:not([hidden])) { border-radius: var(--radius); }
}
@media print { .hc, .areacard, .kbd-places, .kbd-ring { display: none !important; } }
