/* VotePulse Election System - Public Styles */
@import url('https://fonts.googleapis.com/css2?family=Noto+Kufi+Arabic:wght@400;500;600;700&display=swap');

/* Voting Form Container */
.voting-container * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Noto Kufi Arabic', sans-serif;
}

.voting-container {
	background: linear-gradient(135deg, #fafafa 0%, #e3f2fd 50%, #bbdefb 100%);
	padding: 20px;
	border-radius: 15px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
	max-width: 80%;
	margin: 20px auto;
	border: 2px solid #616161;
	transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.voting-title {
	font-size: 28px;
	font-weight: 700;
	color: #1e3a8a;
	text-align: center;
	margin-bottom: 25px;
	text-transform: uppercase;
	letter-spacing: 1px;
	background: linear-gradient(90deg, #3b82f6 0%, #9333ea 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	position: relative;
}

.voting-title:after {
	content: "";
	position: absolute;
	bottom: -5px;
	left: 50%;
	transform: translateX(-50%);
	width: 20%;
	max-width: 60px;
	height: 4px;
	background: #9333ea;
	border-radius: 2px;
}

.voting-form {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.candidates-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 15px;
	padding: 10px;
	background: #ffffff;
	border-radius: 10px;
	box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.05);
}

.candidate-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 15px;
	background: #f9fafb;
	border-radius: 10px;
	transition: background 0.3s ease, transform 0.2s ease;
	cursor: pointer;
	border: 1px solid #e5e7eb;
	position: relative;
}

.candidate-option:hover {
	background: #dbeafe;
	transform: translateY(-1px);
}

.candidate-option input[type="checkbox"] {
	position: absolute;
	top: 10px;
	transform: scale(1.2);
	accent-color: #3b82f6;
}

.candidate-preview {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}

.candidate-image {
	width: 200px;
	height: 300px;
	object-fit: cover;
	border-radius: 3%;
	border: 1px solid #3b82f6;
	transition: transform 0.1s ease;
}

.candidate-name {
	font-size: 14px;
	font-weight: 500;
	color: #1e3a8a;
	text-align: center;
}

.token-input {
	display: flex;
	justify-content: center;
	gap: 10px;
}

.email-field, .token-field {
	padding: 10px;
	width: 100%;
	max-width: 350px;
	border: 2px solid #6b7280;
	border-radius: 8px;
	font-size: 14px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	outline: none;
	text-align: center;
}

.email-field:focus, .token-field:focus {
	border-color: #9333ea;
	box-shadow: 0 0 8px rgba(147, 51, 234, 0.3);
}

.vote-button {
	padding: 10px 20px;
	background: linear-gradient(90deg, #3b82f6 0%, #9333ea 100%);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
	align-self: center;
	width: 200px;
	height: 50px;
	line-height: 30px;
	text-align: center;
}

.vote-button:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
}

.vote-popup {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	z-index: 1000;
	justify-content: center;
	align-items: center;
}

.popup-content {
	background: #ffffff;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	max-width: 400px;
	width: 90%;
	position: relative;
	text-align: center;
	animation: votepulsePopupFadeIn 0.3s ease;
}

.status-icon {
	width: 48px;
	height: 48px;
	margin: 0 auto 15px;
	display: block;
}

.popup-content p {
	font-size: 16px;
	color: #333;
	margin-bottom: 15px;
	text-align: center;
}

.close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
	inset-inline-end: 15px;
	font-size: 24px;
	color: #999;
	cursor: pointer;
	transition: color 0.3s ease;
}

.close-btn:hover {
	color: #e74c3c;
}

@keyframes votepulsePopupFadeIn {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

/* Election Results Container */
.election-results-wrap {
	background: linear-gradient(135deg, #f7f9fc 0%, #e8f0fe 100%);
	border-radius: 15px;
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
	padding: 30px;
	max-width: 1100px;
	margin: 30px auto;
	position: relative;
	overflow: hidden;
}

.election-results-wrap * {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: 'Noto Kufi Arabic', sans-serif;
}

.election-results-wrap .header-section {
	background: linear-gradient(90deg, #3498db 0%, #1e90ff 100%);
	padding: 20px;
	text-align: center;
	border-radius: 10px;
	margin-bottom: 30px;
}

.election-results-wrap h2 {
	font-size: 32px;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
	text-transform: uppercase;
}

.election-results-wrap .ticker-section {
	background: #1e3a8a;
	color: #ffffff;
	padding: 15px;
	border-radius: 10px;
	margin-bottom: 30px;
	display: flex;
	justify-content: space-around;
	align-items: center;
	box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
	position: relative;
	z-index: 1;
	overflow: hidden;
}

.election-results-wrap .ticker-section:before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
	animation: votepulseShine 3s infinite;
}

@keyframes votepulseShine {
	0% { left: -100%; }
	20% { left: 100%; }
	100% { left: 100%; }
}

.election-results-wrap .ticker-item {
	text-align: center;
}

.election-results-wrap .ticker-label {
	font-size: 14px;
	text-transform: uppercase;
	opacity: 0.9;
	margin-bottom: 5px;
}

.election-results-wrap .ticker-value {
	font-size: 22px;
	font-weight: 700;
}

.election-results-wrap .results-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 25px;
	padding: 20px;
}

.election-results-wrap .candidate-card {
	background: #ffffff;
	border-radius: 12px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
	padding: 15px;
	width: 220px;
	text-align: center;
}

.election-results-wrap .candidate-image {
	width: 190px;
	height: 150px;
	object-fit: cover;
	border-radius: 10px;
	margin-bottom: 15px;
	border: 3px solid #e8f0fe;
}

.election-results-wrap .candidate-name {
	font-size: 18px;
	font-weight: 600;
	color: #2d3748;
	margin-bottom: 10px;
}

.election-results-wrap .candidate-votes {
	font-size: 24px;
	font-weight: 700;
	color: #1e3a8a;
	margin-bottom: 10px;
}

.election-results-wrap .candidate-percentage {
	font-size: 20px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 20px;
	background: #3498db;
	color: #ffffff;
}

.election-results-wrap .percentage-highest {
	background: #2ecc71;
}

@media (max-width: 768px) {
	.voting-container {
		padding: 15px;
		margin: 10px auto;
		max-width: 90%;
	}
	.voting-title { font-size: 22px; }
	.candidates-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
	.candidate-image { width: 100px; height: 150px; }
	.candidate-name { font-size: 12px; }
	.token-field, .email-field { max-width: 100%; }
	.vote-button { width: 100%; font-size: 14px; }
	.election-results-wrap .ticker-section { flex-direction: column; gap: 15px; }
	.election-results-wrap .ticker-value { font-size: 18px; }
}
