/*
 * Flock Press — App Chrome (Phase 1 of the
 * website-to-app rebuild, owner decision Dec 2,
 * 2026). The frame around FP surfaces is now the
 * app's own chrome, translated from the native
 * app's theme.ts / chrome.ts:
 *
 *   - Glass recipe (barGlass): rgba(248,250,255,.78)
 *     over an 8px backdrop blur, on BOTH bars.
 *   - Navy #1B3A8C, text #17203A, muted #6B7280,
 *     inactive tab #4B5563, border #E3E7F0, page
 *     ground #F7F8FC, active pill #DCE7FF, badge
 *     red #B3261E, circle-button ground #EEF1F7.
 *   - Content padded top and bottom (the web's
 *     CHROME_TOP / CHROME_BOTTOM) so nothing rests
 *     hidden behind the floating bars.
 */

/* --- Cross-document View Transitions (R11) ---
   The website's settled smoothness mechanism
   (blueprint R11, reaffirmed in the Dec 3, 2026
   website-app parity contract): bottom-bar and
   card navigations stay real same-origin document
   navigations, and this opt-in is what makes
   supporting browsers animate between documents
   — a plain root crossfade — so a tab tap (Alerts
   included) feels like the app's in-place view
   swap instead of a hard page load. Browsers
   without support navigate as usual; a reduced
   motion preference turns the effect off. This
   rule was specified for the shared chrome
   stylesheet when the shell was built but never
   landed; 1.0.112 adds it. It changes no
   navigation semantics: fragment swaps remain
   reserved for in-page state (the Market grid,
   the feed), exactly as R11/R13 hold. */
@view-transition {
	navigation: auto;
}
@media (prefers-reduced-motion: reduce) {
	@view-transition {
		navigation: none;
	}
}

/* --- Theme chrome off, on FP surfaces only --- */
body.fp-chrome header.wp-block-template-part,
body.fp-chrome #header,
body.fp-chrome #header + hr,
body.fp-chrome #footer {
	display: none;
}

/* The WP admin bar goes away on FP surfaces too
   (owner, Nov 5, 2026) — the module also filters
   show_admin_bar off; this is the belt to those
   suspenders. */
body.fp-chrome #wpadminbar {
	display: none;
}

/* App ground + room for the floating bars. */
body.fp-chrome {
	background: #f7f8fc;
	padding-top: calc(60px + env(safe-area-inset-top, 0px));
	padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
}

/* --- Top bar --- */
.fp-appbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 10px;
	background: rgba(248, 250, 255, 0.78);
	-webkit-backdrop-filter: blur(8px) saturate(1.5);
	backdrop-filter: blur(8px) saturate(1.5);
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
	.fp-appbar,
	.fp-apptabs {
		background: rgba(248, 250, 255, 0.97);
	}
}
.fp-appbar-btn {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: none;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #17203a;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.fp-appbar-btn:hover,
.fp-appbar-btn:focus-visible {
	background: rgba(27, 58, 140, 0.08);
}
.fp-appbar-btn svg {
	width: 26px;
	height: 26px;
}
.fp-appbar-brand {
	flex: 1 1 auto;
	min-width: 0;
	margin-left: 4px;
	color: #1b3a8c;
	font-size: 21px;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.1;
	text-decoration: none;
	white-space: nowrap;
	overflow: hidden;
}
.fp-appbar-brand:hover,
.fp-appbar-brand:focus {
	color: #142c6b;
	text-decoration: none;
}
/* 1.0.100: the app wordmark image inside the brand
   link, shown at the same 32px height the app header
   uses, capped so the action buttons never squeeze
   on narrow phones. */
.fp-appbar-logo {
	display: block;
	height: 32px;
	width: auto;
	max-width: min(150px, 44vw);
}
.fp-appbar-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
	margin-left: auto;
}
.fp-appbar-circle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #eef1f7;
	color: #17203a;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.fp-appbar-circle:hover,
.fp-appbar-circle:focus-visible {
	background: #e2e8f4;
	color: #17203a;
}
.fp-appbar-circle svg {
	width: 19px;
	height: 19px;
}
.fp-appbar-msgwrap {
	position: relative;
	display: inline-flex;
}
.fp-appbar-msg {
	position: relative;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #1b3a8c;
	color: #fff;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease;
}
.fp-appbar-msg:hover,
.fp-appbar-msg:focus-visible {
	background: #142c6b;
	color: #fff;
}
.fp-appbar-msg svg {
	width: 18px;
	height: 18px;
}
.fp-chrome-msg-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 19px;
	height: 19px;
	padding: 0 4px;
	border-radius: 999px;
	background: #b3261e;
	border: 2px solid #fff;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
	line-height: 15px;
	text-align: center;
	box-sizing: border-box;
}

/* --- Messages preview panel --- */
.fp-chrome-menu {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	min-width: 210px;
	background: #fff;
	color: #17203a;
	border: 1px solid #e3e7f0;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(23, 32, 58, 0.18);
	padding: 6px;
	z-index: 1050;
	animation: fp-menu-in 0.16s ease;
}
@keyframes fp-menu-in {
	from { opacity: 0; transform: translateY(-4px); }
	to { opacity: 1; transform: translateY(0); }
}
.fp-chrome-menu[hidden] {
	display: none;
}
.fp-chrome-menu-name {
	margin: 6px 10px 4px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #6b7280;
}
.fp-chrome-msgmenu { width: min(330px, calc(100vw - 20px)); padding: 6px; }
.fp-chrome-menu a.fp-chrome-msgrow { display: flex; gap: 10px; align-items: flex-start; padding: 8px; color: #17203a; text-decoration: none; border-radius: 8px; }
.fp-chrome-menu a.fp-chrome-msgrow:hover,
.fp-chrome-menu a.fp-chrome-msgrow:focus { background: #eaf0ff; text-decoration: none; }
.fp-chrome-msgrow img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.fp-chrome-msgrow-main { flex: 1; min-width: 0; }
.fp-chrome-msgrow-top { display: flex; align-items: baseline; gap: 8px; }
.fp-chrome-msgrow-name { font-weight: 700; font-size: 14.5px; color: #17203a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fp-chrome-msgrow-time { margin-left: auto; font-size: 11.5px; color: #6b7280; flex: none; }
.fp-chrome-msgrow-preview { display: block; font-size: 13px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.fp-chrome-msgrow.is-unread .fp-chrome-msgrow-name,
.fp-chrome-msgrow.is-unread .fp-chrome-msgrow-preview { color: #1b3a8c; font-weight: 700; }
.fp-chrome-msgcount { background: #b3261e; color: #fff; font-size: 11px; font-weight: 800; border-radius: 999px; padding: 2px 7px; flex: none; margin-top: 2px; }
.fp-chrome-msgempty { margin: 0; padding: 10px; font-size: 13.5px; color: #6b7280; line-height: 1.45; }
.fp-chrome-menu a.fp-chrome-msgall { display: block; text-align: center; font-weight: 700; color: #1b3a8c; border-top: 1px solid #e3e7f0; border-radius: 0 0 8px 8px; margin-top: 4px; padding: 10px; text-decoration: none; }

/* --- Drawer --- */
.fp-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: rgba(10, 15, 30, 0.45);
	opacity: 0;
	transition: opacity 0.22s ease;
}
.fp-drawer-backdrop[hidden] {
	display: none;
}
.fp-drawer-backdrop.fp-open {
	opacity: 1;
}
.fp-drawer {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	z-index: 1110;
	width: min(340px, 86vw);
	background: #fff;
	box-shadow: 4px 0 12px rgba(0, 0, 0, 0.25);
	transform: translateX(-105%);
	transition: transform 0.22s ease;
	visibility: hidden;
}
.fp-drawer.fp-open {
	transform: translateX(0);
	visibility: visible;
}
.fp-drawer-scroll {
	height: 100%;
	overflow-y: auto;
	padding: calc(16px + env(safe-area-inset-top, 0px)) 12px calc(24px + env(safe-area-inset-bottom, 0px));
	box-sizing: border-box;
}
.fp-drawer-profile {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	color: #17203a;
	text-decoration: none;
}
.fp-drawer-ava {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	display: block;
	flex: none;
	object-fit: cover;
}
.fp-drawer-ava-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1b3a8c;
	background: #eaf0ff;
}
.fp-drawer-ava-icon svg {
	width: 28px;
	height: 28px;
}
.fp-drawer-profile-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.fp-drawer-profile-name {
	font-size: 17px;
	font-weight: 800;
	color: #17203a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fp-drawer-profile-sub {
	font-size: 13px;
	color: #6b7280;
}
.fp-drawer-settings {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 0;
	font-size: 14px;
	font-weight: 600;
	color: #17203a;
	text-decoration: none;
	border-bottom: 1px solid #e3e7f0;
	margin-bottom: 12px;
}
.fp-drawer-settings svg {
	width: 19px;
	height: 19px;
	color: #6b7280;
}
.fp-drawer-tiles {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}
.fp-drawer-tile {
	width: calc(50% - 4px);
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e3e7f0;
	border-radius: 12px;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	color: #17203a;
	text-decoration: none;
}
.fp-drawer-tile-media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 44px;
	border-radius: 8px;
	background: #eaf0ff;
	color: #1b3a8c;
	overflow: hidden;
}
.fp-drawer-tile-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.fp-drawer-tile-media svg {
	width: 22px;
	height: 22px;
}
.fp-drawer-tile-label {
	font-size: 13.5px;
	font-weight: 700;
	color: #17203a;
	line-height: 1.25;
}
.fp-drawer-section {
	border-top: 1px solid #e3e7f0;
	padding-top: 8px;
	margin-top: 8px;
}
.fp-drawer-section-title {
	font-size: 15px;
	font-weight: 800;
	color: #17203a;
	margin: 0 0 4px;
}
.fp-drawer-flock {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	color: #17203a;
	text-decoration: none;
}
.fp-drawer-flock-img {
	width: 40px;
	height: 40px;
	border-radius: 8px;
	object-fit: cover;
	flex: none;
	background: #eaf0ff;
}
.fp-drawer-flock-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #1b3a8c;
	font-weight: 800;
	font-size: 16px;
}
.fp-drawer-flock-text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
}
.fp-drawer-flock-name {
	font-size: 15px;
	font-weight: 600;
	color: #17203a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.fp-drawer-flock-sub {
	font-size: 12.5px;
	color: #6b7280;
}
.fp-drawer-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 0;
	color: #17203a;
	text-decoration: none;
}
.fp-drawer-row-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex: none;
	border-radius: 50%;
	background: #eaf0ff;
	color: #1b3a8c;
}
.fp-drawer-row-icon svg {
	width: 20px;
	height: 20px;
}
.fp-drawer-row-label {
	flex: 1;
	font-size: 15px;
	font-weight: 600;
	color: #17203a;
}
.fp-drawer-badge {
	min-width: 21px;
	height: 21px;
	padding: 0 6px;
	border-radius: 999px;
	background: #b3261e;
	color: #fff;
	font-size: 11px;
	font-weight: 800;
	line-height: 21px;
	text-align: center;
	box-sizing: border-box;
}
.fp-drawer-count {
	font-size: 14px;
	font-weight: 700;
	color: #6b7280;
}
body.fp-drawer-open {
	overflow: hidden;
}

/* --- Bottom tab bar --- */
.fp-apptabs {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	display: flex;
	padding-top: 4px;
	padding-bottom: env(safe-area-inset-bottom, 0px);
	background: rgba(248, 250, 255, 0.78);
	-webkit-backdrop-filter: blur(8px) saturate(1.5);
	backdrop-filter: blur(8px) saturate(1.5);
}
.fp-tab {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2px 0 6px;
	color: #4b5563;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}
.fp-tab:hover,
.fp-tab:focus {
	color: #4b5563;
	text-decoration: none;
}
.fp-tab-pill {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 30px;
	border-radius: 999px;
	transition: background-color 0.15s ease;
}
.fp-tab-pill-wide {
	width: 58px;
}
.fp-tab-pill svg {
	width: 24px;
	height: 24px;
}
.fp-tab .fp-tab-ic-on {
	display: none;
}
.fp-tab.fp-tab-on .fp-tab-ic-on {
	display: inline-flex;
}
.fp-tab.fp-tab-on .fp-tab-ic-off {
	display: none;
}
.fp-tab.fp-tab-on .fp-tab-pill {
	background: #dce7ff;
}
.fp-tab.fp-tab-on {
	color: #1b3a8c;
}
.fp-tab-label {
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.25;
	color: #4b5563;
}
.fp-tab.fp-tab-on .fp-tab-label {
	color: #1b3a8c;
	font-weight: 800;
}
.fp-tab-ava {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}
.fp-tab-badge {
	position: absolute;
	top: -4px;
	right: -6px;
	min-width: 17px;
	height: 17px;
	padding: 0 4px;
	border-radius: 999px;
	background: #b3261e;
	border: 1.5px solid #fff;
	color: #fff;
	font-size: 9.5px;
	font-weight: 800;
	line-height: 14px;
	text-align: center;
	box-sizing: border-box;
}

/* Focus visibility. */
.fp-appbar a:focus-visible,
.fp-appbar button:focus-visible,
.fp-apptabs a:focus-visible,
.fp-drawer a:focus-visible {
	outline: 2px solid #1b3a8c;
	outline-offset: -2px;
}

/* --- Front page: newest-listings section + search --- */
.fp-latest {
	margin: 26px 0 8px;
}
.fp-latest-title {
	font-size: 22px;
	color: #1b3a8c;
	margin: 0 0 12px;
}
.fp-latest-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 12px;
}
@media (max-width: 560px) {
	.fp-latest-grid {
		grid-template-columns: 1fr 1fr;
	}
}
.fp-latest-more {
	margin: 14px 0 0;
}
.fp-latest-more a,
.fp-latest-empty a {
	color: #1b3a8c;
	font-weight: 700;
}
.fp-home-search {
	display: flex;
	gap: 8px;
	margin: 18px 0 4px;
}
.fp-home-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	padding: 11px 14px;
	font-size: 16px;
	border: 1px solid #e3e7f0;
	border-radius: 999px;
	background: #fff;
}
.fp-home-search button {
	flex: 0 0 auto;
	padding: 11px 18px;
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	background: #1b3a8c;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
}

/* The theme prints every page's title as a big
   black heading inside its own full-width band
   above the content. FP surfaces carry their own
   headings, so on FP surfaces the whole band goes
   (owner, Nov 9, 2026: the duplicate black
   "Messages" lettering). Single listings keep
   their title: theirs sits in a different group,
   deeper in the template. */
body.fp-chrome main > .wp-block-group.alignfull.has-tertiary-background-color:has(> .wp-block-post-title:only-child) {
	display: none;
}

/* Safety net for the stray page-title heading on
   the front page (the real fix is the page's
   template, which drops the title band). */
body.fp-chrome.home .wp-block-post-title {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.fp-drawer,
	.fp-drawer-backdrop,
	.fp-tab-pill,
	.fp-appbar-btn,
	.fp-appbar-circle,
	.fp-appbar-msg {
		transition: none;
	}
	.fp-chrome-menu {
		animation: none;
	}
}
