/**
 * Moneysworth Toolkit — footer
 *
 * The existing footer is a Divi Theme Builder layout: logo, two address
 * blocks, a "Recently Viewed Products" widget, and two legal links. It had no
 * navigation, the phone numbers were plain text rather than tel: links, and
 * the recently-viewed widget rendered with overlapping prices and stray
 * bullets.
 *
 * This styles what is there and adds a navigation band above the credits row
 * (markup from mt_ux_footer_nav_html(), placed by mt-ux.js).
 *
 * Rollback: remove the 'mt-footer' enqueue in core-init.php.
 */


/* =========================================================================
 * Navigation band
 * ====================================================================== */

body .mt-footer-util {
	background: #103a67;
	border-top: 1px solid rgba(255, 255, 255, .14);
	padding: 34px 0 30px;
}

body .mt-footer-util__inner {
	max-width: 1080px;
	margin: 0 auto;
	padding: 0 24px;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	align-items: start;
}

body .mt-footer-col h4 {
	margin: 0 0 12px !important;
	padding: 0 0 9px !important;
	font-size: 12.5px !important;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #8fb6de !important;
	border-bottom: 1px solid rgba(255, 255, 255, .16);
}

body .mt-footer-col ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body .mt-footer-col li {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body .mt-footer-col a {
	display: block;
	padding: 8px 0;
	min-height: 40px;
	font-size: 14.5px;
	line-height: 1.5;
	color: #e4eefa !important;
	text-decoration: none !important;
}

body .mt-footer-col a:hover {
	color: #fff !important;
	text-decoration: underline !important;
}

body .mt-footer-col--call .mt-footer-phone {
	display: inline-block;
	font-size: 21px;
	font-weight: 700;
	color: #fff !important;
	text-decoration: none !important;
	font-variant-numeric: tabular-nums;
	padding: 6px 0;
	min-height: 44px;
}

body .mt-footer-col--call .mt-footer-phone:hover { text-decoration: underline !important; }

body .mt-footer-note {
	margin: 2px 0 12px !important;
	font-size: 13px;
	line-height: 1.5;
	color: #a9c6e4 !important;
}

body .mt-footer-switch {
	display: inline-block;
	padding: 9px 16px;
	border: 1px solid rgba(255, 255, 255, .45);
	border-radius: 3px;
	font-size: 13.5px;
	font-weight: 600;
	color: #fff !important;
	text-decoration: none !important;
	min-height: 40px;
}

body .mt-footer-switch:hover {
	background: rgba(255, 255, 255, .14);
	border-color: #fff;
}


/* =========================================================================
 * The existing Divi footer layout
 * ====================================================================== */

/* Section headings ("OUTER BANKS, NC" / "SANDBRIDGE BEACH, VA") */
body #main-footer h3,
body .et-l--footer h3,
body #main-footer h4.widgettitle {
	font-size: 13px !important;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #8fb6de !important;
	font-weight: 700 !important;
	padding-bottom: 9px !important;
	margin-bottom: 12px !important;
	border-bottom: 1px solid rgba(255, 255, 255, .16) !important;
}

/* Address lines: readable size, and the tel: links mt-ux.js creates get a
   real target rather than being buried in italic body copy. */
body #main-footer .et_pb_text p,
body .et-l--footer .et_pb_text p {
	font-size: 14px;
	line-height: 1.7;
	color: #d4e3f3;
}

body .mt-footer-tel {
	color: #fff !important;
	font-weight: 600;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(255, 255, 255, .4);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

body .mt-footer-tel:hover {
	border-bottom-color: #fff;
}


/* =========================================================================
 * "Recently Viewed Products" widget
 *
 * Rendered with a stray list bullet, a 30px thumbnail and the price
 * overlapping the title. It is the only personalised thing in the footer, so
 * it is worth making legible rather than removing.
 * ====================================================================== */

body .widget_recently_viewed_products ul,
body .widget_products ul,
body .widget_recent_reviews ul {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body .widget_recently_viewed_products li,
body .widget_products li {
	list-style: none !important;
	display: flex !important;
	align-items: center;
	gap: 12px;
	padding: 10px 0 !important;
	margin: 0 !important;
	border-bottom: 1px solid rgba(255, 255, 255, .12);
}

body .widget_recently_viewed_products li:last-child,
body .widget_products li:last-child { border-bottom: 0; }

body .widget_recently_viewed_products li a,
body .widget_products li a {
	display: flex !important;
	align-items: center;
	gap: 12px;
	flex: 1 1 auto;
	font-size: 14px !important;
	line-height: 1.35;
	font-weight: 600;
	color: #e4eefa !important;
	text-decoration: none !important;
	min-height: 44px;
}

body .widget_recently_viewed_products li a:hover,
body .widget_products li a:hover { color: #fff !important; text-decoration: underline !important; }

body .widget_recently_viewed_products li img,
body .widget_products li img {
	order: -1;
	width: 52px !important;
	height: 52px !important;
	flex: none;
	object-fit: cover;
	border-radius: 3px;
	margin: 0 !important;
	float: none !important;
	background: #fff;
}

/* The price sat on top of the title; give it its own line. */
body .widget_recently_viewed_products li .woocommerce-Price-amount,
body .widget_products li .woocommerce-Price-amount,
body .widget_recently_viewed_products li ins,
body .widget_recently_viewed_products li del {
	display: block;
	font-size: 14px !important;
	font-weight: 700;
	color: #9fd8cd !important;
	margin-top: 3px;
	line-height: 1.3;
	background: none !important;
}

body .widget_recently_viewed_products li .product-title {
	display: block;
	color: #e4eefa !important;
}

/* The "/week" suffix inherits a dark body colour and disappears against the
   navy. It is the unit on the price, so it has to be readable. */
body .widget_recently_viewed_products li .woocommerce-price-suffix,
body .widget_products li .woocommerce-price-suffix,
body .widget_recently_viewed_products li small,
body #main-footer .woocommerce-price-suffix {
	color: #9fd8cd !important;
	font-size: 12px !important;
	font-weight: 600;
	opacity: 1 !important;
}


/* =========================================================================
 * Credits row
 * ====================================================================== */

body #footer-bottom {
	background: rgba(0, 0, 0, .22) !important;
	padding: 14px 0 !important;
}

body #footer-info {
	font-size: 13px !important;
	color: #a9c6e4 !important;
	float: none !important;
	padding: 0 !important;
}

body #footer-info a {
	color: #d4e3f3 !important;
	text-decoration: underline;
}

body #footer-bottom .et-social-icons {
	float: none !important;
	margin: 0;
}

body #footer-bottom .et-social-icons a {
	font-size: 20px;
	color: #d4e3f3 !important;
	min-width: 44px;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

body #footer-bottom .et-social-icons a:hover { color: #fff !important; }


/* =========================================================================
 * Responsive
 * ====================================================================== */

@media (max-width: 980px) {
	body .mt-footer-util__inner {
		grid-template-columns: repeat(2, 1fr);
		gap: 24px;
	}
}

@media (max-width: 560px) {
	body .mt-footer-util {
		padding: 26px 0 22px;
	}

	body .mt-footer-util__inner {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	/* On a phone the link lists are long; the call column comes first so the
	   quickest route to a person is at the top, not four lists down. */
	body .mt-footer-col--call { order: -1; }

	body .mt-footer-col a { padding: 10px 0; }
}
