/**
 * Fortune Wheel Styles
 * Mobile-first, accessibility-focused
 *
 * Breakpoints:
 * - Base: ≤360px
 * - Small: 361px - 389px
 * - Medium: 390px - 427px (iPhone mainstream)
 * - Large: ≥428px (iPhone Max)
 */

:root {
	--wheel-primary-color: #FF6B6B;
	--wheel-secondary-color: #4ECDC4;
	--wheel-rim-color: #2C3E50;
	--wheel-pointer-color: #FFD93D;
	--wheel-bg-color: #F7F7F7;
	--wheel-text-light: #FFFFFF;
	--wheel-text-dark: #2C3E50;
	--wheel-button-size: 80px;
	--wheel-size: 280px;
	--wheel-spacing: 1rem;
}

/* Screen reader only text */
.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border-width: 0;
}

/* Main container - mobile first (≤360px) */
.gp-wheel-container {
	max-width: 100%;
	margin: 0 auto;
	padding: var(--wheel-spacing);
	background-color: var(--wheel-bg-color);
	border-radius: 8px;
}

.gp-wheel-page .entry-header {
	text-align: center;
	margin-bottom: 2rem;
}

.gp-wheel-page .entry-title {
	font-size: clamp(1.5rem, 5vw, 2.5rem);
	color: var(--wheel-text-dark);
	margin: 0 0 1rem;
}

/* Wheel stage */
.gp-wheel-stage {
	position: relative;
	width: 100%;
	max-width: var(--wheel-size);
	margin: 0 auto 2rem;
	aspect-ratio: 1;
	touch-action: none;
	user-select: none;
}

.gp-wheel-svg {
	width: 100%;
	height: 100%;
	display: block;
	filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.gp-wheel-segments {
	transform-origin: center;
	transform-box: fill-box;
	transition: transform 0.3s ease;
}

.gp-wheel-segments.spinning {
	transition-timing-function: cubic-bezier(0.25, 0.1, 0.25, 1);
}

/* Segment styling */
.gp-wheel-segment {
	cursor: pointer;
}

.gp-wheel-segment-path {
	stroke: var(--wheel-rim-color);
	stroke-width: 2;
}

.gp-wheel-segment-text {
	fill: var(--wheel-text-light);
	font-size: 14px;
	font-weight: 600;
	text-anchor: middle;
	pointer-events: none;
	user-select: none;
}

/* Pointer */
.gp-wheel-pointer {
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Controls section */
.gp-wheel-controls {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin-bottom: 2rem;
}

/* Spin button - accessible target size ≥48x48px */
.gp-wheel-spin-button {
	position: relative;
	width: var(--wheel-button-size);
	height: var(--wheel-button-size);
	min-width: 48px;
	min-height: 48px;
	border: 3px solid var(--wheel-primary-color);
	border-radius: 50%;
	background: linear-gradient(135deg, var(--wheel-primary-color), #ff5252);
	color: var(--wheel-text-light);
	font-size: 1.125rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
	-webkit-tap-highlight-color: transparent;
}

.gp-wheel-spin-button:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 16px rgba(255, 107, 107, 0.4);
}

.gp-wheel-spin-button:active {
	transform: scale(0.95);
}

.gp-wheel-spin-button:focus-visible {
	outline: 3px solid var(--wheel-pointer-color);
	outline-offset: 4px;
}

.gp-wheel-spin-button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}

.gp-wheel-spin-button .gp-wheel-spin-text {
	display: block;
}

/* Options toggles */
.gp-wheel-options {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
}

.gp-wheel-toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	color: var(--wheel-text-dark);
	cursor: pointer;
	padding: 0.5rem 1rem;
	background: white;
	border: 1px solid #ddd;
	border-radius: 20px;
	transition: all 0.2s ease;
}

.gp-wheel-toggle:hover {
	background: #f9f9f9;
	border-color: var(--wheel-primary-color);
}

.gp-wheel-toggle input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

.gp-wheel-toggle input[type="checkbox"]:focus-visible {
	outline: 2px solid var(--wheel-pointer-color);
	outline-offset: 2px;
}

/* Result display */
.gp-wheel-result {
	text-align: center;
	min-height: 60px;
	padding: 1rem;
	margin: 2rem auto;
	max-width: 400px;
	border-radius: 8px;
	background: white;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	opacity: 0;
	transform: translateY(10px);
	transition: all 0.3s ease;
}

.gp-wheel-result.visible {
	opacity: 1;
	transform: translateY(0);
}

.gp-wheel-result-text {
	font-size: 1.125rem;
	color: var(--wheel-text-dark);
	font-weight: 600;
}

.gp-wheel-result-label {
	font-size: 1.5rem;
	color: var(--wheel-primary-color);
	font-weight: 700;
	margin-top: 0.5rem;
}

/* Page content below wheel */
.gp-wheel-page-content {
	margin-top: 3rem;
	padding-top: 3rem;
	border-top: 1px solid #e0e0e0;
}

/* Breakpoint: 361px - 389px */
@media (min-width: 361px) {
	:root {
		--wheel-size: 320px;
		--wheel-button-size: 90px;
	}

	.gp-wheel-segment-text {
		font-size: 15px;
	}
}

/* Breakpoint: 390px - 427px (iPhone mainstream) */
@media (min-width: 390px) {
	:root {
		--wheel-size: 360px;
		--wheel-button-size: 100px;
		--wheel-spacing: 1.5rem;
	}

	.gp-wheel-segment-text {
		font-size: 16px;
	}

	.gp-wheel-controls {
		flex-direction: row;
		justify-content: center;
	}
}

/* Breakpoint: ≥428px (iPhone Max, large phones) */
@media (min-width: 428px) {
	:root {
		--wheel-size: 400px;
		--wheel-button-size: 110px;
	}

	.gp-wheel-segment-text {
		font-size: 17px;
	}

	.gp-wheel-spin-button {
		font-size: 1.25rem;
	}
}

/* Tablet and desktop */
@media (min-width: 768px) {
	:root {
		--wheel-size: 480px;
		--wheel-button-size: 120px;
	}

	.gp-wheel-container {
		padding: 2rem;
	}

	.gp-wheel-segment-text {
		font-size: 18px;
	}
}

/* Large desktop */
@media (min-width: 1024px) {
	:root {
		--wheel-size: 560px;
		--wheel-button-size: 130px;
	}

	.gp-wheel-container {
		max-width: 1200px;
	}

	.gp-wheel-segment-text {
		font-size: 20px;
	}
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
	.gp-wheel-segments,
	.gp-wheel-spin-button,
	.gp-wheel-result,
	.gp-wheel-toggle {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.gp-wheel-svg {
		filter: none;
	}
}

/* High contrast mode support */
@media (prefers-contrast: high) {
	.gp-wheel-spin-button {
		border-width: 4px;
	}

	.gp-wheel-segment-path {
		stroke-width: 3;
	}

	.gp-wheel-result {
		border: 2px solid var(--wheel-text-dark);
	}
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
	:root {
		--wheel-bg-color: #1a1a1a;
		--wheel-text-dark: #f0f0f0;
	}

	.gp-wheel-toggle,
	.gp-wheel-result {
		background: #2a2a2a;
		border-color: #444;
		color: #f0f0f0;
	}

	.gp-wheel-toggle:hover {
		background: #333;
	}
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
	.gp-wheel-spin-button {
		min-width: 64px;
		min-height: 64px;
	}

	.gp-wheel-toggle {
		padding: 0.75rem 1.25rem;
	}
}

/* Loading state */
.gp-wheel-container.loading .gp-wheel-stage {
	opacity: 0.7;
	pointer-events: none;
}

/* Error state */
.gp-wheel-error {
	background: #fee;
	color: #c00;
	padding: 1rem;
	border-radius: 4px;
	margin: 1rem 0;
	text-align: center;
}

/* Dedicated Yes/No Wheel page presentation. */
body.acg-yes-no-page-view {
	background-color: #120018;
	background-image:
		radial-gradient(circle, rgba(255, 255, 255, 0.2) 0 0.8px, transparent 1.3px),
		radial-gradient(circle, rgba(255, 203, 226, 0.14) 0 1px, transparent 1.6px),
		radial-gradient(ellipse at 16% 18%, rgba(173, 25, 98, 0.38) 0, rgba(114, 16, 91, 0.16) 22%, transparent 48%),
		radial-gradient(ellipse at 82% 30%, rgba(89, 25, 145, 0.42) 0, rgba(72, 15, 106, 0.18) 24%, transparent 51%),
		linear-gradient(145deg, #0c0012 0%, #26002f 48%, #100016 100%);
	background-position: 0 0, 29px 43px, center, center, center;
	background-size: 53px 53px, 89px 89px, auto, auto, auto;
	background-attachment: fixed;
	color: #ffffff;
}

body.acg-yes-no-page-view::before {
	position: fixed;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	content: "";
	background:
		conic-gradient(from 202deg at 50% 24%, transparent 0deg 7deg, rgba(255, 123, 204, 0.13) 8deg 11deg, transparent 12deg 24deg, rgba(194, 102, 255, 0.1) 25deg 30deg, transparent 31deg 43deg, rgba(255, 177, 224, 0.08) 44deg 47deg, transparent 48deg 360deg),
		radial-gradient(ellipse at 50% 24%, rgba(255, 59, 165, 0.25) 0, rgba(174, 35, 154, 0.16) 16%, rgba(82, 20, 117, 0.08) 31%, transparent 52%);
	mix-blend-mode: screen;
	opacity: 0.82;
}

body.acg-yes-no-page-view #page {
	position: relative;
	z-index: 1;
	background: transparent;
}

body.acg-yes-no-page-view #content,
body.acg-yes-no-page-view .site,
body.acg-yes-no-page-view .site-content,
body.acg-yes-no-page-view .content-area,
body.acg-yes-no-page-view .inside-article {
	background: transparent;
}

body.acg-yes-no-page-view .site-header {
	background: rgba(17, 0, 24, 0.9);
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: 0 10px 30px rgba(8, 0, 12, 0.25);
	backdrop-filter: blur(12px);
}

body.acg-yes-no-page-view .site-header .main-title a,
body.acg-yes-no-page-view .main-navigation .main-nav ul li a,
body.acg-yes-no-page-view .menu-toggle {
	color: #ffffff;
}

body.acg-yes-no-page-view .main-navigation,
body.acg-yes-no-page-view .main-navigation ul ul {
	background: transparent;
}

body.acg-yes-no-page-view .main-navigation .main-nav ul li a:hover,
body.acg-yes-no-page-view .main-navigation .main-nav ul li[class*="current-menu-"] > a,
body.acg-yes-no-page-view .main-navigation .main-nav ul li a:focus-visible,
body.acg-yes-no-page-view .menu-toggle:hover,
body.acg-yes-no-page-view .menu-toggle:focus-visible {
	background: rgba(189, 35, 91, 0.24);
	color: #ffd5e6;
}

body.acg-yes-no-page-view .site-info {
	background: rgba(13, 0, 19, 0.92);
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	color: #fcecf3;
}

body.acg-yes-no-page-view .site-info a {
	color: #ffd5e6;
}

body.acg-yes-no-page-view .site-main.gp-wheel-page {
	width: 100%;
	max-width: 1280px;
	box-sizing: border-box;
	margin: clamp(1rem, 3vw, 2.5rem) auto;
	padding: clamp(0.75rem, 3vw, 2.25rem);
	padding-bottom: clamp(2.5rem, 6vw, 5rem);
	background: transparent;
	color: #ffffff;
}

body.acg-yes-no-page-view .gp-wheel-page *,
body.acg-yes-no-page-view .gp-wheel-page *::before,
body.acg-yes-no-page-view .gp-wheel-page *::after {
	box-sizing: border-box;
}

body.acg-yes-no-page-view .gp-wheel-container {
	--wheel-primary-color: #bd235b;
	--wheel-secondary-color: #6b2f7f;
	--wheel-rim-color: #3f1639;
	--wheel-pointer-color: #f6c94c;
	--wheel-bg-color: transparent;
	--wheel-text-light: #ffffff;
	--wheel-text-dark: #ffffff;
	min-width: 0;
	margin: 0;
	padding: 0;
	border-radius: 0;
	background: transparent;
	color: #ffffff;
	overflow-wrap: anywhere;
}

body.acg-yes-no-page-view .gp-yes-no-copy {
	min-width: 0;
	text-align: center;
}

body.acg-yes-no-page-view .gp-yes-no-adult-note {
	margin: 0 0 0.35rem;
	color: #ffb9d4;
	font-weight: 700;
	letter-spacing: 0.02em;
}

body.acg-yes-no-page-view .gp-yes-no-copy .entry-title {
	margin: 0 0 0.6rem;
	color: #ffffff;
	font-size: clamp(2rem, 5vw, 3.65rem);
	line-height: 1.08;
	text-wrap: balance;
}

body.acg-yes-no-page-view .gp-yes-no-intro {
	margin: 0 auto 0.9rem;
	color: #dbc8d5;
	font-size: clamp(1rem, 2vw, 1.15rem);
	line-height: 1.6;
}

body.acg-yes-no-page-view .gp-yes-no-benefits {
	margin: 0;
	color: #ffe0eb;
	font-weight: 700;
}

body.acg-yes-no-page-view .gp-yes-no-benefits span {
	padding: 0 0.25em;
	color: #f6c94c;
}

body.acg-yes-no-page-view .gp-wheel-stage {
	position: relative;
	width: min(100%, 430px);
	max-width: none;
	margin: clamp(1rem, 4vw, 1.5rem) auto;
	padding: 0.25rem;
	aspect-ratio: 1;
	overflow: visible;
	touch-action: none;
	user-select: none;
}

body.acg-yes-no-page-view .gp-wheel-svg {
	width: 100%;
	height: 100%;
	display: block;
	overflow: visible;
	filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.35));
}

body.acg-yes-no-page-view .gp-wheel-segments {
	transform-origin: center;
	transform-box: fill-box;
}

body.acg-yes-no-page-view .gp-wheel-segment-path {
	stroke: #3f1639;
	stroke-width: 2;
}

body.acg-yes-no-page-view .gp-wheel-segment-text {
	fill: #ffffff;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.06em;
	paint-order: stroke;
	stroke: rgba(45, 5, 38, 0.55);
	stroke-width: 1.25px;
}

body.acg-yes-no-page-view .gp-wheel-glow {
	stroke: rgba(255, 185, 216, 0.46);
	stroke-width: 2;
	filter: drop-shadow(0 0 5px rgba(242, 112, 174, 0.32));
	transition: stroke 180ms ease, filter 180ms ease;
}

body.acg-yes-no-page-view .gp-wheel-container[aria-busy="true"] .gp-wheel-glow {
	stroke: rgba(255, 213, 230, 0.92);
	filter: drop-shadow(0 0 12px rgba(255, 100, 182, 0.94));
}

body.acg-yes-no-page-view .gp-wheel-pointer {
	filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.38));
}

body.acg-yes-no-page-view .gp-wheel-controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.85rem;
	margin: 0 0 1rem;
}

body.acg-yes-no-page-view .gp-wheel-spin-button {
	width: auto;
	height: auto;
	min-width: 8.5rem;
	min-height: 44px;
	padding: 0.72rem 1.4rem;
	border: 2px solid #ff9fc6;
	border-radius: 0.65rem;
	background: linear-gradient(135deg, #bd235b, #861b4b);
	box-shadow: 0 7px 18px rgba(173, 21, 87, 0.38);
	color: #ffffff;
	font: inherit;
	font-weight: 800;
	letter-spacing: 0.05em;
}

body.acg-yes-no-page-view .gp-wheel-spin-button:hover:not(:disabled) {
	border-color: #ffe0eb;
	background: linear-gradient(135deg, #d63977, #9d1f55);
	box-shadow: 0 9px 24px rgba(218, 63, 126, 0.5);
	transform: translateY(-1px);
}

body.acg-yes-no-page-view .gp-wheel-spin-button:focus-visible,
body.acg-yes-no-page-view .gp-wheel-toggle:focus-within {
	outline: 3px solid #ffe067;
	outline-offset: 3px;
}

body.acg-yes-no-page-view .gp-wheel-options {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
}

body.acg-yes-no-page-view .gp-wheel-toggle {
	min-height: 44px;
	padding: 0.6rem 0.95rem;
	border: 2px solid #c84a82;
	border-radius: 0.65rem;
	background: rgba(25, 2, 35, 0.78);
	color: #ffffff;
	font: inherit;
	font-weight: 700;
}

body.acg-yes-no-page-view .gp-wheel-toggle:hover {
	border-color: #ff9fc6;
	background: rgba(111, 17, 71, 0.86);
}

body.acg-yes-no-page-view .gp-wheel-toggle input[type="checkbox"] {
	width: 1.1rem;
	height: 1.1rem;
	accent-color: #d63977;
}

body.acg-yes-no-page-view .gp-wheel-result {
	min-height: 7.25rem;
	max-width: none;
	margin: 0;
	padding: clamp(1rem, 2.5vw, 1.4rem);
	border: 1px solid rgba(255, 171, 208, 0.34);
	border-left: 4px solid #bd235b;
	border-radius: 0.8rem;
	background: rgba(24, 3, 34, 0.76);
	box-shadow: 0 10px 26px rgba(7, 0, 12, 0.26);
	color: #ffffff;
	font-size: clamp(1.05rem, 2vw, 1.22rem);
	font-weight: 700;
	line-height: 1.55;
	text-align: left;
	opacity: 1;
	transform: none;
}

body.acg-yes-no-page-view .gp-wheel-result.visible {
	transform: none;
}

body.acg-yes-no-page-view .gp-wheel-page-content {
	margin-top: 3rem;
	padding-top: 3rem;
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: #fcecf3;
}

@media (min-width: 960px) {
	body.acg-yes-no-page-view:not(.acg-header-ad-active) .inside-header {
		min-height: 0;
		padding-top: 4px;
		padding-bottom: 4px;
	}

	body.acg-yes-no-page-view:not(.acg-header-ad-active) .main-navigation .main-nav ul li a,
	body.acg-yes-no-page-view:not(.acg-header-ad-active) .main-navigation .menu-bar-item > a {
		line-height: 36px;
	}

	body.acg-yes-no-page-view .gp-wheel-container {
		display: grid;
		grid-template-areas:
			"stage copy"
			"stage controls"
			"stage result";
		grid-template-columns: minmax(0, 1.1fr) minmax(400px, 1fr);
		column-gap: clamp(1.75rem, 3vw, 3rem);
		align-items: start;
	}

	body.acg-yes-no-page-view .gp-yes-no-copy {
		grid-area: copy;
		align-self: end;
		text-align: left;
	}

	body.acg-yes-no-page-view .gp-yes-no-intro {
		max-width: 34rem;
		margin-right: 0;
		margin-left: 0;
	}

	body.acg-yes-no-page-view .gp-wheel-stage {
		grid-area: stage;
		width: min(100%, 540px);
		margin: 0;
		padding: 0.625rem;
	}

	body.acg-yes-no-page-view .gp-wheel-controls {
		grid-area: controls;
		justify-content: flex-start;
		margin-top: 1.5rem;
	}

	body.acg-yes-no-page-view .gp-wheel-result {
		grid-area: result;
		min-height: 8.5rem;
	}
}

@media (min-width: 1200px) {
	body.acg-yes-no-page-view .gp-wheel-container {
		grid-template-columns: minmax(0, 1.2fr) minmax(400px, 1fr);
		column-gap: clamp(1.75rem, 3vw, 3rem);
	}

	body.acg-yes-no-page-view .gp-wheel-stage {
		width: min(100%, 600px);
		max-width: 600px;
	}
}

@media (max-width: 959px) {
	body.acg-yes-no-page-view .site-main.gp-wheel-page {
		width: 100%;
		margin-right: 0;
		margin-left: 0;
		padding-right: 0.5rem;
		padding-left: 0.5rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.acg-yes-no-page-view .gp-wheel-glow,
	body.acg-yes-no-page-view .gp-wheel-spin-button,
	body.acg-yes-no-page-view .gp-wheel-result {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}
