/* Interesting Places: full-bleed globe, floating search bar, a nearest-places
   panel (desktop card / mobile bottom sheet), and the detail drawer.
   Tokens come from app/app.css. */

.view.view-full { padding: 0 !important; max-width: none; margin: 0; }
.view.view-full > * { animation: none; }

.pl-wrap { position: relative; height: calc(100vh - var(--topbar-h)); height: calc(100dvh - var(--topbar-h)); overflow: hidden; background: var(--paper-2); }
.pl-map { position: absolute; inset: 0; }
.pl-map .mapboxgl-canvas { outline: none; }
.pl-nomap { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .8rem; }
.mapboxgl-popup.pl-popup .mapboxgl-popup-content { font-family: var(--body); font-size: .82rem; padding: 6px 10px; border-radius: 8px; box-shadow: var(--shadow-1); background:#fff; color:#12161F; }
.mapboxgl-ctrl-bottom-left { z-index: 4; }

/* Floating bar */
.pl-bar { position: absolute; top: 14px; left: 14px; right: 424px; z-index: 5; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.pl-bar > * { pointer-events: auto; }
.pl-bar-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pl-search { display: flex; gap: 6px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 4px 4px 12px; box-shadow: var(--shadow-1); min-width: 260px; max-width: 420px; flex: 1; }
.pl-search-input { border: 0; background: transparent; padding: .45rem 0; box-shadow: none !important; }
.pl-search-input:focus { border-color: transparent; }
.pl-count { font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); background: rgba(250, 247, 242, .92); border: 1px solid var(--line); border-radius: 6px; padding: 5px 9px; }
.pl-chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.pl-chips::-webkit-scrollbar { display: none; }
.pl-chips .chips { flex-wrap: nowrap; }
.pl-chips .chip { white-space: nowrap; font-size: .78rem; padding: .35rem .7rem; box-shadow: var(--shadow-1); }

/* Panel */
.pl-panel { position: absolute; top: 14px; right: 14px; bottom: 14px; width: 396px; z-index: 6; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow-2); overflow: hidden; }
.pl-panel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--terracotta), var(--golden)); }
.pl-handle { display: none; }
.pl-panel-head { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding: 16px 16px 10px 18px; border-bottom: 1px dashed var(--line-2); }
.pl-panel-headings { min-width: 0; }
.pl-panel-title { font-size: 1.15rem; margin-top: 4px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pl-close { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.pl-panel-body { flex: 1; overflow: auto; padding: 12px 14px 20px 18px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.pl-left { font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; }
.pl-pill { display: none; }

/* Cards */
.pl-card { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 10px; text-align: left; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; color: inherit; transition: transform .18s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.pl-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); border-color: var(--line-2); }
.pl-card .thumb { width: 76px; height: 76px; }
.pl-card-body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pl-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pl-card-top .mono { font-size: .68rem; }
.pl-card-title { font-family: var(--display); font-size: 1.02rem; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card-sub { color: var(--muted); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-card-meta { display: flex; gap: 12px; font-family: var(--mono); font-size: .66rem; color: var(--muted); letter-spacing: .04em; }
/* Keep attribution links beside their photo, outside the card's main button. */
.pl-design article.pl-card { cursor: default; row-gap: 6px; }
.pl-card-open { grid-column: 1 / -1; display: grid; grid-template-columns: inherit; gap: inherit; width: 100%; min-width: 0; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: start; cursor: pointer; border-radius: 8px; }
.pl-card-open:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }
.pl-card > .pl-summary-credit { grid-column: 1 / -1; }
.pl-card > .pl-summary-credit a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
/* The public map total is useful on compact screens as well as desktop. */
.pl-design .pl-search .pl-count { display: inline-block; flex-shrink: 0; }

/* Detail */
.pl-detail { display: flex; flex-direction: column; gap: 12px; }
.pl-strip { display: flex; flex-direction: column; gap: 6px; }
.pl-hero { margin: 0; position: relative; }
.pl-hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; background: var(--paper-3); }
.pl-hero.thumb-fallback { aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.pl-credit { position: absolute; left: 8px; bottom: 8px; font-family: var(--mono); font-size: .6rem; letter-spacing: .06em; color: #FAF7F2; background: rgba(28, 28, 30, .62); padding: 3px 7px; border-radius: 6px; max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-credit a { color: inherit; }
.pl-strip-row { display: grid; grid-auto-flow: column; grid-auto-columns: 64px; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pl-strip-row::-webkit-scrollbar { display: none; }
.pl-strip-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--paper-3); }
.pl-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-desc { font-size: .95rem; color: var(--ink-2); white-space: pre-line; }
.pl-counts { display: flex; gap: 14px; font-size: .68rem; letter-spacing: .04em; }
.pl-submitter { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.pl-comments { border-top: 1px dashed var(--line-2); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.pl-comment { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; }
.pl-comment p { margin: 2px 0 0; }
.pl-cap .pass { grid-template-columns: 1fr; }
.pl-cap .pass-stub { border-left: 0; border-top: 1.5px dashed var(--line-2); flex-direction: row; }
.pl-cap .pass-stub::before, .pl-cap .pass-stub::after { display: none; }

/* Mobile: the panel is a bottom sheet, the bar stacks, a pill toggles the list */
@media (max-width: 900px) {
    .pl-wrap { height: calc(100vh - var(--topbar-h) - var(--tab-h)); height: calc(100dvh - var(--topbar-h) - var(--tab-h)); }
    .pl-bar { right: 10px; left: 10px; top: 10px; }
    .pl-search { min-width: 0; }
    .pl-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; height: 46vh; border-radius: 18px 18px 0 0; border-bottom: 0; transform: translateY(102%); transition: transform .32s var(--ease), height .32s var(--ease); }
    .pl-panel::before { display: none; }
    .pl-handle { display: block; width: 40px; height: 4px; border-radius: 4px; background: var(--line-2); margin: 8px auto 0; }
    .pl-wrap[data-sheet="list"] .pl-panel { transform: none; }
    .pl-wrap[data-sheet="detail"] .pl-panel { transform: none; height: 82vh; }
    .pl-panel-head { padding: 8px 14px 8px 16px; }
    .pl-pill { display: inline-flex; position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 7; box-shadow: var(--shadow-2); }
    .pl-wrap[data-sheet="detail"] .pl-pill { display: none; }
    .pl-card { grid-template-columns: 64px 1fr; }
    .pl-card .thumb { width: 64px; height: 64px; }
}
@media (max-width: 900px) and (max-height: 640px) { .pl-wrap[data-sheet="list"] .pl-panel { height: 55vh; } }
@media (prefers-reduced-motion: reduce) { .pl-panel { transition: none; } }

/* Native Moment-activity palette; separate from category/place marker colors. */
.pl-design .pl-moments-key .pl-density-gradient { background:linear-gradient(90deg,#2196F3,#4CAF50 33%,#FFEB3B 66%,#F44336); }
.pl-design .pl-density-key.pl-moments-key { max-width:min(280px,calc(100% - 72px)); }
.pl-design .pl-moments-key .pl-moments-window { width:100%;font:11px/1.5 var(--body);color:var(--ink-2); }
.pl-design .pl-moments-key .pl-moments-status { width:100%;margin:2px 0 0;font:12px/1.5 var(--body);color:var(--ink-2); }

/* Map search follows the native curated + Mapbox suggestion flow. */
.pl-wrap.pl-design > .pl-bar {position:relative;z-index:20;}
.pl-design .pl-search {position:relative;}
.pl-design .pl-search-panel {position:absolute;inset-inline:0;top:calc(100% + 8px);z-index:30;min-width:100%;padding:6px;background:var(--paper);color:var(--ink);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow-2);text-align:start;}
.pl-design .pl-search-panel[hidden] {display:none;}
.pl-design .pl-search-results {max-height:min(380px,42vh);overflow-y:auto;overscroll-behavior:contain;}
.pl-design .pl-search-results [role=option] {display:flex;flex-direction:column;align-items:flex-start;gap:4px;width:100%;min-height:52px;padding:10px;border:0;border-radius:10px;background:transparent;color:var(--ink);font:13px/1.4 var(--body);text-align:start;cursor:pointer;white-space:normal;overflow-wrap:anywhere;}
.pl-design .pl-search-results [role=option] strong {font-weight:500;}
.pl-design .pl-search-results [role=option] span {font-size:11px;color:var(--ink-2);}
.pl-design .pl-search-results [role=option]:hover,.pl-design .pl-search-results [aria-selected=true] {background:var(--paper-2);outline:1px solid var(--line);outline-offset:-1px;}
.pl-design .pl-search-status {margin:8px;font:12px/1.5 var(--body);}
.pl-design .pl-search-credit {display:block;margin:6px 8px;font:11px/1.5 var(--body);color:var(--ink-2);text-align:end;}
.pl-design .pl-search-credit[hidden] {display:none;}
.pl-design .pl-card>.pl-translation-credit {grid-column:1/-1;margin:0 14px 8px;font-size:10px;}

.pl-wrap.pl-design .pl-chips {min-width:0;overflow:visible;align-items:center;}
.pl-wrap.pl-design .pl-chips>.chips {min-width:0;flex:1 1 0%;max-width:100%;overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scrollbar-width:thin;padding-block:2px 5px;}
.pl-wrap.pl-design .pl-chips>.chips>.chip {flex-shrink:0;}
.pl-wrap.pl-design .pl-chip-scroll {flex:0 0 30px;min-width:30px;width:30px;min-height:32px;padding:5px;border:1px solid var(--line);border-radius:50%;background:var(--paper);color:var(--ink);}
.pl-wrap.pl-design .pl-chip-scroll[hidden] {display:none;}
.pl-wrap.pl-design .pl-chip-scroll:disabled {opacity:.35;}
[dir=rtl] .pl-wrap.pl-design .pl-chip-scroll svg {transform:rotate(180deg);}
