/**
 * Color Vision Deficiency Toggle Popup Styles
 *
 * Provides styling for the popover dialog containing the color vision radio selection.
 */

.wpwm-cvd-dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 999999;
	margin: 0;
	padding: 1.5rem;
	border: 1px solid rgba(128, 128, 128, 0.3);
	border-radius: 8px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
	background-color: var(--surface, #ffffff);
	color: var(--text-on-light, #1f1a17);
	font-family: inherit;
	max-width: 90vw;
	width: 360px;
	box-sizing: border-box;
}

/* Backdrop */
.wpwm-cvd-dialog::backdrop,
.wpwm-cvd-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.45);
	z-index: 999998;
	backdrop-filter: blur(2px);
}

.wpwm-cvd-dialog[hidden] {
	display: none;
}

.wpwm-cvd-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.25rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(128, 128, 128, 0.2);
}

.wpwm-cvd-title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
}

.wpwm-cvd-close {
	background: transparent;
	border: none;
	cursor: pointer;
	font-size: 1.5rem;
	line-height: 1;
	padding: 0.25rem 0.5rem;
	margin: -0.25rem -0.5rem -0.25rem 0;
	color: inherit;
	opacity: 0.7;
	border-radius: 4px;
}

.wpwm-cvd-close:hover,
.wpwm-cvd-close:focus-visible {
	opacity: 1;
	background-color: rgba(128, 128, 128, 0.15);
	outline: 2px solid currentColor;
}

.wpwm-cvd-fieldset {
	border: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.wpwm-cvd-option {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.5rem 0.625rem;
	border-radius: 6px;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.wpwm-cvd-option:hover {
	background-color: rgba(128, 128, 128, 0.08);
}

.wpwm-cvd-option:has(input:checked) {
	background-color: rgba(128, 128, 128, 0.12);
	border-color: rgba(128, 128, 128, 0.25);
}

.wpwm-cvd-option input[type="radio"] {
	margin-top: 0.2rem;
	cursor: pointer;
	accent-color: currentColor;
}

.wpwm-cvd-option-text {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.wpwm-cvd-option-label {
	font-weight: 600;
	font-size: 0.95rem;
}

.wpwm-cvd-option-desc {
	font-size: 0.8rem;
	opacity: 0.75;
	line-height: 1.25;
}

/* Focus styles */
.wpwm-cvd-option input[type="radio"]:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}
