/*
 * HClinic design system - 7/7 footer
 * The footer is one #bottom-bar: copyright (.wf-float-left), the bottom menu with its dropdown
 * panels and mobile select (.wf-float-right .mini-nav), the legal / price notice
 * (.bottom-text-block) and the floating scroll-to-top button.
 *
 * Colour contrast on the navy surface (#0a192f): #e2e8f0 text 14.3:1, #cbd5e1 11.9:1,
 * #94a3b8 6.9:1 (small print), white 17.6:1 - all above WCAG AA 4.5:1.
 * The old footer call-to-action widgets (#shortcode-widget-3) are no longer in the footer markup,
 * so no button rules are carried over for them.
 */

#footer {
	border: 0;
	background: var(--hc-navy-deep);
	color: #cbd5e1;
	font-family: var(--hc-font);
}

#footer #bottom-bar {
	min-height: 0;
	padding-block: var(--hc-space-6);
	background: transparent;
	border: 0;
}

#footer #bottom-bar .wf-wrap {
	box-sizing: border-box;
	padding-inline: var(--hc-gutter);
}

/* Floats become a simple stack on phones and two columns from tablet width. */
#footer .wf-container-bottom {
	display: flex;
	flex-direction: column;
	gap: var(--hc-space-5);
	min-height: 0;
	padding: 0;
}

#footer .wf-container-bottom > .wf-float-left,
#footer .wf-container-bottom > .wf-float-right {
	float: none;
	width: auto;
	max-width: 100%;
	margin: 0;
	padding: 0;
	text-align: left;
}

#footer .wf-container-bottom > .wf-float-left {
	color: #94a3b8;
	font-size: .875rem;
	line-height: 1.5;
}

@media (min-width: 900px) {
	#footer .wf-container-bottom {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: var(--hc-space-7);
	}

	#footer .wf-container-bottom > .wf-float-left {
		flex: 0 0 14rem;
	}

	#footer .wf-container-bottom > .wf-float-right {
		flex: 1 1 auto;
	}
}

/* ---- Bottom menu ----------------------------------------------------------------------- */

#footer #bottom-menu {
	display: flex;
	flex-wrap: wrap;
	gap: .25rem 1.5rem;
	margin: 0 0 var(--hc-space-4);
	padding: 0;
	list-style: none;
}

#footer #bottom-menu > li {
	margin: 0;
}

#footer #bottom-menu > li > a {
	display: inline-flex;
	align-items: center;
	min-height: 2.5rem;
	padding: 0;
	border-radius: var(--hc-radius-sm);
	text-decoration: none;
	transition: color var(--hc-duration-fast) var(--hc-ease-standard);
}

#footer #bottom-menu a .menu-text,
#footer #bottom-menu a {
	color: #e2e8f0;
	font-family: var(--hc-font);
	font-size: .9375rem;
	font-weight: 500;
}

#footer #bottom-menu a:hover .menu-text,
#footer #bottom-menu a:hover,
#footer #bottom-menu li:focus-within > a .menu-text {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: rgba(255, 255, 255, .5);
	text-underline-offset: .25em;
}

/* Dropdown panels open from the footer: dark card, light text, same radius as the header. */
#footer .footer-sub-nav {
	padding: .5rem;
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--hc-radius-md);
	background: #10243f;
	box-shadow: 0 -12px 30px rgba(0, 0, 0, .35);
}

#footer .footer-sub-nav > li > a {
	min-height: 2.5rem;
	padding: .5rem .75rem;
	border-radius: var(--hc-radius-sm);
}

#footer .footer-sub-nav > li > a:hover {
	background: rgba(255, 255, 255, .08);
}

/* Mobile select that replaces the menu on narrow widths */
#footer .menu-select .customSelect1 {
	box-sizing: border-box;
	min-height: var(--hc-tap);
	padding: 0 .875rem;
	border: 1px solid rgba(255, 255, 255, .3);
	border-radius: var(--hc-radius-sm);
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font-size: .9375rem;
	font-weight: 500;
}

/* ---- Legal and price notice ------------------------------------------------------------ */

#footer .bottom-text-block {
	margin: 0;
	padding: var(--hc-space-4) 0 0;
	border-top: 1px solid rgba(255, 255, 255, .12);
	color: #cbd5e1;
	font-size: .875rem;
	line-height: 1.6;
	text-align: left;
}

#footer .bottom-text-block p {
	margin: 0 0 .5rem;
	color: inherit;
	font: inherit;
}

#footer .bottom-text-block p:last-child {
	margin-bottom: 0;
	color: #94a3b8;
	font-size: .75rem;
	font-weight: 600;
	letter-spacing: .03em;
}

/* ---- Scroll to top --------------------------------------------------------------------- */

body a.scroll-top {
	border-radius: var(--hc-radius-pill);
	background: var(--hc-blue-primary);
	box-shadow: var(--hc-shadow-card);
	transition: transform var(--hc-duration-fast) var(--hc-ease-standard),
		background-color var(--hc-duration-fast) var(--hc-ease-standard),
		opacity var(--hc-duration-normal) var(--hc-ease-standard);
}

body a.scroll-top:hover {
	background: var(--hc-blue-primary-dark);
	transform: translateY(-2px);
}

/* Hotfix: стилізація кнопки відгуку у футері */
#footer p.cwd a.cwda,
.footer p.cwd a.cwda,
a.cwda {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #e11d48 !important;
	color: #ffffff !important;
	border: 1px solid #be123c !important;
	border-radius: 8px;
	padding: 10px 18px;
	font-weight: 600;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

#footer p.cwd a.cwda:hover,
.footer p.cwd a.cwda:hover,
a.cwda:hover {
	background-color: #be123c !important;
	color: #ffffff !important;
	border-color: #9f1239 !important;
	transform: translateY(-1px);
}
