/* The website's Map page (stage 3, owner-approved add-on): pin status, clusters, the pin's card, the list rows, Posted today.
   WEBSITE ONLY: every rule sits under html.web-shell (a class only the website has; the apps bundle this file but never match it). */

/* pins: every shop in full colour; open = a small green dot, closed = just no dot; a drop that is on right now = an orange ring */
html.web-shell .cart-map-marker .cart-map-pin:before{border-color:#cfc3b5}
html.web-shell .cart-map-marker .cart-map-pin:after{background:#cfc3b5}
html.web-shell .cart-map-marker.is-open .cart-map-pin:before{border-color:#cfc3b5}
html.web-shell .cart-map-marker.is-open .cart-map-pin:after{background:#cfc3b5}
html.web-shell .cm-dot{position:absolute;z-index:3;top:1px;right:1px;width:13px;height:13px;border-radius:50%;background:#3e9a56;border:2px solid #fff;box-shadow:0 1px 3px #0003;box-sizing:border-box}
html.web-shell .cart-map-marker.has-drop .cart-map-pin:before{border-color:#ba4b2a;border-width:4px}
html.web-shell .cart-map-marker.has-drop .cart-map-pin:after{background:#ba4b2a}
html.web-shell .cart-map-marker.is-selected .cart-map-pin:before{border-color:#2d231d;box-shadow:0 0 0 3px #fffdf9,0 6px 18px #2f201b55}
html.web-shell .cart-map-marker.is-selected .cart-map-pin:after{background:#2d231d}
html.web-shell .cart-map-marker.is-hover .cart-map-pin{transform:scale(1.14)}

/* clusters: a small stack of the shops' logos with the count; only pins that would really overlap, 4 or more */
html.web-shell .cm-cluster{position:relative;display:block;width:54px;height:46px;border:0;background:none;padding:0;cursor:pointer;transition:transform .12s}
html.web-shell .maplibregl-marker.cm-cluster{z-index:800}
html.web-shell .cm-cluster:hover,html.web-shell .cm-cluster:focus-visible{transform:scale(1.08);outline:0}
html.web-shell .cm-stack{position:absolute;inset:0;display:block}
html.web-shell .cm-av{position:absolute;width:32px;height:32px;border-radius:50%;border:2px solid #fff;box-sizing:border-box;overflow:hidden;background:#f3ece1;box-shadow:0 2px 8px #2f201b55;display:grid;place-items:center;font:800 13px 'Archivo',system-ui,sans-serif;color:#5d5047}
html.web-shell .cm-av:nth-child(1){left:0;top:12px}
html.web-shell .cm-av:nth-child(2){left:11px;top:5px}
html.web-shell .cm-av:nth-child(3){left:20px;top:12px}
html.web-shell .cm-av img{width:100%;height:100%;object-fit:cover;display:block}
html.web-shell .cm-n{position:absolute;right:0;top:-2px;z-index:2;min-width:24px;height:24px;padding:0 6px;border-radius:12px;border:2px solid #fff;box-sizing:border-box;background:#b2452a;color:#fff;font:800 12px/20px 'Archivo',system-ui,sans-serif;text-align:center;box-shadow:0 2px 6px #2f201b44}

/* attribution: a small ⓘ at the bottom left */
html.web-shell #cart-map .maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib{margin:0 0 8px 8px;border-radius:14px}
html.web-shell #cart-map .maplibregl-ctrl-attrib.maplibregl-compact{min-height:26px;min-width:26px;padding:0}
html.web-shell #cart-map .maplibregl-ctrl-attrib.maplibregl-compact-show{padding:4px 30px 4px 10px}

/* the pin's card, on the map */
html.web-shell .cart-map-popup-frame .maplibregl-popup-content{padding:0;border-radius:16px;box-shadow:0 10px 30px #2d231d45;overflow:hidden}
html.web-shell .cm-card{position:relative;display:grid;grid-template-columns:84px minmax(0,1fr);gap:4px 12px;width:290px;padding:10px;background:#fffdf9;color:#2d231d;font-family:var(--sans,system-ui)}
html.web-shell .cm-card-link{position:absolute;inset:0;z-index:1}
html.web-shell .cm-card-photo{grid-row:1/3;width:84px;height:84px;border-radius:12px;overflow:hidden;background:#f3ece1}
html.web-shell .cm-card-photo img{width:100%;height:100%;object-fit:cover;display:block}
html.web-shell .cm-card-body{display:grid;gap:2px;min-width:0;align-content:start}
html.web-shell .cm-card-body strong{font:800 16px/1.2 'Archivo',var(--sans);padding-right:22px}
html.web-shell .cm-card-body small{font-size:12.5px;color:#5d5047}
html.web-shell .cm-card-post{font-size:13.5px;line-height:1.35;color:#2d231d;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
html.web-shell .cm-posted{color:#76695e!important}
html.web-shell .cm-card-actions{grid-column:1/-1;display:flex;align-items:center;gap:10px;position:relative;z-index:2;margin-top:4px}
html.web-shell .cm-card-actions .btn{height:34px}
html.web-shell .cart-map-popup-frame .maplibregl-popup-close-button{z-index:3;font-size:20px;color:#5d5047}

/* list rows: the whole row opens the shop; one Follow */
html.web-shell .cm-row{position:relative;display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:12px;align-items:center;padding:10px 12px;border-radius:14px;border:1px solid transparent;background:transparent;transition:background .12s}
html.web-shell .cm-row+.cm-row{border-top:1px solid #f1e9df;border-radius:0}
html.web-shell .cm-row:hover,html.web-shell .cm-row.is-hover{background:#f7f1e8}
html.web-shell .cm-row.is-selected{background:#f7e6d9}
html.web-shell .cm-row-link{position:absolute;inset:0;z-index:1}
html.web-shell .cm-photo{width:96px;height:78px;border-radius:12px;overflow:hidden;background:#f3ece1;display:block}
html.web-shell .cm-photo img{width:100%;height:100%;object-fit:cover;display:block}
html.web-shell .cm-body{display:grid;gap:2px;min-width:0}
html.web-shell .cm-body strong{font:800 15.5px/1.25 'Archivo',var(--sans);color:#2d231d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.web-shell .cm-body small{font-size:12.5px;color:#5d5047;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
html.web-shell .cm-follow{position:relative;z-index:2}
html.web-shell .cm-follow .btn{height:34px;padding:0 12px}

/* phones: the map is the whole screen between the header and the tab bar; the chips, the controls and the List button float over it */
@media(max-width:820px){
html.web-shell .map-workspace{padding:0;grid-template-rows:var(--map-hdr,56px) minmax(0,1fr) var(--map-nav,58px)}
html.web-shell .map-workspace .map-split{grid-row:2;grid-column:1}
html.web-shell .map-workspace .map-pane{border:0;border-radius:0}
html.web-shell .map-workspace .map-actions{grid-row:2;grid-column:1;align-self:start;z-index:30;padding:10px 12px 14px;background:linear-gradient(#fffdf9ee 0,#fffdf9b8 62%,#fffdf900);pointer-events:none}
html.web-shell .map-workspace .map-actions>*{pointer-events:auto}
html.web-shell .map-workspace .map-actions .btn-sm{height:36px;box-shadow:0 1px 4px #2f201b22}
html.web-shell .map-workspace .map-chips{grid-row:2;grid-column:1;align-self:start;margin-top:58px;z-index:29;padding:0 12px 6px;pointer-events:none}
html.web-shell .map-workspace .map-chips>*{pointer-events:auto}
html.web-shell .map-workspace .map-chips .map-chip{background:#fffdf9;box-shadow:0 1px 4px #2f201b22}
html.web-shell .map-workspace .map-count{display:none!important}
html.web-shell .map-workspace .map-switch{grid-row:2;grid-column:1;align-self:end;justify-self:center;z-index:31;margin-bottom:18px;pointer-events:none}
html.web-shell .map-workspace .map-switch button{pointer-events:auto}
html.web-shell .map-workspace:has(.map-pane.has-card) .map-switch{margin-bottom:calc(var(--map-sheet-h,0px) + 26px)}   /* the List button rides above a selected shop's card */
html.web-shell .map-workspace .map-controls{top:64px;right:10px;flex-direction:column;gap:8px}
html.web-shell .map-workspace:has(.map-chips) .map-controls{top:106px}
html.web-shell .map-workspace .map-controls .icon-btn{width:36px;height:36px;border-radius:10px;background:#fffdf9e6;border:1px solid #2f201b1a;box-shadow:0 1px 6px #2f201b2b}
html.web-shell .map-workspace .map-controls .icon-btn .icon{width:18px;height:18px}
html.web-shell .map-workspace.is-list .map-actions{background:#fffdf9}
html.web-shell .map-workspace.is-list .cart-map-results{padding-top:58px;box-sizing:border-box}
}

/* "My trail 38" with stops on it (owner 12/6): the filled button was cream text on a white pill, unreadable. A solid terracotta pill, cream text, the count in a cream badge. */
html.web-shell .map-toolbar .map-trail-toggle.btn-primary{background:var(--ws-brand,#b2452a);border-color:var(--ws-brand,#b2452a);color:#fffaf3}
html.web-shell .map-toolbar .map-trail-toggle.btn-primary:hover{background:var(--ws-brand-h,#9b3a21);border-color:var(--ws-brand-h,#9b3a21)}
html.web-shell .map-toolbar .map-trail-toggle.btn-primary b{display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#fffaf3;color:var(--ws-brand-ink,#96391f);font-size:12px}
html.web-shell .map-toolbar .map-trail-toggle.btn-primary .icon{color:#fffaf3}
