/* Fire Protection Services Canada: the few styles theme.json can't express. */

:root {
	--fpsc-radius-sm: 4px;
	--fpsc-radius-md: 8px;
	--fpsc-radius-lg: 12px;
}

/* Focus is always visible, on every background. */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 2px solid var(--wp--preset--color--focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #fff;
}
.has-navy-background-color :where(a, button, input, select, summary):focus-visible {
	outline-color: #fff;
	box-shadow: none;
}

.screen-reader-text:not(:focus) {
	position: absolute !important;
	width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Links inside navy bands stay white. */
.has-navy-background-color a:where(:not(.wp-element-button)) { color: #fff; }
.has-navy-background-color a:where(:not(.wp-element-button)):hover { color: var(--wp--preset--color--on-navy-muted); }

/* ---------- Buttons ---------- */
.wp-element-button, .wp-block-button__link { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.wp-block-button.is-style-secondary .wp-block-button__link {
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--ink);
}
.wp-block-button.is-style-secondary .wp-block-button__link:hover { background: var(--wp--preset--color--surface-alt); color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-on-navy .wp-block-button__link {
	background: transparent;
	color: #fff;
	box-shadow: inset 0 0 0 2px #fff;
}
.wp-block-button.is-style-on-navy .wp-block-button__link:hover { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- Cards ---------- */
.is-style-card { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); border-radius: var(--fpsc-radius-lg); }
.fpsc-card-link { text-decoration: none; color: inherit; display: block; height: 100%; }
.fpsc-card-link:hover .fpsc-card-title { color: var(--wp--preset--color--maple-red-deep); }

/* ---------- Header ---------- */
.fpsc-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.fpsc-lockup { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--wp--preset--color--ink); flex-shrink: 0; }
.fpsc-lockup img { height: 46px; width: auto; display: block; }
.fpsc-lockup span { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.25rem; line-height: 1.02; }
.fpsc-header-phone { font-weight: 700; text-decoration: none; white-space: nowrap; }
.fpsc-header .wp-block-navigation-item.current-menu-item > a,
.fpsc-header .wp-block-navigation-item a[aria-current="page"] { color: var(--wp--preset--color--maple-red-deep); }
@media (max-width: 781px) {
	.fpsc-hide-mobile { display: none !important; }
	.fpsc-lockup img { height: 40px; }
	.fpsc-lockup span { font-size: 1.05rem; }
}
@media (min-width: 782px) { .fpsc-hide-desktop { display: none !important; } }

/* Breadcrumb in navy bands */
.fpsc-crumb { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--on-navy-muted); }
.fpsc-crumb a { color: #fff; }

/* ---------- Hero (direction B) ---------- */
.fpsc-hero.wp-block-cover { padding: 0; align-items: stretch; }
.fpsc-hero .fpsc-hero-panel { background: var(--wp--preset--color--navy); color: #fff; max-width: 600px; }
@media (max-width: 781px) {
	.fpsc-hero.wp-block-cover { min-height: 0 !important; }
	.fpsc-hero .fpsc-hero-panel { max-width: none; }
}
.fpsc-eyebrow { font-size: var(--wp--preset--font-size--small); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }

/* ---------- Booking box ---------- */
.fpsc-booking-box { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); border-radius: var(--fpsc-radius-lg); box-shadow: var(--wp--preset--shadow--raised); padding: 1.25rem; display: grid; gap: .75rem; }
.fpsc-booking-box label { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.fpsc-input, .fpsc-booking-box input, .fpsc-whats-due select {
	min-height: 52px; width: 100%; box-sizing: border-box; border: 1px solid var(--wp--preset--color--line-strong);
	border-radius: var(--fpsc-radius-sm); padding: 0 .875rem; font: inherit; font-size: 1rem; color: var(--wp--preset--color--ink); background: #fff;
}
.fpsc-booking-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.fpsc-booking-actions button { flex: 1 1 150px; min-height: 48px; border-radius: var(--fpsc-radius-sm); font: inherit; font-weight: 600; cursor: pointer; }
.fpsc-btn-primary { background: var(--wp--preset--color--maple-red); color: #fff; border: 0; }
.fpsc-btn-primary:hover { background: var(--wp--preset--color--maple-red-deep); }
.fpsc-btn-secondary { background: #fff; color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--ink); }
.fpsc-btn-secondary:hover { background: var(--wp--preset--color--surface-alt); }

/* ---------- Reply-by and open-now ---------- */
.fpsc-reply-by { display: flex; flex-wrap: wrap; align-items: center; gap: .375rem .625rem; }
.fpsc-reply-by::before {
	content: ""; width: 18px; height: 18px; flex-shrink: 0;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.has-navy-background-color .fpsc-reply-by::before, .fpsc-hero-panel .fpsc-reply-by::before { background: var(--wp--preset--color--flame-yellow); }
.fpsc-open { display: inline-flex; align-items: center; gap: 8px; font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.fpsc-open::before { content: ""; width: 8px; height: 8px; border-radius: 4px; background: var(--wp--preset--color--line-strong); }
.fpsc-open.is-open::before { background: var(--wp--preset--color--success); }
.fpsc-open.is-unknown::before { display: none; }

/* ---------- Emergency strip and 24/7 tag ---------- */
.fpsc-tag-247 { display: inline-block; background: var(--wp--preset--color--flame-yellow); color: var(--wp--preset--color--navy); font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: .875rem; padding: 2px 8px; border-radius: var(--fpsc-radius-sm); }

/* ---------- Proof numbers ---------- */
.fpsc-stat { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: var(--wp--preset--font-size--stat); color: var(--wp--preset--color--maple-red); line-height: 1; margin: 0; }

/* ---------- Tracker strip ---------- */
.fpsc-tracking-number { font-family: var(--wp--preset--font-family--mono); font-weight: 500; font-size: 1.5rem; letter-spacing: .08em; }
.fpsc-stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .75rem; }
.fpsc-stages li { display: flex; flex-direction: column; gap: .5rem; font-size: var(--wp--preset--font-size--label); }
.fpsc-stages li::before { content: ""; height: 6px; border-radius: 3px; background: var(--wp--preset--color--line); }
.fpsc-stages li.is-done::before { background: var(--wp--preset--color--navy); }
.fpsc-stages li.is-now::before { background: var(--wp--preset--color--maple-red); }
.fpsc-stages li.is-now { font-weight: 700; }
.fpsc-stages li.is-next { color: var(--wp--preset--color--ink-muted); }
.fpsc-stages small { font-size: .8125rem; color: var(--wp--preset--color--ink-muted); font-weight: 400; }
@media (max-width: 600px) { .fpsc-stages { grid-template-columns: 1fr; } }

/* ---------- Service and post cards ---------- */
.fpsc-photo-space { aspect-ratio: 4 / 3; border-radius: var(--fpsc-radius-md); background: #DDE0E8; color: #3A4058; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1rem; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.fpsc-photo-space.is-wide { aspect-ratio: 16 / 9; }
.fpsc-card-title { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.5rem; line-height: 1.1; }
.wp-block-post-featured-image img { border-radius: var(--fpsc-radius-md); }

/* ---------- Member cards: logos centred at equal visual area ---------- */
.fpsc-member-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .75rem; }
.fpsc-member { background: #fff; color: var(--wp--preset--color--ink); border-radius: var(--fpsc-radius-lg); padding: 1.25rem 1.125rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .5rem; text-decoration: none; }
.fpsc-member:hover .fpsc-member-name { color: var(--wp--preset--color--maple-red-deep); }
.has-navy-background-color a.fpsc-member, .has-navy-background-color a.fpsc-member:hover { color: var(--wp--preset--color--ink); }
.fpsc-logo-box { height: 96px; width: 100%; display: flex; align-items: center; justify-content: center; }
.fpsc-logo-box img { display: block; object-fit: contain; }
.fpsc-logo-missing { width: 76px; height: 76px; box-sizing: border-box; border: 2px dashed var(--wp--preset--color--line-strong); border-radius: var(--fpsc-radius-md); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 600; color: var(--wp--preset--color--ink-muted); padding: 4px; }
.fpsc-member-name { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.25rem; line-height: 1.1; }
.fpsc-member-cities { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-muted); }

/* ---------- What's due builder ---------- */
.fpsc-whats-due { display: grid; gap: 1.5rem; }
.fpsc-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.fpsc-chip { min-height: 44px; padding: 0 1rem; border-radius: 22px; font: inherit; font-size: .9375rem; font-weight: 600; cursor: pointer; background: #fff; color: var(--wp--preset--color--ink); border: 2px solid var(--wp--preset--color--line-strong); }
.fpsc-chip[aria-pressed="true"] { background: var(--wp--preset--color--navy); color: #fff; border-color: var(--wp--preset--color--navy); }
.fpsc-chip[aria-pressed="true"]::before { content: "\2713\00a0"; }
.fpsc-cal-wrap { overflow-x: auto; }
.fpsc-cal { display: grid; grid-template-columns: 170px repeat(12, minmax(34px, 1fr)); gap: 4px; align-items: center; min-width: 640px; }
.fpsc-cal-head { font-size: .75rem; font-weight: 600; color: var(--wp--preset--color--ink-muted); text-align: center; }
.fpsc-cal-name { font-size: .875rem; font-weight: 600; padding-right: .5rem; }
.fpsc-cal-cell { height: 34px; border-radius: var(--fpsc-radius-sm); background: var(--wp--preset--color--surface-alt); display: flex; align-items: center; justify-content: center; font-size: .6875rem; font-weight: 700; }
.fpsc-cal-cell.is-due { background: var(--wp--preset--color--maple-red); color: #fff; }
.fpsc-whats-due h3 { margin: 0; }

/* ---------- Footer and phone sticky bar ---------- */
.fpsc-footer a { color: #fff; }
.fpsc-footer .fpsc-legal, .fpsc-footer .fpsc-legal a { color: var(--wp--preset--color--on-navy-subtle); }
.fpsc-footer-cols { border-top: 1px solid var(--wp--preset--color--navy-line); }
.fpsc-sticky-bar { display: none; }
@media (max-width: 781px) {
	.fpsc-sticky-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; gap: 8px; padding: 10px 16px; background: #fff; border-top: 1px solid var(--wp--preset--color--line); }
	.fpsc-sticky-bar a { flex: 1; min-height: 48px; display: flex; align-items: center; justify-content: center; border-radius: var(--fpsc-radius-sm); font-weight: 600; text-decoration: none; }
	.fpsc-sticky-bar .fpsc-call { border: 2px solid var(--wp--preset--color--ink); color: var(--wp--preset--color--ink); }
	.fpsc-sticky-bar .fpsc-request { flex: 2; background: var(--wp--preset--color--maple-red); color: #fff; }
	.fpsc-sticky-bar .fpsc-chat { position: relative; gap: 6px; background: #1f8a3e; border: 2px solid #1f8a3e; color: #fff; }
	.fpsc-sticky-bar .fpsc-chat::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H9l-5 4v-4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z'/%3E%3C/svg%3E") center / contain no-repeat; }
	.fpsc-sticky-bar .fpsc-chat.has-new::after { content: ""; position: absolute; top: 6px; right: 8px; width: 10px; height: 10px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px #1f8a3e; }
	.fpsc-sticky-bar a { white-space: nowrap; }
	body { padding-bottom: 72px; }
}

/* Live chat: desktop card above the chat pill */
.fpsc-chat-nudge { display: none; }
@media (min-width: 782px) {
	.fpsc-chat-nudge { display: flex; flex-direction: column; gap: 2px; position: fixed; right: 20px; bottom: 92px; z-index: 2147483000; max-width: 270px; padding: 12px 34px 12px 14px; background: #fff; color: var(--wp--preset--color--ink); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: .9375rem; line-height: 1.35; cursor: pointer; animation: fpsc-nudge-in .35s ease-out; }
	.fpsc-chat-nudge::after { content: ""; position: absolute; right: 34px; bottom: -7px; width: 14px; height: 14px; background: #fff; transform: rotate(45deg); box-shadow: 3px 3px 6px rgba(0,0,0,.06); }
	.fpsc-chat-nudge strong { display: flex; align-items: center; gap: 7px; }
	.fpsc-chat-nudge span:last-child { color: #555b6e; font-size: .875rem; }
	.fpsc-chat-nudge-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border: 0; background: none; font-size: 18px; line-height: 1; color: #6b7280; cursor: pointer; }
	.fpsc-live-dot { width: 9px; height: 9px; border-radius: 50%; background: #1f8a3e; box-shadow: 0 0 0 0 rgba(31,138,62,.5); animation: fpsc-live 1.8s infinite; flex: none; }
}
@keyframes fpsc-nudge-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fpsc-live { 0% { box-shadow: 0 0 0 0 rgba(31,138,62,.5); } 70% { box-shadow: 0 0 0 7px rgba(31,138,62,0); } 100% { box-shadow: 0 0 0 0 rgba(31,138,62,0); } }
@media (prefers-reduced-motion: reduce) { .fpsc-chat-nudge, .fpsc-live-dot { animation: none; } }

/* Details/summary (FAQs) */
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: .25rem 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; min-height: 48px; display: flex; align-items: center; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* Post titles in lists read as headings, not underlined links. */
.wp-block-post-title a { text-decoration: none; }
.wp-block-post-title a:hover { text-decoration: underline; }
.fpsc-whats-due > * { min-width: 0; }
.fpsc-cal-wrap { max-width: 100%; }
.fpsc-hero-panel a { color: #fff; }
.fpsc-hero-panel a:hover { color: var(--wp--preset--color--on-navy-muted); }
/* Full-width sections sit flush against each other. */
.wp-block-post-content > .alignfull, .wp-block-post-content > .alignfull + * { margin-block-start: 0; }

/* ---------- Layout helpers used in page content (class names survive WordPress's content filter) ---------- */
.fpsc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.fpsc-grid.is-roomy { gap: 2rem; }
.fpsc-grid.is-narrow { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; }
.fpsc-card-stack { padding: 1.375rem; display: grid; gap: .5rem; align-content: start; border-radius: var(--fpsc-radius-lg); background: #fff; color: var(--wp--preset--color--ink); }
.fpsc-card-stack.is-navy { background: var(--wp--preset--color--navy); color: #fff; }
.fpsc-card-stack.is-navy a { color: #fff; }
.fpsc-card-stack a.fpsc-card-title { text-decoration: none; }
.fpsc-logo-tile { background: #fff; border-radius: var(--fpsc-radius-lg); width: 200px; height: 104px; display: flex; align-items: center; justify-content: center; }
.fpsc-member.is-left { align-items: flex-start; text-align: left; }
.fpsc-city-row { display: flex; gap: 12px; align-items: center; }
.fpsc-city-logo { width: 72px; height: 52px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.fpsc-city-name { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 1.875rem; line-height: 1; }
.fpsc-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1.25rem; padding: 1.5rem 0; border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.fpsc-stat-row p { margin: .25rem 0 0; }
.fpsc-alert { background: var(--wp--preset--color--maple-red); color: #fff; border-radius: var(--fpsc-radius-md); padding: .875rem 1rem; font-weight: 600; margin: 0; }
.fpsc-muted { color: var(--wp--preset--color--ink-muted); }
.fpsc-on-navy-muted { color: var(--wp--preset--color--on-navy-muted); }

/* A page that ends on a full-width band meets the footer with no white strip (1.0.2). */
.wp-site-blocks > main:has(> .wp-block-post-content > .alignfull:last-child) + footer { margin-block-start: 0; }
/* Booking pages: grey area runs down to the footer, and the footer sits at the bottom of short pages. */
.page-template-page-booking .wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.page-template-page-booking .wp-site-blocks > main { flex: 1 0 auto; }
.page-template-page-booking .wp-site-blocks > footer { margin-block-start: 0; }
