/* =========================================================
 * Footer (wrapper) + child blocks
 * =========================================================
 * Layout: flex row, gap, columns wrap on smaller screens. The credit child
 * has flex-basis: 100% which forces a full-width new row regardless of where
 * it sits among siblings — so users can place it anywhere in the order.
 */

.affinite-footer {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 2rem 2.5rem;
	padding: 3rem 1.5rem 1.5rem;
}

.affinite-footer > .wp-block-affinite-footer-description,
.affinite-footer > .wp-block-affinite-footer-menu,
.affinite-footer > .wp-block-affinite-footer-contact {
	flex: 1 1 12rem;
	min-width: 0;
}

/* Description column tends to need more room for logo + paragraph. */
.affinite-footer > .wp-block-affinite-footer-description {
	flex-basis: 18rem;
}

/* --- Footer: shared column styling --- */

.affinite-footer-menu__heading,
.affinite-footer-contact__heading {
	margin: 0 0 1rem;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.3;
	color:#ffffff;
}

/* --- Footer Description --- */

.affinite-footer-description {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.affinite-footer-description__logo-wrapper {
	display: block;
}

.affinite-footer-description__logo {
	display: block;
	max-width: 180px!important;
	height: auto!important;
}

.affinite-footer-description__text {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 2;
	opacity: 0.85;
}

.affinite-footer-description__socials {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
}

.affinite-footer-description__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background-color: rgba( 0, 0, 0, 0.04 );
	transition: background-color 150ms ease;
}

.affinite-footer-description__social-link:hover,
.affinite-footer-description__social-link:focus {
	background-color: rgba( 0, 0, 0, 0.1 );
}

.affinite-footer-description__social-icon-img {
	width: 1.125rem;
	height: 1.125rem;
	display: block;
	object-fit: contain;
}

/* --- Footer Menu --- */
.affinite-footer-menu{
	display: flex;
	flex-direction: column;
	flex:1;
	gap: 1rem;
}
.affinite-footer-menu__list,
.affinite-footer-menu__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.affinite-footer-menu__list li {
	margin: 0 0 0.5rem;
	line-height:1.5rem;
}

.affinite-footer-menu__list a {
	color: inherit;
	text-decoration: none;
	font-size: 0.9375rem;
	transition: opacity 150ms ease;
}

.affinite-footer-menu__list a:hover,
.affinite-footer-menu__list a:focus {
	opacity: 0.7;
	text-decoration: underline;
}

/* --- Footer Contact --- */

.affinite-footer-contact__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.affinite-footer-contact__row {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	font-size: 0.9375rem;
	line-height: 1.4;
}

/* Pseudo-element icons so we don't need a separate upload per contact field. */
.affinite-footer-contact__row::before {
	content: "";
	display: inline-block;
	width: 1rem;
	height: 1rem;
	flex-shrink: 0;
	margin-top: 0.125rem;
	background-color: currentColor;
	opacity: 0.65;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.affinite-footer-contact__row--address::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5a2.5 2.5 0 1 1 0-5 2.5 2.5 0 0 1 0 5z'/></svg>");
}

.affinite-footer-contact__row--phone::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.24.2 2.45.57 3.57a1 1 0 0 1-.24 1.02l-2.2 2.2z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M6.62 10.79a15.05 15.05 0 0 0 6.59 6.59l2.2-2.2a1 1 0 0 1 1.02-.24c1.12.37 2.33.57 3.57.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.24.2 2.45.57 3.57a1 1 0 0 1-.24 1.02l-2.2 2.2z'/></svg>");
}

.affinite-footer-contact__row--email::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/></svg>");
}

.affinite-footer-contact__row--hours::before {
	-webkit-mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm.5 11H7v-2h3.5V6h2v7z'/></svg>");
	mask-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm.5 11H7v-2h3.5V6h2v7z'/></svg>");
}

.affinite-footer-contact__value {
	color: inherit;
	text-decoration: none;
}

.affinite-footer-contact__value:hover,
.affinite-footer-contact__value:focus {
	text-decoration: underline;
}

/* --- Footer Credit (forced full row) --- */

.affinite-footer-credit {
	flex: 0 0 100%; /* break out of the columns row */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1.5rem;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid #385139;
	font-size: 0.875rem;
	opacity: 0.85;
}

.affinite-footer-credit__left,
.affinite-footer-credit__right {
	min-width: 0;
}

.affinite-footer-credit a {
	color: inherit;
	text-decoration: underline;
}

.affinite-footer-credit a:hover,
.affinite-footer-credit a:focus {
	text-decoration: none;
}

/* --- Mobile: stack columns and credit halves --- */
@media (max-width: 767.98px) {
	.affinite-footer {
		gap: 2rem;
	}

	.affinite-footer > .wp-block-affinite-footer-description,
	.affinite-footer > .wp-block-affinite-footer-menu,
	.affinite-footer > .wp-block-affinite-footer-contact {
		flex: 1 1 100%;
	}

	.affinite-footer-credit {
		justify-content: flex-start;
	}
}

/* =========================================================
 * Header Menu (desktop)
 * =========================================================
 * Horizontal nav list rendered by wp_nav_menu(). Visibility is gated by an
 * instance-specific inline <style> media query (see HeaderMenuRender.php).
 */

.affinite-header-menu {
	display: flex;
	width:100%;
	justify-content: flex-end;
}

.affinite-header-menu__list,
.affinite-header-menu__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.affinite-header-menu__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1.5rem;
}

.affinite-header-menu__list li {
	position: relative;
}

.affinite-header-menu__list a {
	display: inline-block;
	padding: 0.5rem 0;
	color: inherit;
	text-decoration: none;
	font-size: 0.9375rem;
	font-weight: 500;
	transition: opacity 150ms ease;
}

.affinite-header-menu__list a:hover,
.affinite-header-menu__list a:focus,
.affinite-header-menu__list .current-menu-item > a {
	opacity: 0.7;
	text-decoration: underline;
}

/* Optional sub-menu (depth 2) — minimal dropdown. */
.affinite-header-menu__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 12rem;
	padding: 0.5rem 0;
	background-color: #fff;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.12 );
	border-radius: 6px;
	opacity: 0;
	visibility: hidden;
	transform: translateY( 4px );
	transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
	z-index: 100;
}

.affinite-header-menu__list li:hover > .sub-menu,
.affinite-header-menu__list li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY( 0 );
}

.affinite-header-menu__list .sub-menu a {
	display: block;
	padding: 0.5rem 1rem;
}

/* =========================================================
 * Header Mobile Menu
 * =========================================================
 * Hamburger button + slide-in panel. Visibility gated above the breakpoint
 * by an instance-specific inline <style> media query (see renderer).
 */

.affinite-header-mobile-menu {
	display: block;
	position: relative;
}

.affinite-header-mobile-menu__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 6px;
	cursor: pointer;
	color: inherit;
	transition: background-color 150ms ease;
}

.affinite-header-mobile-menu__toggle:hover,
.affinite-header-mobile-menu__toggle:focus-visible {
	background-color: rgba( 0, 0, 0, 0.06 );
}

.affinite-header-mobile-menu__toggle-icon {
	display: block;
	width: 1.5rem;
	height: 1.5rem;
}

.affinite-header-mobile-menu__toggle-icon[hidden] {
	display: none;
}

/* Slide-in panel: full-width on the right, fixed position over the page. */
.affinite-header-mobile-menu__panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min( 320px, 85vw );
	padding: 4rem 1.5rem 1.5rem;
	background-color: #fff;
	box-shadow: -8px 0 32px rgba( 0, 0, 0, 0.12 );
	overflow-y: auto;
	z-index: 1000;
}

.affinite-header-mobile-menu__panel[hidden] {
	display: none;
}

.affinite-header-mobile-menu__list,
.affinite-header-mobile-menu__list ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.affinite-header-mobile-menu__list li {
	border-bottom: 1px solid rgba( 0, 0, 0, 0.08 );
}

.affinite-header-mobile-menu__list a {
	display: block;
	padding: 0.875rem 0;
	color: inherit;
	text-decoration: none;
	font-size: 1rem;
	font-weight: 500;
}

.affinite-header-mobile-menu__list a:hover,
.affinite-header-mobile-menu__list a:focus {
	opacity: 0.7;
}

/* Sub-menu in mobile: indent, no dropdown animation. */
.affinite-header-mobile-menu__list .sub-menu {
	margin-left: 1rem;
}

/* When any mobile menu is open, lock body scroll. JS toggles this class. */
body.affinite-mobile-menu-open {
	overflow: hidden;
}

/* Backdrop dimmer when mobile menu is open. */
body.affinite-mobile-menu-open::after {
	content: "";
	position: fixed;
	inset: 0;
	background-color: rgba( 0, 0, 0, 0.4 );
	z-index: 999;
	pointer-events: none;
}

/* =========================================================
 * Admin-only menu diagnostics
 * =========================================================
 * Server-side renderers (footer-menu, header-menu, header-mobile-menu) emit
 * a small notice when a menu is selected but empty / missing. They check
 * current_user_can('edit_theme_options'), so it's only visible to admins —
 * but the visual styling is shared here so all 3 blocks look consistent.
 */

.affinite-footer-menu__notice,
.affinite-header-menu__notice,
.affinite-header-mobile-menu__notice {
	margin: 0.5rem 0;
	padding: 0.625rem 0.875rem;
	border-left: 3px solid #f59e0b;
	background-color: #fffbeb;
	color: #92400e;
	font-size: 0.8125rem;
	line-height: 1.4;
}

.affinite-footer-menu__notice strong,
.affinite-header-menu__notice strong,
.affinite-header-mobile-menu__notice strong {
	color: #78350f;
}

/* =========================================================
 * Notice
 * =========================================================
 * Colored alert box with 4 variants (info / success / warning / error). The
 * icon comes from CSS mask-image (per-variant SVG data URI) and inherits the
 * variant's foreground color — no icon upload required.
 */

.affinite-notice {
	--affinite-notice-bg:     #eff6ff;
	--affinite-notice-fg:     #1e40af;
	--affinite-notice-border: #3b82f6;
	--affinite-notice-icon:   url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3zm1.5 11h-3v-7h3v7z'/></svg>");

	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	border-left: 4px solid var(--affinite-notice-border);
	border-radius: 6px;
	background-color: var(--affinite-notice-bg);
	color: var(--affinite-notice-fg);
}

.affinite-notice--success {
	--affinite-notice-bg:     #f0fdf4;
	--affinite-notice-fg:     #166534;
	--affinite-notice-border: #22c55e;
	--affinite-notice-icon:   url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm-1 14.4-4.7-4.7 1.4-1.4L11 13.6l5.3-5.3 1.4 1.4-6.7 6.7z'/></svg>");
}

.affinite-notice--warning {
	--affinite-notice-bg:     #fffbeb;
	--affinite-notice-fg:     #92400e;
	--affinite-notice-border: #f59e0b;
	--affinite-notice-icon:   url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2 1 21h22L12 2zm0 6 7.5 13h-15L12 8zm-1 4v4h2v-4h-2zm0 5v2h2v-2h-2z'/></svg>");
}

.affinite-notice--error {
	--affinite-notice-bg:     #fef2f2;
	--affinite-notice-fg:     #991b1b;
	--affinite-notice-border: #ef4444;
	--affinite-notice-icon:   url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6z'/></svg>");
}

.affinite-notice__icon {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.125rem;
	background-color: currentColor;
	-webkit-mask-image: var(--affinite-notice-icon);
	mask-image: var(--affinite-notice-icon);
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.affinite-notice__body {
	flex: 1 1 auto;
	min-width: 0;
}

.affinite-notice__title {
	margin: 0 0 0.25rem;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}

.affinite-notice__message {
	font-size: 0.9375rem;
	line-height: 1.5;
	color: inherit;
}

.affinite-notice__message > *:first-child { margin-top: 0; }
.affinite-notice__message > *:last-child  { margin-bottom: 0; }

.affinite-notice__message a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
}

.affinite-notice__message a:hover,
.affinite-notice__message a:focus {
	text-decoration: none;
}

.affinite-notice__dismiss {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.75rem;
	height: 1.75rem;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: 4px;
	color: inherit;
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.6;
	transition: opacity 150ms ease, background-color 150ms ease;
}

.affinite-notice__dismiss:hover,
.affinite-notice__dismiss:focus-visible {
	opacity: 1;
	background-color: rgba( 0, 0, 0, 0.06 );
}

