/* ACS theme — CSS that theme.json can't express. Keep small; prefer theme.json. */

/* --- Header navigation ----------------------------------------------------
   Sharper nav: smaller/tighter top level, white dropdown cards with brand
   accent, submenus open to the RIGHT (core anchors them right:0 when the
   menu is right-justified, which makes them pop out leftward). */
header .wp-block-navigation {
	font-size: 0.9375rem;
}
header .wp-block-navigation .wp-block-navigation-item__content {
	font-weight: 600;
	letter-spacing: 0.01em;
}
header .wp-block-navigation .wp-block-navigation__container {
	gap: 1.25rem;
}

/* First-level dropdowns: white card, brand top accent, open below-right */
header .wp-block-navigation .wp-block-navigation__submenu-container {
	left: 0 !important;
	right: auto !important;
	top: calc(100% + 8px);
	min-width: 260px;
	background: #fff !important;
	border: 0;
	border-top: 3px solid var(--wp--preset--color--primary);
	border-radius: 0 0 8px 8px;
	box-shadow: 0 14px 32px rgba(7, 28, 58, 0.18);
	padding: 0.4rem 0;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
header .wp-block-navigation .has-child:hover > .wp-block-navigation__submenu-container,
header .wp-block-navigation .has-child:focus-within > .wp-block-navigation__submenu-container {
	opacity: 1;
	transform: translateY(0);
}

/* Keep the right-most dropdown on screen */
header .wp-block-navigation .wp-block-navigation__container > .has-child:last-child > .wp-block-navigation__submenu-container {
	left: auto !important;
	right: 0 !important;
}

/* Nested flyouts open to the RIGHT of their parent */
header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container {
	left: 100% !important;
	right: auto !important;
	top: -0.4rem;
	border-radius: 8px;
	border-top: 3px solid var(--wp--preset--color--primary);
}

/* Dropdown items: navy text on white, brand hover tint */
header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: var(--wp--preset--color--navy-dark) !important;
	font-size: 0.9rem;
	font-weight: 500;
	padding: 0.5rem 1.25rem;
	display: block;
	width: 100%;
}
header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content,
header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content:focus {
	background: var(--wp--preset--color--base-alt);
	color: var(--wp--preset--color--primary-dark) !important;
}
header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon {
	color: var(--wp--preset--color--navy-dark);
	margin-right: 0.75rem;
}

/* Mobile overlay: the responsive menu is a full navy panel, and core renders
   submenus INLINE (not as the white desktop dropdown cards). The desktop
   dropdown rules above would leave submenu links navy-on-navy (invisible), so
   inside the open overlay drop the card styling and force everything white. */
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	opacity: 1 !important;
	transform: none !important;
	position: static !important;
	min-width: 0 !important;
	padding: 0 0 0 1rem;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item__content,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-icon {
	color: var(--wp--preset--color--base) !important;
}
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus,
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container .wp-block-navigation-item:hover > .wp-block-navigation-item__content {
	background: transparent !important;
	color: var(--wp--preset--color--base) !important;
	opacity: 0.75;
}

/* --- WooCommerce product grids (shop, categories, related) ---------------
   Classic Woo loop uses floats; titles of different lengths leave SKUs and
   "Add to Quote" links ragged. Grid + flex columns align every card. */
ul.products {
	display: grid !important;
	grid-template-columns: repeat(4, 1fr);
	gap: 2.5rem 2rem;
}
ul.products::before,
ul.products::after {
	display: none !important;
}
ul.products li.product {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
	display: flex;
	flex-direction: column;
}
ul.products li.product .woocommerce-LoopProduct-link {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}
ul.products li.product img {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
}
ul.products li.product .afrfqbt {
	margin-top: auto;
	align-self: flex-start;
	padding-top: 0.75rem;
}
@media (max-width: 1024px) {
	ul.products { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 782px) {
	ul.products { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
	ul.products { grid-template-columns: 1fr; }
}

/* --- Legacy us_grid replacement: post card grids (Resources pages) -------- */
.acs-post-grid {
	display: grid;
	grid-template-columns: repeat(var(--acs-grid-cols, 3), 1fr);
	gap: 2rem;
	/* Break out of the content column to wide width, centered on the page.
	   Works whether the parent is the 840px column or a full-width group:
	   any centered parent's 50% mark is the page center, so offset by half
	   the grid width from there. !important beats constrained margin:auto. */
	width: min(1240px, 92vw);
	max-width: none !important;
	margin-top: 2rem !important;
	margin-bottom: 2rem !important;
	margin-left: calc(50% - min(620px, 46vw)) !important;
	margin-right: 0 !important;
}
.acs-post-card a {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.acs-post-card a:hover {
	box-shadow: 0 10px 24px rgba(7, 28, 58, 0.2);
	transform: translateY(-2px);
}
.acs-post-card-cat {
	display: block;
	background: #1e1e1e;
	color: #fff;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 1rem 1.5rem;
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-color: rgba(255, 255, 255, 0.4);
}
.acs-post-card h3 {
	color: var(--wp--preset--color--body);
	font-size: 1.3rem;
	font-weight: 400;
	line-height: 1.4;
	text-align: center;
	margin: 0;
	padding: 2.25rem 1.75rem 2.5rem;
}
.acs-post-card-more {
	margin-top: auto;
	display: block;
	background: #697077;
	color: #fff;
	font-weight: 700;
	font-size: 0.95rem;
	text-align: center;
	padding: 0.8rem 1rem;
}
.acs-post-card a:hover .acs-post-card-more {
	background: var(--wp--preset--color--primary);
}
@media (max-width: 1024px) {
	.acs-post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.acs-post-grid { grid-template-columns: 1fr; }
}

/* --- Contact page: gradient info cards + worldwide rep finder ------------- */
.acs-grad-card {
	background: linear-gradient(135deg, #0d2952 0%, #2a5cb8 100%);
	color: #fff;
	padding: 2rem;
	/* height:100% resolves against the column's CONTENT box, so with the default
	   content-box sizing the card renders its own 4rem of padding TALLER than the
	   column — the overflow ran the Call/Email cards down into the "General
	   Inquiries" heading and hung the rep-finder below its last selector. */
	box-sizing: border-box;
	height: 100%;
}
/* No trailing margin under the last line, so the card closes one padding-step
   after its content rather than a blank row later. */
.acs-grad-card > :last-child {
	margin-bottom: 0;
}
.acs-grad-card h2 {
	color: #fff;
	display: flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.9rem;
	margin: 0 0 1rem;
}
.acs-grad-card a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.acs-grad-card a:hover {
	color: #bcd9f5;
}
.acs-repfinder h3 {
	color: #fff;
	font-size: 1.05rem;
	margin: 1.4rem 0 0.4rem;
}
.acs-repfinder select {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 0;
	border-radius: 4px;
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--wp--preset--color--body);
	background: #fff;
}
.acs-repfinder .box {
	background: rgba(255, 255, 255, 0.1);
	border-radius: 6px;
	padding: 1rem 1.25rem;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	line-height: 1.55;
}

/* --- FAQ accordion (core details block) ---------------------------------- */
.wp-block-details {
	border-bottom: 1px solid #e3e6ea;
	padding: 1.15rem 0;
}
.wp-block-details:first-of-type {
	border-top: 1px solid #e3e6ea;
}
.wp-block-details summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--wp--preset--color--navy);
}
.wp-block-details summary::-webkit-details-marker {
	display: none;
}
/* Chevron that rotates on open — the only affordance the block ships without. */
.wp-block-details summary::after {
	content: "";
	flex: 0 0 auto;
	width: 0.6rem;
	height: 0.6rem;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg);
	transition: transform 0.2s ease;
}
.wp-block-details[open] summary::after {
	transform: rotate(-135deg);
}
.wp-block-details summary:hover {
	color: var(--wp--preset--color--primary);
}
.wp-block-details > :not(summary) {
	margin-top: 0.9rem;
}
.wp-block-details > :last-child {
	margin-bottom: 0;
}

/* --- Product configurator (solution pages: accordion of Woo category grids)
   Sections are heavier than an FAQ answer - each holds a full product grid -
   so they get a card treatment and a bigger hit target than the plain
   details styling above. */
.acs-configurator .wp-block-details {
	border: 1px solid #e3e6ea;
	border-radius: 8px;
	padding: 0;
	margin-bottom: 0.75rem;
	background: #fff;
}
.acs-configurator .wp-block-details:first-of-type {
	border-top: 1px solid #e3e6ea;
}
.acs-configurator .wp-block-details summary {
	padding: 1rem 1.25rem;
	font-size: 1.35rem;
	font-weight: 500;
}
.acs-configurator .wp-block-details[open] summary {
	border-bottom: 1px solid #e3e6ea;
	background: var(--wp--preset--color--base-alt);
	border-radius: 8px 8px 0 0;
}
.acs-configurator .wp-block-details > :not(summary) {
	margin-left: 1.25rem;
	margin-right: 1.25rem;
}
.acs-configurator .wp-block-details > :last-child {
	margin-bottom: 1.25rem;
}
/* Sub-headings that group several category grids inside one section */
.acs-configurator .wp-block-details h4 {
	margin-top: 1.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 2px solid var(--wp--preset--color--base-alt);
}

/* "Need help choosing?" card next to the product shot */
.acs-help-card {
	gap: 0.9rem;
}
.acs-help-card figure {
	margin: 0;
	flex: 0 0 auto;
}
.acs-help-card p {
	margin: 0;
}

/* --- Survey cards (Online Advisory Community) ---------------------------- */
.acs-survey-card {
	height: 100%;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	box-shadow: 0 2px 10px rgba(13, 41, 82, 0.08);
}
/* Push the button to the bottom so cards of unequal copy still line up. */
.acs-survey-card .wp-block-buttons {
	margin-top: auto;
	padding-top: 1rem;
}
.acs-survey-card > :last-child {
	margin-bottom: 0;
}

/* --- Live search results (relevanssi-live-ajax-search template) ---------- */
.relevanssi-live-search-results {
	min-height: 50px !important;
	max-height: 75vh !important;
	height: auto !important;
	z-index: 99999;
}
.relevanssi-live-search-results .relevanssi-live-search-result-status {
	font-weight: 700;
	text-align: center;
	width: 100%;
}
.relevanssi-live-search-results .relevanssi-live-search-result {
	display: flex;
	width: 100%;
	padding: 5px 0;
}
.relevanssi-live-search-results .relevanssi-live-search-result a {
	display: flex;
	flex-wrap: wrap;
	flex-direction: row;
	width: 100%;
	background-color: rgba(13, 41, 82, 0.05);
	margin: 6px 0;
	padding: 8px !important;
	border-radius: 6px;
}
.relevanssi-live-search-results .search-thumb {
	width: 25%;
	flex-grow: 0.5;
}
.relevanssi-live-search-results .bubbler {
	display: flex;
	flex-direction: row;
	width: 100%;
	justify-content: flex-end;
	align-items: flex-end;
	padding: 5px 0;
	border-top: 1px solid rgba(13, 41, 82, 0.25);
}
.relevanssi-live-search-results .bubbler-bubble {
	text-transform: capitalize;
	font-weight: 700;
	color: #fff;
	background: var(--wp--preset--color--primary);
	padding: 5px;
	font-size: 13px;
	line-height: 11px;
	border-radius: 5px;
	margin-left: 10px;
}

/* Outline button variant on dark/alt backgrounds */
.wp-block-button.is-style-outline .wp-block-button__link {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	border-color: var(--wp--preset--color--primary-dark);
	color: var(--wp--preset--color--primary-dark);
	background: transparent;
}

/* --- Calculators + form cards (Electricity / Room Layout / Leasing / Trial)
   Markup lives in wp:html blocks; ids are load-bearing for the inline JS. */
.acs-calc {
	background: #f6f6f6;
	border-radius: 10px;
	padding: 2rem;
	margin: 1.5rem 0;
}
.acs-calc h3 {
	font-size: 1.3rem;
	margin: 1.5rem 0 0.75rem;
}
.acs-calc h3:first-child {
	margin-top: 0;
}
.acs-calc .row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
	align-items: center;
}
.acs-calc .column {
	flex: 1 1 200px;
	min-width: 0;
}
.acs-form-group {
	margin-bottom: 1.1rem;
}
.acs-calc-label {
	display: block;
	font-weight: 600;
	font-size: 0.95rem;
	margin-bottom: 0.35rem;
}
.acs-calc input[type="text"],
.acs-calc select {
	width: 100%;
	max-width: 360px;
	padding: 0.55rem 0.75rem;
	border: 1px solid #ccc;
	border-radius: 6px;
	font: inherit;
	background: #fff;
}
.acs-calc input[readonly] {
	background: #eef4f8;
	border-color: #d7e4ee;
}
.acs-calc input[type="radio"] {
	width: auto;
	margin-right: 0.35rem;
}
.acs-calc .acs-whole-suffix,
.acs-calc .acs-fraction-suffix {
	font-size: 0.9rem;
	color: var(--wp--preset--color--faded);
	margin-left: 0.4rem;
}
.acs-calc button {
	font: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--wp--preset--color--primary);
	border: 0;
	border-radius: 999px;
	padding: 0.55rem 1.6rem;
	margin-top: 0.6rem;
	cursor: pointer;
}
.acs-calc button:hover {
	background: var(--wp--preset--color--primary-dark);
}
.acs-payment-details .row + .row {
	margin-top: 0.5rem;
}

/* --- acs_post_grid pagination (Blog / Resources) -------------------------- */
.acs-post-grid-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
	margin-top: 2rem;
}
.acs-post-grid-pagination .page-numbers {
	display: inline-block;
	padding: 0.45rem 0.9rem;
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 999px;
	font-size: 0.95rem;
	text-decoration: none;
	color: var(--wp--preset--color--body);
}
.acs-post-grid-pagination a.page-numbers:hover {
	border-color: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}
.acs-post-grid-pagination .page-numbers.current {
	background: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
	color: #fff;
}
.acs-post-grid-empty {
	text-align: center;
	color: var(--wp--preset--color--faded);
	padding: 2rem 0;
}

/* --- Mobile side gutters --------------------------------------------------
   No root padding is set, so constrained page content and the Woo content area
   run right to the screen edge on narrow viewports. Add a small gutter on
   mobile only (<= contentSize). Full-bleed sections (.alignfull hero/bands/
   configurator) are skipped - they carry their own edge-to-edge padding. */
@media (max-width: 840px) {
	.wp-block-post-content > :not(.alignfull),
	.content-area {
		padding-left: 4vw;
		padding-right: 4vw;
	}
}

/* --- Header quote-basket icon + count badge ------------------------------- */
.acs-quote-basket {
	position: relative;
	display: inline-flex;
	align-items: center;
	color: var(--wp--preset--color--base);
	margin-left: 1.25rem;
	padding: 0.25rem;
}
.acs-quote-basket:hover {
	color: var(--wp--preset--color--primary);
}
.acs-quote-count {
	position: absolute;
	top: -0.35rem;
	right: -0.55rem;
	min-width: 1.15rem;
	height: 1.15rem;
	padding: 0 0.25rem;
	border-radius: 999px;
	background: var(--wp--preset--color--primary);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	line-height: 1.15rem;
	text-align: center;
	transition: transform 0.15s ease;
}
.acs-quote-count[hidden] {
	display: none;
}

/* --- "Added to your quote" toast ------------------------------------------ */
#acs-quote-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translate(-50%, 1rem);
	opacity: 0;
	transition: opacity 0.3s ease, transform 0.3s ease;
	background: var(--wp--preset--color--navy-dark);
	color: #fff;
	padding: 0.85rem 1.5rem;
	border-radius: 999px;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
	font-size: 0.95rem;
	z-index: 99999;
	white-space: nowrap;
}
#acs-quote-toast.show {
	opacity: 1;
	transform: translate(-50%, 0);
}
#acs-quote-toast a {
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	margin-left: 0.35rem;
}
