/* Shared header, footer and Amy launcher. Scoped by ID so per-page mockup CSS can't leak in. */

:root {
	--bms-navy: #0a2f88;
	--bms-navy-dark: #062a75;
	--bms-blue: #1452cc;
	--bms-orange: #ff4a12;
	--bms-orange-dark: #e43c08;
	--bms-ink: #17306b;
	--bms-muted: #5d6f96;
	--bms-line: #d9e2f2;
	--bms-soft: #f4f7fd;
	--bms-max: 1180px;
}

body { margin: 0; }

.bms-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bms-skip { position: absolute; left: -999px; top: 8px; z-index: 1000; background: #fff; color: var(--bms-navy); padding: 8px 12px; border-radius: 4px; }
.bms-skip:focus { left: 8px; }

.bms-preview-note {
	background: #fff4d6; color: #6b4b00; border-bottom: 1px solid #f1d58a;
	font: 600 13px/1.4 Arial, Helvetica, sans-serif; text-align: center; padding: 7px 16px;
}

/* ---------- Header ---------- */
#bms-header { font-family: Arial, Helvetica, sans-serif; color: var(--bms-ink); background: #fff; border-bottom: 1px solid var(--bms-line); position: relative; z-index: 50; }
#bms-header a { color: inherit; text-decoration: none; }
#bms-header .bms-bar { max-width: var(--bms-max); margin: 0 auto; display: flex; align-items: center; gap: 20px; padding: 12px 20px; }

#bms-header .bms-logos, #bms-footer .bms-foot-brand a { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.bms-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.bms-logo img { display: block; width: auto; height: 36px; max-width: none; }
.bms-logo-blinds { padding-left: 16px; border-left: 1px solid var(--bms-line); }

#bms-header .bms-search { flex: 1 1 auto; display: flex; min-width: 160px; margin: 0; }
#bms-header .bms-search input { flex: 1; width: auto; min-width: 0; height: 40px; margin: 0; padding: 0 12px; border: 1px solid #c9d4ea; border-right: 0; border-radius: 5px 0 0 5px; font: 14px Arial, Helvetica, sans-serif; color: var(--bms-ink); background: #fff; }
#bms-header .bms-search button { width: 44px; height: 40px; margin: 0; padding: 0; display: grid; place-items: center; border: 1px solid #c9d4ea; border-radius: 0 5px 5px 0; background: #fff; color: var(--bms-navy); cursor: pointer; }
#bms-header .bms-search input:focus { outline: 2px solid var(--bms-blue); outline-offset: -1px; }

#bms-header .bms-actions { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
#bms-header .bms-icon-link { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--bms-navy); }
#bms-header .bms-cta, .bms-amy-launch {
	display: inline-flex; align-items: center; gap: 8px; background: var(--bms-orange); color: #fff;
	font: 800 14px/1 Arial, Helvetica, sans-serif; padding: 13px 18px; border-radius: 5px; white-space: nowrap; border: 0;
}
#bms-header .bms-cta:hover { background: var(--bms-orange-dark); }
#bms-header .bms-menu-toggle { display: none; width: 42px; height: 42px; margin: 0; padding: 0; border: 1px solid var(--bms-line); border-radius: 5px; background: #fff; color: var(--bms-navy); cursor: pointer; place-items: center; }

#bms-header .bms-nav-wrap { background: var(--bms-soft); border-top: 1px solid var(--bms-line); }
#bms-header .bms-nav { max-width: var(--bms-max); margin: 0 auto; padding: 0 12px; list-style: none; display: flex; justify-content: space-between; }
#bms-header .bms-nav > li { position: relative; margin: 0; }
#bms-header .bms-nav > li > a { display: flex; align-items: center; gap: 6px; padding: 12px 12px; font-size: 13.5px; font-weight: 700; color: var(--bms-navy); }
#bms-header .bms-nav > li > a:hover { color: var(--bms-orange); }
#bms-header .bms-caret { width: 6px; height: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
#bms-header .bms-sub {
	display: none; position: absolute; left: 0; top: 100%; min-width: 230px; margin: 0; padding: 8px 0; list-style: none;
	background: #fff; border: 1px solid var(--bms-line); border-radius: 6px; box-shadow: 0 10px 28px rgba(10, 47, 136, .14);
}
#bms-header .bms-has-sub:hover > .bms-sub, #bms-header .bms-has-sub:focus-within > .bms-sub { display: block; }
#bms-header .bms-nav > li:last-child .bms-sub { left: auto; right: 0; }
#bms-header .bms-sub a { display: block; padding: 9px 16px; font-size: 13.5px; color: var(--bms-ink); }
#bms-header .bms-sub a:hover { background: var(--bms-soft); color: var(--bms-orange); }

@media (max-width: 1100px) {
	#bms-header .bms-logo img { height: 30px; }
	#bms-header .bms-icon-link span { display: none; }
}
@media (max-width: 900px) {
	#bms-header .bms-bar { flex-wrap: wrap; gap: 12px; padding: 10px 16px; }
	#bms-header .bms-logos { flex: 1 1 auto; gap: 10px; }
	#bms-header .bms-logo-blinds { display: none; }
	#bms-header .bms-search { order: 3; flex-basis: 100%; }
	#bms-header .bms-cta { display: none; }
	#bms-header .bms-menu-toggle { display: grid; }
	#bms-header .bms-nav-wrap { border-top: 0; }
	#bms-header .bms-nav { display: none; flex-direction: column; padding: 4px 0 10px; }
	#bms-header .bms-nav.is-open { display: flex; }
	#bms-header .bms-nav > li > a { padding: 11px 16px; }
	#bms-header .bms-sub { display: block; position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0 0 6px 12px; background: transparent; }
	#bms-header .bms-caret { display: none; }
}

/* ---------- Footer ---------- */
#bms-footer { font-family: Arial, Helvetica, sans-serif; color: #314980; background: #fff; border-top: 1px solid var(--bms-line); }
#bms-footer a { color: inherit; text-decoration: none; }
#bms-footer a:hover { color: var(--bms-orange); }
#bms-footer .bms-foot { max-width: var(--bms-max); margin: 0 auto; padding: 30px 20px 26px; display: grid; grid-template-columns: 1.3fr repeat(6, 1fr); gap: 22px; }
#bms-footer .bms-foot-brand a { flex-direction: column; align-items: flex-start; gap: 12px; }
#bms-footer .bms-foot-brand .bms-logo-blinds { padding-left: 0; border-left: 0; }
#bms-footer .bms-foot-brand .bms-logo img { height: 32px; max-width: 100%; }
#bms-footer .bms-foot-head { margin: 0 0 10px; color: var(--bms-navy); font: 800 13.5px/1.2 Arial, Helvetica, sans-serif; }
#bms-footer ul { list-style: none; margin: 0; padding: 0; }
#bms-footer li { margin: 0 0 7px; font-size: 12.5px; line-height: 1.35; }
#bms-footer .bms-legal { background: var(--bms-navy-dark); color: #fff; }
#bms-footer .bms-legal-inner { max-width: var(--bms-max); margin: 0 auto; padding: 14px 20px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 12px; }
#bms-footer .bms-legal a:hover { color: #ffd2c2; }

@media (min-width: 901px) and (max-width: 1140px) {
	#bms-footer .bms-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 26px; }
	#bms-footer .bms-foot-brand { grid-column: 1 / -1; }
	#bms-footer .bms-foot-brand a { flex-direction: row; gap: 24px; }
}
@media (max-width: 900px) {
	#bms-footer .bms-foot { grid-template-columns: 1fr 1fr; padding: 24px 16px; }
	#bms-footer .bms-foot-brand { grid-column: 1 / -1; }
	#bms-footer .bms-legal-inner { padding: 14px 16px; }
}

/* ---------- Fallback content (search, admin-created pages) ---------- */
.bms-content { max-width: 860px; margin: 0 auto; padding: 32px 20px 48px; font: 16px/1.6 Arial, Helvetica, sans-serif; color: var(--bms-ink); }
.bms-content h1, .bms-content h2 { font-family: Georgia, serif; color: var(--bms-navy); }
.bms-content a { color: var(--bms-blue); }

/* ---------- Amy launcher ---------- */
.bms-amy { position: fixed; right: 18px; bottom: 18px; z-index: 900; font-family: Arial, Helvetica, sans-serif; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.bms-amy-launch { cursor: pointer; box-shadow: 0 8px 22px rgba(255, 74, 18, .35); border-radius: 30px; padding: 13px 20px; }
.bms-amy-launch:hover { background: var(--bms-orange-dark); }
.bms-amy-dot { width: 9px; height: 9px; border-radius: 50%; background: #3bd16f; box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.bms-amy-panel { position: relative; width: 300px; max-width: calc(100vw - 36px); background: #fff; color: var(--bms-ink); border: 1px solid var(--bms-line); border-radius: 10px; padding: 18px 18px 14px; box-shadow: 0 14px 36px rgba(10, 47, 136, .2); font-size: 14px; line-height: 1.45; }
.bms-amy-panel p { margin: 0 0 8px; }
.bms-amy-title { font: 700 19px/1.2 Georgia, serif; color: var(--bms-navy); }
.bms-amy-soon { background: var(--bms-soft); border-radius: 6px; padding: 8px 10px; font-size: 13px; color: var(--bms-muted); }
.bms-amy-close { position: absolute; top: 6px; right: 8px; width: 30px; height: 30px; margin: 0; padding: 0; border: 0; background: none; font-size: 22px; line-height: 1; color: var(--bms-muted); cursor: pointer; }

/* The mockup layouts aren't fully responsive yet; stop them pushing the page sideways on small screens. */
#bms-main { overflow-x: clip; }

/* Same header/footer width on every page: mockup pages set border-box on everything, which made
   these bars 40px narrower there and shifted the logo 20px. */
#bms-header .bms-bar, #bms-header .bms-nav, #bms-footer .bms-foot, #bms-footer .bms-legal-inner { box-sizing: content-box; }


/* Home page welcome from Amy: about half the screen on desktop, a bottom sheet on phones. */
.bms-welcome { position: fixed; inset: 0; z-index: 1000; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: 20px; font-family: Arial, Helvetica, sans-serif; }
.bms-welcome, .bms-welcome * { box-sizing: border-box; }
.bms-welcome[hidden] { display: none; }
.bms-welcome-backdrop { position: absolute; inset: 0; background: rgba(6, 29, 82, .55); }
.bms-welcome-box { position: relative; width: min(50vw, 760px); min-width: 520px; min-height: 50vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; background: #fff; color: var(--bms-ink); border-radius: 16px; padding: 44px 48px 40px; box-shadow: 0 24px 60px rgba(6, 29, 82, .35); animation: bms-welcome-in .28s ease-out; }
.bms-welcome-x { position: absolute; top: 10px; right: 12px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--bms-muted); cursor: pointer; border-radius: 50%; }
.bms-welcome-x:hover { background: var(--bms-soft); color: var(--bms-navy); }
.bms-welcome-face { width: 96px; height: 96px; border-radius: 50%; background: var(--bms-soft); }
.bms-welcome-eyebrow { margin: 4px 0 0; font: 700 12.5px/1.2 Arial, Helvetica, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--bms-orange); }
.bms-welcome-title { margin: 0; font: 700 clamp(26px, 2.6vw, 34px)/1.2 Georgia, serif; color: var(--bms-navy); text-wrap: balance; }
.bms-welcome-text { margin: 0; max-width: 46ch; font-size: 16px; line-height: 1.55; color: var(--bms-muted); }
.bms-welcome-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }
.bms-welcome-btn { min-height: 48px; padding: 12px 22px; border-radius: 8px; border: 2px solid var(--bms-navy); background: #fff; color: var(--bms-navy); font: 700 15px/1.2 Arial, Helvetica, sans-serif; cursor: pointer; }
.bms-welcome-btn.is-primary { background: var(--bms-orange); border-color: var(--bms-orange); color: #fff; }
.bms-welcome-btn.is-quiet { border-color: var(--bms-line); color: var(--bms-ink); }
.bms-welcome-btn:hover { filter: brightness(.95); }
.bms-welcome-btn:focus-visible, .bms-welcome-x:focus-visible { outline: 3px solid var(--bms-blue); outline-offset: 2px; }
html.bms-welcome-open { overflow: hidden; }
@keyframes bms-welcome-in { from { transform: translateY(16px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .bms-welcome-box { animation: none; } }
@media (max-width: 900px) {
	.bms-welcome { place-items: end stretch; padding: 0; }
	.bms-welcome-box { width: 100%; min-width: 0; min-height: 50vh; border-radius: 18px 18px 0 0; padding: 36px 20px calc(28px + env(safe-area-inset-bottom, 0px)); }
	.bms-welcome-actions { width: 100%; flex-direction: column; }
	.bms-welcome-btn { width: 100%; }
}

/* Small phones: keep the wider BuildMyShutters logo and the header icons on one line. */
@media (max-width: 380px) {
	#bms-header .bms-logo img { height: 24px; }
}

/* Customizer switches: phone number hidden (email-only support), free samples off. */
.bms-hide-phone .bms-phone, .bms-no-samples .bms-samples { display: none !important; }
