/* Skerries News community guide. Built from the site's own pieces: the Where To Buy cards (Additional CSS,
   "sn-stockist"), the grey .sn-wtb-more / .subscription-box panels, the homepage's grey tiles and the
   3px colour bars of the main menu. */

.sn-cm-intro { font-size: 16px; line-height: 1.5; margin-bottom: 18px; }

/* Grey panel, as .sn-wtb-more */
.sn-cm-box { background: #f4f4f4; border-radius: 6px; padding: 16px 18px; margin: 0 0 22px; }
.sn-cm-box h2, .sn-cm-box h3 { margin-top: 0; }
.sn-cm-box p:last-child, .sn-cm-box ul:last-child { margin-bottom: 0; }
.sn-cm-box.sn-cm-alert { font-size: 16px; }

/* Map */
.sn-cm-map-wrap { margin: 0 0 24px; }
.sn-cm-map { position: relative; width: 100%; border: 1px solid #e3e3e3; border-radius: 6px; overflow: hidden; background: #f5f5f3; }
.sn-cm-map-note { font-size: 13px; color: #666; margin: 6px 0 0; }
.sn-cm-map-fallback { padding: 20px; margin: 0; color: #555; }

/* Layer toggles: plain checkboxes with the layer's colour */
.sn-cm-chips { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 15px; }
.sn-cm-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; cursor: pointer; color: #222; }
.sn-cm-toggle input { margin: 0; width: 16px; height: 16px; cursor: pointer; }
.sn-cm-swatch { display: inline-block; width: 12px; height: 12px; flex: 0 0 12px; }

/* Teardrop pins */
.sn-cm-pin { display: block; width: 30px; height: 34px; padding: 0; margin: 0; border: 0; background: none !important; cursor: pointer; transition: none !important; }
.sn-cm-pin-head {
	position: absolute; left: 1px; top: 0; width: 28px; height: 28px; box-sizing: border-box;
	background: var(--pin, #ea4335); border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
	box-shadow: 0 1px 4px rgba(0,0,0,.35); display: flex; align-items: center; justify-content: center;
}
.sn-cm-pin-head i { transform: rotate(45deg); color: #fff; font-size: 13px; line-height: 1; }
.sn-cm-pin:focus-visible { outline: none; }
.sn-cm-pin:focus-visible .sn-cm-pin-head { outline: 3px solid #1a73e8; outline-offset: 2px; }

/* Popup */
.sn-cm-map .maplibregl-popup-content { padding: 12px 14px; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.2); font-size: 14px; line-height: 1.4; }
.sn-cm-map .maplibregl-popup-close-button { font-size: 20px; width: 28px; height: 28px; color: #555; }
.sn-cm-map .maplibregl-popup-close-button:hover { background: #f5f5f5; color: #222; }
.sn-cm-pop span, .sn-cm-pop strong { display: block; }
.sn-cm-pop strong { font-size: 15px; margin: 2px 22px 3px 0; color: #222; }
.sn-cm-pop span { color: #555; }
.sn-cm-pop .sn-cm-pop-type { font-size: 13px; color: #777; }
.sn-cm-pop-links { display: flex !important; gap: 14px; margin-top: 8px; }
.sn-cm-pop-links a, .sn-cm-pop-links a:hover { color: #27576B; font-weight: bold; background: none; }
.sn-cm-pop-links a:hover { text-decoration: underline; }
.sn-cm-map .maplibregl-ctrl button, .sn-cm-map .maplibregl-ctrl button:hover { transition: none; }
.sn-cm-map .maplibregl-ctrl-attrib a:hover { background: none; color: inherit; }

/* Place cards: the Where To Buy card, with the layer's colour as a 3px top bar like the main menu */
ul.sn-cm-places {
	list-style: none; margin: 0 0 26px; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px;
}
ul.sn-cm-places li.sn-cm-place {
	margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #e3e3e3; border-top: 3px solid #ccc; border-radius: 0 0 6px 6px;
	display: flex; flex-direction: column; overflow: hidden;
}
ul.sn-cm-places li.sn-cm-place:before { display: none; }
.sn-cm-place-main { padding: 12px 14px 10px; flex: 1 1 auto; color: #222; }
.post-content h3.sn-cm-place-name { font-size: 17px; line-height: 1.3; margin: 0 0 5px; padding: 0; }
.sn-cm-place-name a { color: #222; }
.sn-cm-place-name a:hover { background: none; color: #222; text-decoration: underline; }
.sn-cm-place-line { display: block; font-size: 14px; color: #555; line-height: 1.4; margin-bottom: 3px; }
.sn-cm-place-line i { color: #888; margin-right: 2px; }
.sn-cm-place-note { display: block; font-size: 14px; color: #555; font-style: italic; margin-top: 6px; line-height: 1.4; }
.sn-cm-place-logo-wrap { display: flex; align-items: center; justify-content: center; height: 80px; margin-bottom: 10px; }
.sn-cm-place-logo-wrap:hover { background: none; }
.sn-cm-place-logo-wrap img.sn-cm-place-logo { max-height: 80px; width: auto; max-width: 85%; height: auto; }
.sn-cm-place-links { display: flex; border-top: 1px solid #eee; }
.sn-cm-place-links a {
	flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: 6px;
	min-height: 44px; padding: 0 6px; font-size: 14px; text-align: center; color: #27576B; text-decoration: none; white-space: nowrap;
}
.sn-cm-place-links a[hidden] { display: none; }
.sn-cm-place-links a + a { border-left: 1px solid #eee; }
.sn-cm-place-links a:hover { background: #f5f5f5; color: #27576B; }

/* Sources line */
.sn-cm-checked { font-size: 13px; color: #777; line-height: 1.5; margin: 18px 0 22px; }
.sn-cm-checked a { color: #777; text-decoration: underline; }

/* Hub tiles: the homepage's grey tiles, with the colour bar along the bottom */
ul.sn-cm-tiles { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
ul.sn-cm-tiles li { margin: 0; padding: 0; list-style: none; }
ul.sn-cm-tiles li:before { display: none; }
a.sn-cm-tile {
	display: flex; flex-direction: column; align-items: center; height: 100%; box-sizing: border-box; padding: 12px 10px 10px;
	background: #eee; border-radius: 5px; color: #222; text-align: center; text-decoration: none;
}
a.sn-cm-tile:hover { background: #ddd; color: #222; }
.sn-cm-tile-icon { font-size: 28px; line-height: 1; margin-bottom: 6px; }
.sn-cm-tile-title { font-weight: bold; font-size: 15px; line-height: 1.3; }
.sn-cm-tile-blurb { font-size: 13px; color: #555; line-height: 1.35; margin-top: 3px; }

/* Numbers list */
ul.sn-cm-numbers { list-style: none; margin: 0 0 22px; padding: 0; border-top: 1px solid #e6e6e6; }
ul.sn-cm-numbers li { list-style: none; margin: 0; padding: 10px 0; border-bottom: 1px solid #e6e6e6; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
ul.sn-cm-numbers li:before { display: none; }
ul.sn-cm-numbers li > span { flex: 1 1 300px; min-width: 0; }
ul.sn-cm-numbers li > span strong { color: #222; }
ul.sn-cm-numbers li > span > span { display: block; color: #555; font-size: 14px; line-height: 1.45; }
ul.sn-cm-numbers li a[href^="tel:"] { font-weight: bold; white-space: nowrap; }

@media only screen and (max-width: 768px) {
	.sn-cm-map { height: 360px !important; }
}
@media only screen and (max-width: 480px) {
	ul.sn-cm-places { grid-template-columns: 1fr; gap: 12px; }
	ul.sn-cm-tiles { grid-template-columns: 1fr 1fr; }
	.post-content h3.sn-cm-place-name { font-size: 16px; }
}
@media print {
	.sn-cm-map-wrap, .sn-cm-place-links { display: none; }
}
