/**
 * Extra Fields for ACF — Button Group Field Styles
 */

.efacf-button-group-wrap {
	display: inline-flex;
	flex-wrap: wrap;
}

.efacf-button-group-wrap input[type="radio"],
.efacf-button-group-wrap input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.efacf-button-group-wrap label {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	background: #fff;
	border: 1px solid #d1d5db;
	cursor: pointer;
	line-height: 1.4;
	transition: background 0.1s ease, color 0.1s ease, border-color 0.1s ease;
	margin-right: -1px;
	position: relative;
}

.efacf-button-group-wrap label:first-of-type {
	border-radius: 4px 0 0 4px;
}

.efacf-button-group-wrap label:last-of-type {
	border-radius: 0 4px 4px 0;
	margin-right: 0;
}

.efacf-button-group-wrap label:only-of-type {
	border-radius: 4px;
	margin-right: 0;
}

.efacf-button-group-wrap label:hover {
	background: #f3f4f6;
	border-color: #9ca3af;
	z-index: 1;
}

.efacf-button-group-wrap input[type="radio"]:checked + label,
.efacf-button-group-wrap input[type="checkbox"]:checked + label {
	background: #0073aa;
	border-color: #0073aa;
	color: #fff;
	z-index: 2;
}

.efacf-button-group-wrap input[type="radio"]:checked + label:hover,
.efacf-button-group-wrap input[type="checkbox"]:checked + label:hover {
	background: #005177;
	border-color: #005177;
}

/* Focus ring for accessibility */
.efacf-button-group-wrap input[type="radio"]:focus-visible + label,
.efacf-button-group-wrap input[type="checkbox"]:focus-visible + label {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
	z-index: 3;
}
