/* Shield Tools App. Colors are the Shield Field Guides tokens. */

/* ---------- Installed app ---------- */
html.sfgt-standalone body.sfgt-scope #masthead,
html.sfgt-standalone body.sfgt-scope .site-header,
html.sfgt-standalone body.sfgt-scope #colophon,
html.sfgt-standalone body.sfgt-scope .site-footer { display: none !important; }
/* Tool pages: just the tool, without the "how it works" and FAQ sections. */
html.sfgt-standalone body.sfgt-tool .entry-content > .sfg-section { display: none !important; }
html.sfgt-standalone body.sfgt-scope { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
html.sfgt-standalone body.sfgt-scope .fv-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

.sfgt-tabs {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 99990;
	display: flex; justify-content: space-around;
	background: #1d2a33; border-top: 1px solid rgba(255, 255, 255, 0.08);
	padding: 4px 4px env(safe-area-inset-bottom);
}
.sfgt-tabs a {
	flex: 1 1 0; min-width: 0; min-height: 56px;
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	color: #b9c3ca !important; text-decoration: none !important;
	font: 600 13px/1.1 "Barlow Condensed", "Arial Narrow", Arial, sans-serif; letter-spacing: .6px; text-transform: uppercase;
	border-top: 3px solid transparent; border-radius: 0;
}
.sfgt-tabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sfgt-tabs a.is-on { color: #fff !important; border-top-color: #e01b24; font-weight: 700; }
.sfgt-tabs a:focus-visible { outline: 2px solid #f4f2ed; outline-offset: -4px; }

/* ---------- Tools page: "Get the app" section ([field_tools_app]) ---------- */
html.sfgt-standalone .sfgt-get { display: none !important; }
.sfgt-get-in { margin-top: 1.5rem; }
.sfgt-get-cta { margin: 0 0 1.5rem; }
.sfgt-get-cta[hidden] { display: none; }
.sfgt-get-cta .wp-block-button__link { cursor: pointer; border: 0; }
.sfgt-get-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.sfgt-get-card { border-top: 3px solid rgba(255, 255, 255, 0.4); padding-top: 1rem; }
.sfgt-get-card.is-you { border-top-color: var(--sfg-red, #9f1d22); }
.sfgt-get-card h3 { margin: 0 0 0.5rem; font-size: 1.35rem; }
.sfgt-get-card ol { margin: 0; padding-left: 1.25rem; }
.sfgt-get-card li { margin: 0 0 0.35rem; }
.sfgt-get-card svg { vertical-align: -2px; }
.sfgt-get-note { margin: 1.5rem 0 0; font-size: 0.95rem; opacity: 0.85; }
.sfg-white .sfgt-get-card, .sfg-paper2 .sfgt-get-card { border-top-color: var(--sfg-navy, #1d2a33); }

/* App bar (every tool page except the signed-in Food Vault, which has its own) */
.sfgt-appbar {
	position: sticky; top: 0; z-index: 99989;
	display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 16px 0 8px;
	background: #1d2a33; color: #fff; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sfgt-appbar-home { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 4px; }
.sfgt-appbar-home img { width: 32px; height: 32px; border-radius: 7px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .18); }
.sfgt-appbar-home:focus-visible { outline: 2px solid #f4f2ed; outline-offset: -2px; }
.sfgt-appbar-title { font: 700 20px/1.1 "Barlow Condensed", "Arial Narrow", Arial, sans-serif; letter-spacing: .6px; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Tools inside the app: the app bar names the tool, so the page intros go ---------- */
html.sfgt-standalone .sfp-intro .sfp-eyebrow,
html.sfgt-standalone .sfp-intro .sfp-h1,
html.sfgt-standalone .sfp-intro > p:not(.sfp-private),
html.sfgt-standalone .scp-intro .scp-eyebrow,
html.sfgt-standalone .scp-intro .scp-h1,
html.sfgt-standalone .scp-intro > p:not(.scp-private),
html.sfgt-standalone .sotp-intro .sotp-eyebrow,
html.sfgt-standalone .sotp-intro .sotp-h1,
html.sfgt-standalone .sotp-intro .sotp-lead,
html.sfgt-standalone .sbb-intro { display: none !important; }
html.sfgt-standalone .sfp-intro,
html.sfgt-standalone .scp-intro,
html.sfgt-standalone .sotp-intro { margin: 0 0 14px !important; }
html.sfgt-standalone .sfp-private,
html.sfgt-standalone .scp-private,
html.sfgt-standalone .sotp-private { display: flex !important; align-items: center; gap: 6px; padding: 7px 10px !important; font-size: 13px !important; font-weight: 600 !important; }
html.sfgt-standalone body.sfgt-scope .sfp,
html.sfgt-standalone body.sfgt-scope .scp,
html.sfgt-standalone body.sfgt-scope .sotp,
html.sfgt-standalone body.sfgt-scope #sbb-app.sbb { padding-top: 16px !important; }
html.sfgt-standalone body.sfgt-scope .fv-guest { margin-top: 16px; }
/* Signed-in Food Vault: its header is the app bar, full width and pinned. */
html.sfgt-standalone .fv.fv-app,
html.sfgt-standalone .fv.fv-app.alignwide { max-width: none !important; margin: 0 !important; padding: 0 !important; }
html.sfgt-standalone .fv .fv-shell { border-radius: 0; overflow: visible; }
html.sfgt-standalone .fv .fv-top { position: sticky; top: 0; z-index: 60; }

/* ---------- App home: tool launcher (replaces the Tools page's marketing content in the app) ---------- */
html.sfgt-standalone body.sfgt-home .entry-content { display: none !important; }
.sfgt-home-launch { max-width: 640px; margin: 0 auto; padding: 16px 16px 24px; }
ul.sfgt-launch { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
ul.sfgt-launch li { margin: 0; padding: 0; }
.sfgt-launch a {
	display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px 40px 12px 12px; position: relative;
	background: #fff; border: 1px solid #d8d4ca; border-radius: 4px; color: #1d2a33 !important; text-decoration: none !important;
}
.sfgt-launch a::after { content: ""; position: absolute; right: 18px; top: 50%; width: 9px; height: 9px; margin-top: -5px; border-right: 2.5px solid #9f1d22; border-top: 2.5px solid #9f1d22; transform: rotate(45deg); }
.sfgt-launch a:active { background: #f4f2ed; }
.sfgt-launch a:focus-visible { outline: 3px solid #e01b24; outline-offset: 2px; }
.sfgt-launch-ic { flex: none; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; background: #1d2a33; color: #fff; }
.sfgt-launch-ic svg { width: 26px; height: 26px; }
.sfgt-launch-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sfgt-launch-txt strong { font: 700 20px/1.15 "Barlow Condensed", "Arial Narrow", Arial, sans-serif; letter-spacing: .5px; text-transform: uppercase; }
.sfgt-launch-txt span { font-size: 15px; line-height: 1.4; color: #3c4a54; }
.sfgt-launch-status { display: flex; align-items: center; gap: 8px; margin: 16px 2px 0; font-size: 14px; color: #3c4a54; }
.sfgt-launch-status:empty { display: none; }
.sfgt-launch-status span { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #b7791f; }
.sfgt-launch-status span.is-ok { background: #2f7d4f; }

@media print {
	.sfgt-tabs, .sfgt-install, .sfgt-appbar { display: none !important; }
	html.sfgt-standalone body.sfgt-scope { padding-bottom: 0; }
}

/* ---------- Install bar (phones, in the browser) ---------- */
.sfgt-install {
	position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 99990;
	display: flex; align-items: center; gap: 12px;
	max-width: 560px; margin: 0 auto; padding: 12px 8px 12px 12px;
	background: #1d2a33; color: #f4f2ed; border-radius: 12px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
	font: 14px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	animation: sfgt-up 0.25s ease-out;
}
.sfgt-install img { width: 44px; height: 44px; border-radius: 10px; flex: none; }
.sfgt-install-txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sfgt-install-txt strong { font-size: 15px; color: #fff; }
.sfgt-install-txt span { color: #c9d1d7; }
.sfgt-install-txt svg { vertical-align: -2px; }
.sfgt-install-txt b { color: #fff; }
.sfgt-install-go {
	flex: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 8px;
	background: #9f1d22; color: #fff; font: inherit; font-weight: 700; cursor: pointer;
}
.sfgt-install-x {
	flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
	border: 0; background: transparent; color: #c9d1d7; cursor: pointer; border-radius: 8px;
}
.sfgt-install-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
@keyframes sfgt-up { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .sfgt-install { animation: none; } }
