/*
 * CADchat — footer styles
 *
 * Targets template-parts/footer/mega-footer.php. Mirrors landing-preview.html
 * footer (~line 2064): light gray bg, single row of logo + linked menu, with a
 * language switcher row below.
 */

.cc-footer {
	background: #F4F4F6;
	color: var(--cc-color-text-muted);
	padding-block: var(--cc-space-8);
	border-top: 1px solid #E4E4E7;
	font-size: var(--cc-type-small);
}

@media (min-width: 768px) {
	.cc-footer {
		padding-block: var(--cc-space-10);
	}
}

/* === Row 1: brand + nav === */

.cc-footer__row {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--cc-space-4);
	flex-wrap: wrap;
}

@media (min-width: 768px) {
	.cc-footer__row {
		flex-direction: row;
		align-items: center;
	}
}

.cc-footer__brand {
	display: flex;
	align-items: center;
	gap: var(--cc-space-4);
	flex-wrap: wrap;
}

.cc-footer__brand .custom-logo,
.cc-footer__brand .custom-logo-link img {
	max-height: 24px;
	width: auto;
}

.cc-footer__site-name {
	color: var(--cc-color-text-heading);
	font-weight: var(--cc-fw-bold);
	font-size: var(--cc-type-h6, 1rem);
	text-decoration: none;
}

.cc-footer__social {
	display: inline-flex;
	align-items: center;
	color: var(--cc-color-text-muted);
	transition: color var(--cc-duration-fast) var(--cc-easing-standard);
}

.cc-footer__social:hover {
	color: var(--cc-color-text-heading);
}

/* === Footer nav === */

.cc-footer__nav .cc-footer__menu,
.cc-footer__menu {
	display: flex;
	flex-wrap: wrap;
	gap: var(--cc-space-6);
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13px;
}

.cc-footer__menu li {
	margin: 0;
}

.cc-footer__menu a {
	color: var(--cc-color-text-muted);
	text-decoration: none;
	font-weight: var(--cc-fw-medium);
	transition: color var(--cc-duration-fast) var(--cc-easing-standard);
}

.cc-footer__menu a:hover {
	color: var(--cc-color-text-heading);
}

/* v1.4.55 (CC-06): vertical divider between site links and the external
 * Help Center / Trust Center pair. Hidden below 900px where the menu wraps
 * (a stretched divider mid-wrap reads wrong). */
.cc-footer__menu-divider {
	width: 1px;
	align-self: stretch;
	min-height: 1em;
	background: var(--cc-color-border-subtle);
}

@media (max-width: 899px) {
	.cc-footer__menu-divider {
		display: none;
	}
}

/* v1.4.55 (CC-06): new-tab arrow on external links, drawn in CSS so it
 * inherits the link colour. */
.cc-footer__menu-link--external::after {
	content: "";
	display: inline-block;
	width: 0.62em;
	height: 0.62em;
	margin-left: 0.38em;
	vertical-align: baseline;
	background-color: currentColor;
	-webkit-mask: var(--cc-ext-arrow) center / contain no-repeat;
	        mask: var(--cc-ext-arrow) center / contain no-repeat;
}

:root {
	--cc-ext-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17 17 7'/%3E%3Cpath d='M8 7h9v9'/%3E%3C/svg%3E");
}

/* --- v1.4.55 (CC-11): the footer language-switcher rules were REMOVED —
 * the switcher moved to the header (see nav.css .cc-header-lang) and the
 * footer row markup is gone from mega-footer.php. --- */

/* Suppress GeneratePress's default footer credits row underneath, since
 * our cc-footer already includes brand info and is the canonical footer. */
.site-footer .site-info {
	display: none;
}

/* === v1.4.46 — mobile tap targets (audit Phase C) ===
 * Footer links measured 13/13 under 30px tall and the language switcher
 * ~20×24px per link on phones. Pad to ~44px effective on small viewports;
 * desktop ≥900px is untouched. */
@media (max-width: 899px) {
	.cc-footer__menu {
		gap: 0 var(--cc-space-4);
	}
	.cc-footer__menu a {
		display: inline-block;
		padding: 12px 8px;
		margin-left: -8px; /* keep text left-aligned with the column edge */
	}
}
