/**
 * KMG Share — frontend styles.
 *
 * @package KMG_Share
 * @since   0.1.0
 */

/* --- Share toolbar --- */

.toolbar {
	position: relative;
	padding: 2em 0;
}

.toolbar-cta {
	min-height: 112px;
	margin: 0 auto;
	padding: 1.5em 0.5em;
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	justify-content: space-between;
	align-content: center;
	align-items: center;
}
.toolbar-cta.hide {
	display: none;
}
.toolbar-cta.center {
	justify-content: center;
}
.toolbar-cta .btn_link {
	margin-top: 1em;
	--bgcolor: var(--catcolor);
	--color: #fff;
}

@media screen and (min-width: 601px) {
	.toolbar-cta {
		flex-direction: row;
	}
	.toolbar-cta .btn_link {
		margin: 0 1em;
	}
}

.btn_desktop_share {
	padding: 1.5em;
	min-height: 112px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
}
.btn_desktop_share.hide {
	display: none;
}

a.btn_share {
	display: inline-block;
	position: relative;
	margin: 0.25em;
	width: 3em;
	height: 3em;
	color: var(--catcolor);
	line-height: 1;
	transition: all 0.2s;
	font-weight: 700;
	font-size: 1em;
	border-radius: 50%;
	opacity: 1;
}
a.btn_share:hover,
a.btn_share:focus {
	color: var(--cocoa);
	box-shadow: 0 1em 1.2em 0 rgba(29, 13, 3, 0.3);
	transform: scale(1.1);
}
a.btn_share svg {
	width: 3em;
	height: 3em;
	top: 50%;
	left: 50%;
	position: absolute;
	fill: var(--catcolor);
	transform: translate(-50%, -50%);
}

.close-btn-toolbar {
	font-size: 2em;
	cursor: pointer;
	width: 1.5em;
	text-align: center;
	font-family: "DraftNaturalA";
	transform: rotate(45deg) translate(-50%, 0);
}
.close-btn-toolbar.active {
	display: block;
}

/* --- Print card is only rendered when printing --- */

.kmg-share-print-card {
	display: none;
}

/* --- Inline icons inside share/print pill buttons --- */

.kmg-share-icon {
	display: inline-block;
	vertical-align: -0.18em;
	margin-right: 0.4em;
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* --- Mobile sticky action bar (rezepte only) --- */

.kmg-share-sticky {
	display: none;
}

@media (max-width: 600px) {
	.kmg-share-sticky {
		display: flex;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 100;
		gap: 0.5em;
		padding: 0.5em 0.75em calc(0.5em + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.96);
		box-shadow: 0 -0.5em 1em rgba(0, 0, 0, 0.08);
		backdrop-filter: blur(4px);
		-webkit-backdrop-filter: blur(4px);
		opacity: 0;
		transform: translateY(100%);
		pointer-events: none;
		transition: opacity 0.2s ease, transform 0.25s ease;
	}

	.kmg-share-sticky--visible {
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}

	.kmg-share-sticky__btn {
		flex: 1;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		appearance: none;
		-webkit-appearance: none;
		border: 0;
		border-radius: 999px;
		padding: 0.75em 1em;
		line-height: 1;
		color: #fff;
		cursor: pointer;
		background: #d69936;
	}

	.kmg-share-sticky__btn:active {
		filter: brightness(0.92);
	}
}
