/* Skerries News directory v2, direction C ("the paper's town guide"): the category page (2026-11-30, phase 3).
   Markup: business-directory/v2/category.php. Script: lib/js/entry-cat.js. Loaded after directory.css (sn-entry-front.php).
   Everything is scoped under .sn-catv2 (the page root, which also carries .sn-dir for directory.css's basics: box
   sizing, link colour, [hidden]). Design: /root/sn-listing-v2-20261130/design/C/Guide-Cat-Pharmacies(-phone).dc.html and
   Guide-Cat-CharityShops.dc.html. Site fonts (Roboto Slab headings, Arial body), text #222, links #3B5998, ruled like a
   printed page; status in words; no pills, eyebrow labels or coloured borders.
   Owner, 2026-11-30: the tabs (.sn-tabs) and the cards (.sn-cards, .sn-tools) are today's v1 pieces, styled by
   directory.css; nothing here restyles them. The resets below use :where() so they never outrank directory.css. */

:where(.sn-catv2) p, :where(.sn-catv2) ul, :where(.sn-catv2) h1, :where(.sn-catv2) h2, :where(.sn-catv2) h3,
:where(.sn-catv2) figure, :where(.sn-catv2) table { margin: 0; }
:where(.sn-catv2) ul { padding: 0; list-style: none; }
:where(.sn-catv2) li { margin: 0; padding: 0; list-style: none; }
.sn-catv2 { color: #222; font-family: Arial, Helvetica, sans-serif; font-size: 15px; line-height: 1.5; }
.sn-catv2 a:focus-visible, .sn-catv2 button:focus-visible { outline: 2px solid #3B5998; outline-offset: 2px; }
.sn-catv2 .sn-catv2-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Section headings: Roboto Slab bold 16px over a thin black rule */
.sn-catv2 .sn-catv2-sec > h2 { margin: 0; padding: 0 0 7px; border-bottom: 1px solid #222; font-family: 'Roboto Slab', serif; font-weight: 700; font-size: 16px; line-height: 1.4; color: #222; text-transform: none; }

/* ---------------------------------------------------------------- head: H1, standfirst, open now */
.sn-catv2 .sn-catv2-head { display: flex; flex-direction: column; margin-top: 4px; padding-bottom: 24px; border-bottom: 3px double #222; }
.sn-dir.sn-catv2 .sn-catv2-head h1 { margin: 0; font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 44px; line-height: 1.15; color: #222; text-transform: none; }
.sn-catv2 .sn-catv2-stand { margin: 12px 0 0; max-width: 780px; font-family: 'Roboto Slab', serif; font-size: 20px; line-height: 1.45; color: #333; text-wrap: pretty; }
.sn-catv2 .sn-catv2-now { margin: 16px 0 0; font-size: 18px; line-height: 1.45; }
.sn-catv2 .sn-catv2-now.is-none { color: #666; }
.sn-catv2 .sn-catv2-now .is-open { color: #1b6e2f; }
.sn-catv2 .sn-catv2-now .is-soon { color: #8a5300; }
.sn-catv2 .sn-catv2-dot { color: #666; }

/* Today's v1 sub-category tabs, under the header (directory.css styles them) */
.sn-catv2 > .sn-tabs { margin-top: 14px; }

/* ---------------------------------------------------------------- columns: table or cards beside the map */
.sn-catv2 .sn-catv2-cols { display: flex; flex-wrap: wrap; gap: 28px 40px; align-items: flex-start; margin-top: 26px; }
.sn-catv2 .sn-catv2-main { flex: 999 1 560px; min-width: 0; }
.sn-catv2 .sn-catv2-main > .sn-catv2-sec + .sn-catv2-sec { margin-top: 30px; }
.sn-catv2 .sn-catv2-side { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
/* A column per day needs the width: the table takes the whole row, the map and the out-of-hours box share the next. */
.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-main { flex-basis: 100%; }
.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-side { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px 40px; }
.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-mapsec { flex: 1 1 360px; max-width: 620px; }
.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-ooh { flex: 1 1 260px; max-width: 440px; }
/* No table or clothes banks: the map runs as a wide strip above the cards (the out-of-hours box beside it on health). */
.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-side { flex-basis: 100%; flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 20px 40px; }
.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-mapsec { flex: 1 1 560px; min-width: 0; }
.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-ooh { flex: 0 1 360px; }
.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-map { aspect-ratio: 5 / 2; }

/* ---------------------------------------------------------------- who's open when (sn_entry_cat_table_slugs() only) */
.sn-catv2 .sn-catv2-tw { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sn-catv2 table.sn-catv2-who { width: 100%; min-width: 520px; margin: 0; border: 0; border-collapse: collapse; border-spacing: 0; font-variant-numeric: tabular-nums; background: none; }
.sn-catv2 table.sn-catv2-who.is-days { min-width: 640px; }
.sn-catv2 .sn-catv2-who th, .sn-catv2 .sn-catv2-who td { padding: 10px; border: 0; border-bottom: 1px solid #e3e3e3; background: none; text-align: left; vertical-align: top; font-size: 15px; font-weight: 400; color: #222; }
.sn-catv2 .sn-catv2-who th:first-child { padding-left: 0; }
.sn-catv2 .sn-catv2-who thead th { padding-top: 9px; padding-bottom: 9px; font-size: 13px; color: #666; white-space: nowrap; }
.sn-catv2 .sn-catv2-who thead th abbr { text-decoration: none; border: 0; cursor: default; }
.sn-catv2 .sn-catv2-who tbody th { font-weight: 400; }
.sn-catv2 .sn-catv2-who.is-days td { padding-left: 6px; padding-right: 6px; font-size: 14px; white-space: nowrap; }
.sn-catv2 .sn-catv2-who .is-today { background: #f4f4f4; font-weight: 700; color: #222; }
.sn-catv2 .sn-catv2-who td.is-today.is-open { color: #1b6e2f; }
.sn-catv2 .sn-catv2-who td.is-today.is-soon { color: #8a5300; }
.sn-catv2 .sn-catv2-who td.is-today.is-closed, .sn-catv2 .sn-catv2-who td.is-today.is-unknown { color: #666; }
.sn-catv2 .sn-catv2-who td.sn-catv2-none { color: #555; white-space: normal; }
.sn-catv2 .sn-catv2-notes { display: flex; flex-direction: column; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; }
.sn-catv2 .sn-catv2-notes li { margin: 0; padding: 0; list-style: none; }

/* Day tabs: phones only (see the media query); entry-cat.js shows them */
.sn-catv2 .sn-catv2-tabs { display: none; }

/* ---------------------------------------------------------------- clothes banks (charity shops) */
.sn-catv2 .sn-catv2-box > p { margin: 12px 0 0; max-width: 640px; }
.sn-catv2 .sn-catv2-box > p.sn-catv2-more { margin-top: 8px; font-size: 14px; }

/* ---------------------------------------------------------------- the map: plain dots, the name on hover or tap */
.sn-catv2 .sn-catv2-map { position: relative; margin: 12px 0 0; aspect-ratio: 940 / 600; border: 1px solid #222; overflow: hidden; background: #efeeeb; }
@supports not (aspect-ratio: 1) { .sn-catv2 .sn-catv2-map { height: 240px; } }
/* Without the script there is no map to draw, so no empty box (entry-cat.js adds .is-js before it looks for the map). */
.sn-catv2:not(.is-js) .sn-catv2-mapsec { display: none; }
.sn-catv2 .sn-catv2-mapc { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
.sn-catv2 .sn-catv2-mapc .maplibregl-canvas { position: absolute; top: 0; left: 0; }
.sn-catv2 .sn-catv2-mapc .maplibregl-marker { position: absolute; top: 0; left: 0; will-change: transform; }
.sn-catv2 .sn-catv2-attr { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 1px 5px; background: rgba(255, 255, 255, .85); font-size: 10px; line-height: 1.5; color: #444; }
.sn-catv2 .sn-catv2-attr a { color: #444; }
/* A 24px target round a 12px dot; a clothes bank (charity shops) is a hollow dot. */
.sn-catv2 .sn-catv2-pin { display: block; width: 24px; height: 24px; margin: 0; padding: 0; border: 0; background: none; cursor: pointer; }
.sn-catv2 .sn-catv2-pin::before { content: ""; position: absolute; left: 6px; top: 6px; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: #222; box-shadow: 0 0 0 2px #fff; }
.sn-catv2 .sn-catv2-pin.is-b::before { background: #fff; border: 3px solid #222; }
.sn-catv2 .sn-catv2-pin:hover::before, .sn-catv2 .sn-catv2-pin.is-on::before { transform: scale(1.3); }
.sn-catv2 .maplibregl-popup { position: absolute; top: 0; left: 0; display: flex; will-change: transform; pointer-events: none; z-index: 3; }
.sn-catv2 .maplibregl-popup-content { position: relative; pointer-events: auto; padding: 6px 9px; background: #fff; border: 1px solid #222; border-radius: 4px; box-shadow: 0 2px 6px rgba(0, 0, 0, .15); font-size: 13px; line-height: 1.35; }
.sn-catv2 .maplibregl-popup-tip { display: none; }
.sn-catv2 .sn-catv2-pop a { font-weight: 700; color: #3B5998; }
.sn-catv2 .sn-catv2-pop span { display: block; color: #555; }

/* ---------------------------------------------------------------- out of hours */
.sn-catv2 .sn-catv2-ooh { padding: 16px 18px 18px; background: #f4f4f4; border-radius: 6px; }
.sn-catv2 .sn-catv2-ooh h2 { margin: 0; font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 19px; line-height: 1.3; color: #222; }
.sn-catv2 .sn-catv2-ooh p { margin: 4px 0 0; }
.sn-catv2 .sn-catv2-ooh h2 + p { margin-top: 8px; }
.sn-catv2 .sn-catv2-ooh a { white-space: nowrap; }

/* ---------------------------------------------------------------- the places: cards
   v1's hooks (ul.sn-cards, li.sn-card, .sn-st, .sn-tools) so directory.js setupGrid() runs them, restyled here only
   (owner, 2026-11-30: v1's were "outdated looking and busy"). Everything is under .sn-catv2 .sn-cards, which outranks
   directory.css's card rules; v1 pages are untouched. */
.sn-catv2 > .sn-catv2-entries { margin-top: 34px; }
.sn-catv2 .sn-catv2-entries > .sn-tools { margin-top: 4px; }
.sn-catv2 .sn-catv2-entries > .sn-count { margin: 12px 0 12px; }
.sn-catv2 .sn-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.sn-catv2 .sn-cards .sn-card { position: relative; display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; background: #fff; border: 1px solid #e3e3e3; border-radius: 6px; box-shadow: none; overflow: hidden; transition: border-color .15s ease-in; }
.sn-catv2 .sn-cards .sn-card:hover { border-color: #999; box-shadow: none; }
.sn-catv2 .sn-cards .sn-card:focus-within { border-color: #3B5998; box-shadow: 0 0 0 1px #3B5998; }
/* Logo: centred in a fixed area, never greyed (v1 fades closed ones). No logo: the section's icon, small and light. */
.sn-catv2 .sn-cards .sn-catv2-cpic { display: flex; align-items: center; justify-content: center; height: 96px; padding: 12px 14px 0; background: none; }
.sn-catv2 .sn-cards .sn-catv2-cpic img { display: block; width: auto; height: auto; max-width: 85%; max-height: 72px; object-fit: contain; border: 0; box-shadow: none; filter: none; opacity: 1; }
.sn-catv2 .sn-cards .sn-card.is-closed .sn-catv2-cpic img { filter: none; opacity: 1; }
.sn-catv2 .sn-cards .sn-catv2-cpic.is-icon img { width: 36px; height: 36px; max-height: 36px; filter: grayscale(1); opacity: .3; }
.sn-catv2 .sn-cards .sn-card.is-closed .sn-catv2-cpic.is-icon img { filter: grayscale(1); opacity: .3; }
.sn-catv2 .sn-cards .sn-catv2-cbody { display: block; flex: 1 1 auto; padding: 12px 14px 14px; }
.sn-catv2 .sn-cards .sn-catv2-cname { margin: 0; font-family: 'Roboto Slab', serif; font-weight: 400; font-size: 18px; line-height: 1.3; color: #222; text-transform: none; }
.sn-catv2 .sn-cards .sn-catv2-cname a { color: #222; text-decoration: none; }
.sn-catv2 .sn-cards .sn-catv2-cname a::after { content: ""; position: absolute; top: 0; right: 0; bottom: 0; left: 0; z-index: 0; } /* the whole card links to the listing */
.sn-catv2 .sn-cards .sn-card:hover .sn-catv2-cname a { text-decoration: underline; }
.sn-catv2 .sn-cards .sn-catv2-cname a:focus-visible { outline: none; }
.sn-catv2 .sn-cards .sn-catv2-cname .sn-aed { position: relative; z-index: 1; margin-left: 6px; vertical-align: -2px; }
.sn-catv2 .sn-cards .sn-catv2-cmeta { display: block; margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: #666; }
/* Status in coloured words, no tinted bar; "Hours not listed" says nothing. */
.sn-catv2 .sn-cards .sn-card .sn-st { display: block; order: 0; margin: 6px 0 0; padding: 0; border: 0; background: none; font-size: 14px; font-weight: 700; line-height: 1.4; color: #666; }
.sn-catv2 .sn-cards .sn-card .sn-st.is-open { background: none; color: #1b6e2f; font-weight: 700; }
.sn-catv2 .sn-cards .sn-card .sn-st.is-soon { background: none; color: #8a5300; font-weight: 700; }
.sn-catv2 .sn-cards .sn-card .sn-st.is-closed { background: none; color: #666; font-weight: 400; }
.sn-catv2 .sn-cards .sn-card .sn-st.is-unknown { display: none; }
/* The phone number: a small link at the bottom left, above the card's own link. */
.sn-catv2 .sn-cards .sn-catv2-ctel { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; min-height: 32px; margin: -6px 14px 8px; font-size: 13px; color: #3B5998; text-decoration: none; white-space: nowrap; }
.sn-catv2 .sn-cards .sn-catv2-ctel:hover { text-decoration: underline; }
.sn-catv2 .sn-catv2-ico { display: inline-block; flex: none; vertical-align: -2px; }

/* ---------------------------------------------------------------- see also, tell us */
.sn-catv2 > .sn-catv2-see { margin-top: 30px; }
.sn-catv2 .sn-catv2-seegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); column-gap: 40px; }
.sn-catv2 .sn-catv2-seegrid > p { margin: 0; padding: 10px 0; border-bottom: 1px solid #e3e3e3; }
.sn-catv2 .sn-catv2-sub { display: block; font-size: 13px; color: #555; }
.sn-catv2 .sn-catv2-tell { margin: 30px 0 0; padding-top: 14px; border-top: 3px double #222; font-size: 14px; color: #444; }

/* ---------------------------------------------------------------- phones (the 390px artboard) */
/* Cards: 4 across, 2 on tablets, 1 on phones. */
@media (max-width: 1000px) {
	.sn-catv2 .sn-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
	.sn-catv2 .sn-cards { grid-template-columns: minmax(0, 1fr); gap: 12px; }
	.sn-catv2 .sn-cards .sn-catv2-cpic { height: 84px; }
}

@media (max-width: 700px) {
	.sn-catv2 .sn-cards .sn-catv2-ctel { min-height: 44px; margin-top: -12px; margin-bottom: 4px; font-size: 15px; }
	.sn-dir.sn-catv2 { font-size: 16px; }
	.sn-dir.sn-catv2 .sn-catv2-head h1 { font-size: 30px; }
	.sn-catv2 .sn-catv2-head { padding-bottom: 18px; }
	.sn-catv2 .sn-catv2-head h1 { order: 0; }
	.sn-catv2 .sn-catv2-now { order: 1; margin-top: 12px; font-size: 17px; }
	.sn-catv2 .sn-catv2-stand { order: 2; margin-top: 14px; font-size: 18px; }

	.sn-catv2 .sn-catv2-cols { margin-top: 22px; gap: 26px; }
	.sn-catv2 .sn-catv2-main, .sn-catv2 .sn-catv2-side { flex: 1 1 100%; }
	.sn-catv2 .sn-catv2-side { gap: 26px; }
	.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-side, .sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-side { flex-direction: column; gap: 26px; }
	.sn-catv2 .sn-catv2-cols.is-days .sn-catv2-mapsec, .sn-catv2 .sn-catv2-cols.is-days .sn-catv2-ooh,
	.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-mapsec, .sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-ooh { flex: none; width: 100%; max-width: none; }
	.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-map { aspect-ratio: 940 / 600; }
	/* Order as drawn: table and notes, out of hours, map, the places. */
	.sn-catv2 .sn-catv2-side .sn-catv2-ooh { order: -1; padding: 14px 16px 16px; }

	/* Who's open when: one row per place, a tab per day (column) above. */
	.sn-catv2 .sn-catv2-tabs:not([hidden]) { display: flex; margin: 10px 0 0; border-bottom: 1px solid #e3e3e3; }
	.sn-catv2 .sn-catv2-tabs button { flex: 1 1 0; min-width: 0; min-height: 44px; margin: 0 0 -1px; padding: 0 4px; border: 0; border-bottom: 3px solid transparent; background: none; font: inherit; font-size: 15px; color: #3B5998; cursor: pointer; white-space: nowrap; }
	.sn-catv2 .sn-catv2-tabs button.is-today { font-weight: 700; }
	.sn-catv2 .sn-catv2-tabs button[aria-selected="true"] { border-bottom-color: #222; color: #222; }
	.sn-catv2 table.sn-catv2-who, .sn-catv2 table.sn-catv2-who.is-days { min-width: 0; }
	.sn-catv2 .sn-catv2-tabs:not([hidden]) + .sn-catv2-tw .is-off { display: none; }
	.sn-catv2 .sn-catv2-who th, .sn-catv2 .sn-catv2-who td, .sn-catv2 .sn-catv2-who.is-days td { padding: 11px 4px; font-size: 15px; }
	.sn-catv2 .sn-catv2-who th:first-child { padding-left: 0; }
	.sn-catv2 .sn-catv2-who thead th { font-size: 13px; }
	.sn-catv2 .sn-catv2-who tbody th { width: 62%; }
	.sn-catv2 .sn-catv2-notes { gap: 8px; font-size: 15px; }

	.sn-catv2 > .sn-catv2-entries, .sn-catv2 > .sn-catv2-see { margin-top: 26px; }
	.sn-catv2 .sn-catv2-seegrid > p { padding: 11px 0; }
	.sn-catv2 .sn-catv2-tell { margin-top: 26px; font-size: 15px; }
}

@media print {
	.sn-catv2 .sn-catv2-mapsec, .sn-catv2 .sn-catv2-tabs { display: none !important; }
}

/* Wide map strip above the cards: lower, so the cards start sooner (2026-11-30). */
.sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-map { aspect-ratio: auto; height: 260px; }
@media (max-width: 600px) { .sn-catv2 .sn-catv2-cols.is-strip .sn-catv2-map { height: 220px; } }

/* Owner 2026-11-30 ("why a big double bar above the tabs"): no double rules; the tabs' own line separates the header. */
.sn-catv2 .sn-catv2-head { border-bottom: 0; padding-bottom: 8px; }
.sn-catv2 .sn-catv2-tell { border-top: 1px solid #e3e3e3; }

/* Owner 2026-11-30: no "31 places" line above the cards (the tabs carry the count). directory.js setupGrid() still
   writes into .sn-count ("4 places open now" with Open now only), so it stays for screen readers, out of sight. */
.sn-catv2 .sn-catv2-entries > .sn-count { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* Owner 2026-11-30: Open first and A–Z only. setupGrid() binds whatever sort buttons there are, so the v1 toolbar's
   "Closes latest" is hidden rather than removed (category.php also drops ?sort=late). */
.sn-catv2 .sn-sort button[data-sort="late"] { display: none; }
