/**
 * PWD Animations - Dual Button widget stylesheet.
 * Loaded together with pwd-animations-core.css.
 */

/* =========================================================================
 * DUAL BUTTON
 * Two equal buttons joined by a central circular badge ("or"). Each button
 * is masked with a concave circular notch so the badge sits in the middle
 * like a puzzle piece.
 * ====================================================================== */
.pwd-anim--dual {
	--pwd-dual-size: 52px;
	--pwd-dual-gap: 4px;
	display: block;
}

.pwd-anim__dual {
	position: relative;
	display: inline-grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: stretch;
	max-width: 100%;
}

.pwd-anim__dualbtn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	background: #0d0d0d;
	color: #fff;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	white-space: normal;
	min-width: 0;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
	-webkit-tap-highlight-color: transparent;
}

.pwd-anim-align-stretch .pwd-anim__dual {
	display: grid;
	width: 100%;
}

/* Concave notch: a circle (badge radius + gap) cut out of the inner edge. */
.pwd-anim__dualbtn--left {
	border-radius: var(--pwd-radius) 0 0 var(--pwd-radius);
	-webkit-mask: radial-gradient(
		circle calc(var(--pwd-dual-size) / 2 + var(--pwd-dual-gap)) at 100% 50%,
		transparent 98%,
		#000 100%
	);
	mask: radial-gradient(
		circle calc(var(--pwd-dual-size) / 2 + var(--pwd-dual-gap)) at 100% 50%,
		transparent 98%,
		#000 100%
	);
}

.pwd-anim__dualbtn--right {
	border-radius: 0 var(--pwd-radius) var(--pwd-radius) 0;
	-webkit-mask: radial-gradient(
		circle calc(var(--pwd-dual-size) / 2 + var(--pwd-dual-gap)) at 0% 50%,
		transparent 98%,
		#000 100%
	);
	mask: radial-gradient(
		circle calc(var(--pwd-dual-size) / 2 + var(--pwd-dual-gap)) at 0% 50%,
		transparent 98%,
		#000 100%
	);
}

/* Keep the label clear of the notch: reserve the notch depth on the inner
   side of each button, on top of any padding, so text never runs under it. */
.pwd-anim__dualbtn--left::after,
.pwd-anim__dualbtn--right::before {
	content: "";
	flex: 0 0 auto;
	width: calc(var(--pwd-dual-size) / 2 + var(--pwd-dual-gap));
}

.pwd-anim__dualmid {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--pwd-dual-size);
	height: var(--pwd-dual-size);
	box-sizing: border-box;
	transform: translate(-50%, -50%);
	border-radius: 50%;
	border: 0 solid transparent;
	background: #ff7a1a;
	color: #0d0d0d;
	line-height: 1;
	text-align: center;
	pointer-events: none;
}
