/* ============================================
   SURVEY STYLES
   ============================================ */

.survey-container {
	background: var(--lightestGrey);
	border-radius: 12px;
	padding: 32px 38px;
	max-width: 500px;
	margin-inline: auto;
}

.survey-question h4 {
	color: #2c3e50;
	font-size: var(--fontSizeLarge);
	font-weight: 600;
	margin: 0 0 14px 0;
	line-height: 1.2;
}

.survey-answers {
	display: flex;
	flex-direction: column;
	gap: 0px;
}

label.survey-answer {display: flex; align-items: center; padding: 12px 15px; background: #fff; border: 2px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: all 0.5s ease;}

label.survey-answer:hover {border-color: #3498db; background: #f0f7ff; border-radius: 12px; box-shadow: var(--materialShadow);
	span {text-decoration: none;}
}

.survey-answer span.survey-answer-text {color: #34495e; font-size: calc(var(--fontSize) - 0.15rem); display: block; overflow: hidden; text-overflow: ellipsis;}


.survey-answer input[type="radio"] {display: none;}

.survey-answer.selected {color: #175b88; border-color: #3498db; background: #e8f4fd; font-weight: bold;}


/* Results view */
.survey-results {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.survey-result-item {
	background: #fff;
	border-radius: 8px;
	padding: 12px 15px;
	position: relative;
	overflow: hidden;
}

.survey-result-bar {
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	background: linear-gradient(90deg, #3498db 0%, #2980b9 100%);
	opacity: 0.15;
	width: 0%;
	transition: width 1s ease-out;
	border-radius: 8px 0 0 8px;
}

.survey-result-item.voted .survey-result-bar {
	background: linear-gradient(90deg, #27ae60 0%, #219a52 100%);
	opacity: 0.25;
}

.survey-result-content {
	position: relative;
	z-index: 1;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.survey-result-text {
	font-size: 16px;
	color: #2c3e50;
	font-weight: 500;
}

.survey-result-percent {
	font-size: 16px;
	font-weight: 700;
	color: #3498db;
	min-width: 50px;
	text-align: right;
}

.survey-result-item.voted .survey-result-percent {
	color: #27ae60;
}


/* Footer */
.survey-footer {
	margin-top: 16px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.survey-vote-btn {
	background: linear-gradient(145deg, #3498db 0%, #216796 100%);
	color: #fff;
	border: none;
	padding: 12px;
	border-radius: 8px;
	font-size: var(--fontSizeLarge);
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
	width: 100%;
	margin: 0 auto;
	transition: 0.3s;
}

.survey-vote-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
	background: linear-gradient(145deg, #2b88c6 0%, #1a5175 100%);
}

.survey-vote-btn:disabled {
	background: #bdc3c7;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.survey-total {
	font-size: 13px;
	color: #7f8c8d;
}


/* Loading state */
.survey-container.loading .survey-vote-btn {
	pointer-events: none;
	opacity: 0.7;
}

.survey-container.loading .survey-vote-btn::after {
	content: '';
	display: inline-block;
	width: 14px;
	height: 14px;
	margin-left: 8px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

.survey-thankyou {
	padding: 20px 15px;
	text-align: center;
	font-size: var(--fontSizeLarge);
	font-weight: 600;
	color: #27ae60;
}


@keyframes spin {
	to { transform: rotate(360deg); }
}



/* Responsive */

@media (max-width: 480px) {
	.survey-container {
		width: 100%;
		flex: 1;
		padding: 24px 16px;
	}

	.survey-question h4 {
	}

	.survey-answer {
		padding: 10px 12px;
	}
	
	.survey-vote-btn {
		padding: 10px 20px;
	}
}