/* WellActually swipe mode styles. */

:root {
	color-scheme: dark;
}

* {
	box-sizing: border-box;
}

html,
body {
	margin: 0;
	padding: 0;
	height: 100%;
}

.wa-swipe-body {
	height: 100dvh;
	width: 100%;
	overflow: hidden;
	overscroll-behavior: none;
	background: #14151a;
	color: #f4f4f6;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	display: flex;
	flex-direction: column;
}

.wa-home-link {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 10;
	color: #9a9aa5;
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 6px 10px;
	border-radius: 6px;
}

.wa-home-link:hover,
.wa-home-link:focus {
	color: #f4f4f6;
	background: rgba(255, 255, 255, 0.08);
}

#wa-app {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 16px;
	touch-action: none;
}

.wa-loading {
	font-size: 1.1rem;
	color: #9a9aa5;
}

.wa-noscript {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #14151a;
	color: #f4f4f6;
	text-align: center;
	padding: 24px;
}

.wa-error {
	text-align: center;
}

.wa-error p {
	color: #d99a9a;
	margin-bottom: 16px;
}

/* Game layout */

.wa-game {
	display: flex;
	flex-direction: column;
	height: 100%;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
}

.wa-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 16px 0;
	font-size: 0.9rem;
	color: #9a9aa5;
	font-weight: 600;
}

.wa-header-stats {
	display: flex;
	gap: 12px;
}

.wa-reset-link {
	appearance: none;
	background: none;
	border: none;
	color: #6f6f79;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 8px;
	text-decoration: underline;
}

.wa-reset-link:hover,
.wa-reset-link:focus-visible {
	color: #f4f4f6;
}

.wa-storage-notice {
	position: fixed;
	bottom: 16px;
	left: 50%;
	transform: translateX( -50% );
	background: #2a2d37;
	color: #e0b95f;
	font-size: 0.85rem;
	padding: 10px 18px;
	border-radius: 999px;
	z-index: 300;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.4 );
}

.wa-answer-error {
	position: fixed;
	bottom: 16px;
	left: 50%;
	transform: translateX( -50% );
	background: #4d1f1f;
	color: #f4c9c9;
	font-size: 0.85rem;
	font-weight: 600;
	padding: 10px 18px;
	border-radius: 999px;
	z-index: 300;
	box-shadow: 0 4px 16px rgba( 0, 0, 0, 0.4 );
	max-width: 90vw;
	text-align: center;
}

.wa-card-area {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	min-height: 0;
	position: relative;
}

.wa-card {
	position: relative;
	width: 100%;
	max-width: 720px;
	height: 100%;
	max-height: 520px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 32px;
	border-radius: 20px;
	background: #1e2027;
	box-shadow: 0 8px 30px rgba( 0, 0, 0, 0.35 );
	will-change: transform;
	user-select: none;
	-webkit-user-select: none;
}

.wa-statement {
	font-size: clamp( 1.5rem, 6vw, 3.2rem );
	line-height: 1.25;
	font-weight: 700;
	margin: 0;
	overflow-wrap: break-word;
}

.wa-drag-label {
	position: absolute;
	top: 24px;
	padding: 6px 16px;
	border: 3px solid currentColor;
	border-radius: 8px;
	font-weight: 800;
	font-size: 1.1rem;
	letter-spacing: 0.05em;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.1s linear;
}

.wa-drag-label-agree {
	right: 24px;
	color: #5fd97a;
	transform: rotate( 8deg );
}

.wa-drag-label-disagree {
	left: 24px;
	color: #e0625f;
	transform: rotate( -8deg );
}

.wa-drag-label-unsure {
	top: 12px;
	left: 50%;
	transform: translateX( -50% );
	color: #e0b95f;
}

.wa-hint-footer {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 0 12px;
	/* The three answers are one control group: never let one drop to its own
	   line. They share the row instead, so this holds from small phones up. */
	flex-wrap: nowrap;
	max-width: 520px;
	margin: 0 auto;
}

.wa-hint-footer .wa-btn {
	flex: 1 1 0;
	/* Without this a flex item won't shrink below its content width, which is
	   what pushed the third button onto a second row. */
	min-width: 0;
	padding: 12px 8px;
	white-space: nowrap;
	/* Scales with the viewport between the two bounds, so the labels still
	   fit on a narrow phone without looking shrunken on a desktop. */
	font-size: clamp( 0.78rem, 3.2vw, 0.95rem );
}

.wa-hint-text {
	text-align: center;
	color: #6f6f79;
	font-size: 0.8rem;
	margin: 8px 0 16px;
}

.wa-btn {
	appearance: none;
	border: none;
	border-radius: 999px;
	padding: 12px 20px;
	font-size: 0.95rem;
	font-weight: 700;
	cursor: pointer;
	background: #2a2d37;
	color: #f4f4f6;
}

.wa-btn:hover,
.wa-btn:focus-visible {
	background: #383c49;
}

.wa-btn:focus-visible {
	outline: 2px solid #7aa2f7;
	outline-offset: 2px;
}

.wa-btn-agree {
	background: #1f4d2a;
}

.wa-btn-agree:hover,
.wa-btn-agree:focus-visible {
	background: #2a6638;
}

.wa-btn-disagree {
	background: #4d1f1f;
}

.wa-btn-disagree:hover,
.wa-btn-disagree:focus-visible {
	background: #662a2a;
}

.wa-btn-unsure {
	background: #4d431f;
}

.wa-btn-unsure:hover,
.wa-btn-unsure:focus-visible {
	background: #665a2a;
}

/* Exit animations (keyboard/button/gesture commit) */

.wa-exit-right {
	animation: wa-exit-right 0.25s ease-in forwards;
}

.wa-exit-left {
	animation: wa-exit-left 0.25s ease-in forwards;
}

.wa-exit-up {
	animation: wa-exit-up 0.25s ease-in forwards;
}

@keyframes wa-exit-right {
	to {
		transform: translateX( 150%) rotate( 20deg );
		opacity: 0;
	}
}

@keyframes wa-exit-left {
	to {
		transform: translateX( -150%) rotate( -20deg );
		opacity: 0;
	}
}

@keyframes wa-exit-up {
	to {
		transform: translateY( -150%);
		opacity: 0;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.wa-exit-right,
	.wa-exit-left,
	.wa-exit-up {
		animation: none !important;
		opacity: 0;
	}
}

.wa-done {
	text-align: center;
	max-width: 480px;
	padding: 24px;
}

.wa-done-score {
	font-size: 2rem;
	font-weight: 800;
	margin: 0 0 8px;
}

.wa-done-tier {
	font-size: 1.1rem;
	color: #c8c8d0;
	margin: 0 0 28px;
}

.wa-done-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.wa-share-row {
	display: flex;
	gap: 8px;
}

.wa-share-text {
	flex: 1;
	min-width: 0;
	background: #262933;
	border: 1px solid #383c49;
	border-radius: 8px;
	color: #c8c8d0;
	padding: 10px 12px;
	font-size: 0.85rem;
}

/* Correct flash */

.wa-correct-flash {
	position: fixed;
	top: 18%;
	left: 50%;
	transform: translateX( -50% );
	background: #1f4d2a;
	color: #d6f5db;
	font-weight: 800;
	font-size: 1.3rem;
	padding: 14px 28px;
	border-radius: 999px;
	z-index: 100;
	box-shadow: 0 8px 24px rgba( 0, 0, 0, 0.4 );
}

/* Reveal overlay */

.wa-reveal-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba( 0, 0, 0, 0.55 );
	padding: 0 16px;
}

.wa-reveal-card {
	width: 100%;
	max-width: 640px;
	max-height: 85vh;
	overflow-y: auto;
	/* Explicit: the reveal overlay is appended to <body>, so it needs its
	   own permission to pan vertically regardless of ancestor touch-action. */
	touch-action: pan-y;
	-webkit-overflow-scrolling: touch;
	background: #1e2027;
	color: #f4f4f6;
	border-radius: 20px 20px 0 0;
	padding: 28px 24px calc( 24px + env( safe-area-inset-bottom, 0px ) );
	box-shadow: 0 -8px 30px rgba( 0, 0, 0, 0.45 );
	transform: translateY( 0 );
	transition: transform 0.3s ease;
}

.wa-reveal-overlay.wa-reveal-entering .wa-reveal-card {
	transform: translateY( 100% );
	transition: none;
}

.wa-reveal-overlay.wa-reveal-leaving .wa-reveal-card {
	transform: translateY( 100% );
}

.wa-reveal-banner {
	font-size: 1.4rem;
	font-weight: 800;
	margin: 0 0 4px;
}

.wa-reveal-sub {
	font-size: 1.05rem;
	color: #c8c8d0;
	margin: 0 0 20px;
}

.wa-reveal-post {
	background: #262933;
	border-radius: 12px;
	padding: 16px;
	margin-bottom: 16px;
}

.wa-reveal-post-title {
	display: block;
	font-weight: 700;
	font-size: 1.05rem;
	color: #f4f4f6;
	text-decoration: none;
	margin-bottom: 8px;
}

.wa-reveal-post-title:hover,
.wa-reveal-post-title:focus-visible {
	text-decoration: underline;
}

.wa-reveal-excerpt {
	color: #c8c8d0;
	font-size: 0.95rem;
	line-height: 1.5;
	margin: 0 0 12px;
}

.wa-reveal-read-btn {
	display: inline-block;
	background: #2f6fed;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
	padding: 10px 18px;
	border-radius: 999px;
	font-size: 0.9rem;
}

.wa-reveal-read-btn:hover,
.wa-reveal-read-btn:focus-visible {
	background: #4a83f2;
}

.wa-reveal-continue {
	width: 100%;
}

@media ( prefers-reduced-motion: reduce ) {
	.wa-reveal-card {
		transition: none;
	}
}
