/* =====================================================
   Would You Rather – Frontend Styles
   ===================================================== */

.wyr-quiz {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 720px;
	margin: 0 auto;
}

.wyr-quiz-title {
	font-size: 1.6rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #1a1a2e;
}

/* --- Individual question card --- */
.wyr-question {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 28px 28px 22px;
	margin-bottom: 20px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	transition: box-shadow 0.2s ease;
}
.wyr-question:hover {
	box-shadow: 0 4px 16px rgba(0,0,0,0.09);
}

.wyr-question-text {
	font-size: 1.1rem;
	font-weight: 600;
	color: #111827;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* --- Options row --- */
.wyr-options {
	display: flex;
	align-items: stretch;
	gap: 0;
	margin-bottom: 0;
}

/* --- Buttons --- */
.wyr-btn {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 18px 16px;
	border: 2px solid transparent;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.18s ease;
	text-align: center;
	line-height: 1.3;
	background: #f3f4f6;
	color: #374151;
}

.wyr-btn-a {
	background: #eff6ff;
	color: #1d4ed8;
	border-color: #bfdbfe;
}
.wyr-btn-a:hover:not(:disabled) {
	background: #3b82f6;
	color: #ffffff;
	border-color: #3b82f6;
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.wyr-btn-b {
	background: #fdf4ff;
	color: #7c3aed;
	border-color: #e9d5ff;
}
.wyr-btn-b:hover:not(:disabled) {
	background: #7c3aed;
	color: #ffffff;
	border-color: #7c3aed;
	transform: translateY(-2px);
	box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.wyr-btn-disabled {
	cursor: default !important;
	opacity: 0.85;
}

.wyr-btn-label {
	display: block;
}

.wyr-votes {
	display: block;
	font-size: 0.78rem;
	font-weight: 500;
	opacity: 0.75;
}

/* --- OR divider --- */
.wyr-or {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.75rem;
	font-weight: 800;
	color: #9ca3af;
	letter-spacing: 0.08em;
	padding: 0 12px;
	flex-shrink: 0;
}

/* --- Results bar --- */
.wyr-results {
	margin-top: 18px;
	padding-top: 16px;
	border-top: 1px solid #f3f4f6;
}

.wyr-bar-wrap {
	display: flex;
	height: 36px;
	border-radius: 8px;
	overflow: hidden;
	gap: 2px;
}

.wyr-bar {
	display: flex;
	align-items: center;
	height: 100%;
	padding: 0 10px;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 2%;
}

.wyr-bar-a {
	background: #3b82f6;
	color: #fff;
	border-radius: 8px 0 0 8px;
	justify-content: flex-start;
}

.wyr-bar-b {
	background: #7c3aed;
	color: #fff;
	border-radius: 0 8px 8px 0;
	justify-content: flex-end;
}

.wyr-bar-label {
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

.wyr-total-votes {
	font-size: 0.8rem;
	color: #6b7280;
	margin: 8px 0 0;
	text-align: center;
}

/* --- Already-voted state highlights the chosen button --- */
.wyr-voted .wyr-btn-a.wyr-chosen {
	background: #3b82f6;
	color: #fff;
	border-color: #3b82f6;
}
.wyr-voted .wyr-btn-b.wyr-chosen {
	background: #7c3aed;
	color: #fff;
	border-color: #7c3aed;
}

.wyr-error {
	color: #dc2626;
	font-style: italic;
}

/* --- Responsive --- */
@media (max-width: 520px) {
	.wyr-question {
		padding: 20px 16px 16px;
	}
	.wyr-options {
		flex-direction: column;
	}
	.wyr-or {
		padding: 8px 0;
	}
	.wyr-btn {
		width: 100%;
	}
}
