/*
 * Public notices — cards, municipality pills, filter chips, joint banner.
 * Colours come from the municipality settings via inline custom properties:
 *   --po-accent  one municipality's colour (cards: po-cards.css)
 *   --po-stripe  hard-stop gradient, one band per municipality (joint notices)
 *   --po-badge   colour of one municipality pill
 *   --po-chip    colour (or gradient) of one filter chip
 */

/* List cards: see po-cards.css */
.po-notices-block { width: 100%; }
.po-notices-more { margin: 20px 0 0; }

/* ---------- Municipality pill ---------- */
.po-muni-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.po-muni-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 2px 10px 2px 3px;
	border: 1px solid var(--po-badge);
	border-radius: 999px;
	background: color-mix(in srgb, var(--po-badge) 10%, #fff);
	color: var(--po-primary, #222233);
	font: 700 .78rem/1.4 var(--po-font-body);
	text-decoration: none;
	white-space: nowrap;
}
.po-muni-badge::before { content: none; }
.po-muni-badge__logo { width: 20px; height: 20px; object-fit: contain; border-radius: 50%; background: #fff; }
.po-muni-badge:hover, .po-muni-badge:focus { background: color-mix(in srgb, var(--po-badge) 22%, #fff); }

/* ---------- Filter chips ---------- */
.po-notice-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.po-notice-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	border: 2px solid #d9d9e0;
	border-radius: 999px;
	background: #fff;
	color: var(--po-primary, #222233);
	font: 700 .9rem/1.2 var(--po-font-body);
	text-decoration: none;
}
.po-notice-chip__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--po-chip); flex: 0 0 auto; }
.po-notice-chip:hover, .po-notice-chip:focus-visible { border-color: var(--po-primary, #222233); }
.po-notice-chip[aria-current="true"] { background: var(--po-primary, #222233); border-color: var(--po-primary, #222233); color: #fff; }
.po-notice-chip[aria-current="true"] .po-notice-chip__dot { box-shadow: 0 0 0 2px #fff; }

/* ---------- Single notice ---------- */
.po-notice-concerns { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 24px; padding: 12px 16px; background: #f6f6f8; border-radius: 8px; }
.po-notice-concerns__label { font-weight: 700; }
.po-notice-concerns__all { margin-left: auto; font-weight: 700; color: var(--po-primary, #222233); }

/* Joint banner: bar split into each municipality's colour */
.po-banner--joint { border-bottom: 0; }
.po-banner--joint::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--po-stripe); }
.po-banner__eyebrow { margin: 0 0 6px; font: 700 .85rem/1.2 var(--po-font-body); letter-spacing: .12em; text-transform: uppercase; color: #fff; opacity: .9; }
.po-banner__munis { margin-top: 12px; }
.po-banner__munis .po-muni-badge { background: rgba(255, 255, 255, .92); }
body.po-muni--joint .po-sublogo { display: none; }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
	.po-notice-chip { padding: 6px 12px; font-size: .85rem; }
	.po-notice-concerns__all { margin-left: 0; }
	.po-banner__munis { justify-content: center; }
}

/* ---------- Central notices page ---------- */
.po-notices-hub { max-width: 1280px; margin: 0 auto; padding: 40px 20px 72px; box-sizing: border-box; }
.po-notices-hub__intro { max-width: 70ch; margin: 0 0 28px; font-size: 1.05rem; line-height: 1.6; color: #3d4150; }
.po-notices-hub .po-notices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
.po-notices-hub .po-pagination { margin-top: 32px; }

/* In-place filtering (po-notices.js) */
.po-notices-results:focus { outline: none; }
.po-notices-block.is-loading .po-notices-results { opacity: .45; transition: opacity .15s ease; pointer-events: none; }
.po-notices-block.is-loading .po-notice-chip { pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .po-notices-block.is-loading .po-notices-results { transition: none; } }

/* ---------- Single notice: content + right rail ---------- */
.po-single-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; }
.po-single-layout__main { min-width: 0; }
.po-rail { display: grid; gap: 24px; }
.po-rail__box { padding: 22px 20px; background: #f6f6f8; border-radius: 14px; border-top: 5px solid var(--po-accent, #018000); }
.po-rail__title { margin: 0 0 16px; font: 400 1.6rem/1.1 var(--po-font-head, "Fjalla One", sans-serif); text-transform: uppercase; color: var(--po-primary, #222233); }
.po-rail .po-notices { gap: 10px; }
.po-rail .po-card { padding: 10px 12px 10px 10px; gap: 12px; }
.po-rail .po-card__date { flex-basis: 52px; height: 62px; }
.po-rail .po-card__day { font-size: 1.5rem; }
.po-rail .po-card__title { font-size: .92rem; }
.po-rail .po-card__arrow { display: none; }
.po-rail__more { margin: 14px 0 0; font-weight: 700; }
.po-rail__more a { color: var(--po-primary, #222233); }
.po-rail__note { margin: 12px 0 0; font-size: .85rem; font-style: italic; color: #4a4f5c; }
@media (max-width: 1000px) {
	.po-single-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- Central notices page: list + right rail ---------- */
.po-hub-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
.po-hub-layout__main { min-width: 0; }
.po-hub-layout .po-notices { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.po-hub-layout .po-rail { position: sticky; top: 24px; }
@media (max-width: 1000px) {
	.po-hub-layout { grid-template-columns: minmax(0, 1fr); }
	.po-hub-layout .po-rail { position: static; }
}

/* Hub inside a Theme Builder page: same 1280px container as the intro (cf. .po-muni-hub). */
body.tb-core-page .tb-core-page__main:has(> .tb-core-page__block--html .po-notices-hub) { max-width: 1280px; margin: 0 auto; padding: 40px 20px 0; box-sizing: border-box; }
body.tb-core-page .tb-core-page__main:has(> .tb-core-page__block--html .po-notices-hub) > .tb-core-page__block:not(.tb-core-page__block--page-header):not(.tb-core-page__block--image-overlay) .tb-core-page__block-inner { padding-left: 0; padding-right: 0; margin-left: 0; }
body.tb-core-page .tb-core-page__block--html .tb-core-page__block-inner:has(.po-notices-hub) { max-width: none; padding: 0; }
body.tb-core-page .po-notices-hub { max-width: none; padding: 8px 0 72px; }
