/* ─── Floating Planner Button ────────────────────────────────────────────── */

.sovella-planner-btn {
	position: fixed;
	top: 0;
	right: max(20px, calc(50% - 700px));
	z-index: 999;
	display: flex;
	align-items: center;
	gap: 16px;
	padding-left: 16px;
	background: #F3F4F6;
	color: #041E42;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	font-family: 'Benton Sans', system-ui, sans-serif;
	font-weight: 500;
	font-size: 14px;
}

.sovella-planner-btn__label {
	text-align: right;
	white-space: nowrap;
	line-height: normal;
}

.sovella-planner-btn__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 40.94px;
	background: #E10600;
	flex-shrink: 0;
	overflow: hidden;
}

.sovella-planner-btn:hover {
	background: #E10600;
	color: white;
}

@media (max-width: 960px) {
	.sovella-planner-btn {
		position: relative;
		top: auto;
		right: auto;
		width: 100%;
		height: 40.94px;
		justify-content: flex-end;
		padding-left: 0;
		padding-right: 0;
		background: #F3F4F6;
		z-index: 101;
	}

	.sovella-planner-btn__label {
		text-align: right;
		flex: 1;
		font-size: 14px;
		font-weight: 500;
		color: #041E42;
	}

	.sovella-planner-btn__icon {
		position: relative;
		width: 36px;
		height: 40.94px;
		min-height: 40.94px;
		flex-shrink: 0;
	}
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.sovella-footer-inner {
	align-items: flex-start !important;
	position: relative;
}

.sovella-footer-contact {
	flex: 0 0 300px;
	padding-left: var(--wp--preset--spacing--13);
	padding-right: var(--wp--preset--spacing--9);
	padding-bottom: 145px;
	position: relative;
}

.sovella-footer-contact::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 20px;
	height: calc(100% - 145px);
	background: #E10600;
}

.sovella-footer-avainlippu {
	position: absolute;
	left: 60px;
	bottom: 0;
	width: 156px;
	padding: 24px;
	box-sizing: border-box;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Hide mobile copy on desktop */
.sovella-footer-avainlippu--mobile {
	display: none !important;
}

.sovella-footer-avainlippu img {
	width: auto;
	height: auto;
	max-width: 80px;
}

.sovella-footer-nav {
	flex: 1 1 0;
	min-width: 0;
	align-items: flex-start !important;
}

.sovella-footer-col {
	flex: 1 1 0;
	min-width: 0;
}

/* ─── Footer navigation link hover/focus ────────────────────────────────── */
.sovella-footer-col .wp-block-navigation-item__content,
.sovella-footer-col .wp-block-navigation-item__content:link,
.sovella-footer-col .wp-block-navigation-item__content:visited {
	text-decoration: none;
	color: #ffffff;
}

.sovella-footer-col .wp-block-navigation-item__content:hover,
.sovella-footer-col .wp-block-navigation-item__content:focus {
	text-decoration: underline;
	text-underline-offset: 3px;
	color: #ffffff;
}

.sovella-footer-social .wp-block-social-link {
	width: 42px;
	height: 42px;
	border: 2px solid transparent !important;
	box-sizing: border-box;
	transition: border-color 0.15s ease !important;
	transform: none !important;
}

@media (max-width: 768px) {
	.site-footer.wp-block-group {
		padding-top: 30px !important;
		padding-bottom: 30px !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	.site-footer > .wp-block-group > .wp-block-group {
		padding-left: 16px !important;
		padding-right: 16px !important;
		box-sizing: border-box !important;
	}

	.sovella-footer-inner {
		flex-direction: column !important;
		flex-wrap: nowrap !important;
		gap: 36px !important;
	}

	.sovella-footer-inner,
	.sovella-footer-nav {
		flex-direction: column !important;
	}

	.sovella-footer-contact {
		flex: 0 0 100% !important;
		width: 100% !important;
		border-left: none !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		padding-bottom: 0 !important;
		order: 1 !important;
	}

	.sovella-footer-contact::before {
		display: none;
	}

	.sovella-footer-nav {
		flex: 0 0 100% !important;
		width: 100% !important;
		order: 2 !important;
	}

	.sovella-footer-col {
		flex: 0 0 100% !important;
		width: 100% !important;
	}

	/* Hide desktop copy on mobile */
	.sovella-footer-avainlippu--desktop {
		display: none !important;
	}

	/* Show mobile copy full width at bottom */
	.sovella-footer-avainlippu--mobile {
		display: flex !important;
		position: relative !important;
		left: auto !important;
		bottom: auto !important;
		width: calc(100% + 32px) !important;
		margin-left: -16px !important;
		margin-right: -16px !important;
		margin-bottom: calc(-1 * 60px) !important;
		justify-content: center !important;
		padding: 24px !important;
		box-sizing: border-box !important;
		order: 3 !important;
	}
}
