/* Voting System - Voter Templates Styles */

* {
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
}

html {
	height: 100%;
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f5f5f5;
	min-height: 100vh;
}

/* ============================================
   Layout - Centered containers
   ============================================ */

body.voting-centered {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

body.voting-centered.pin-view {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.container,
.card {
	background-color: white;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	width: 100%;
	max-width: 500px;
}

.card {
	padding: 32px 24px;
	border-radius: 16px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
	max-width: 400px;
}

.container {
	padding: 40px 30px;
	text-align: center;
}

/* ============================================
   Typography
   ============================================ */

h1,
h2 {
	margin: 0 0 24px 0;
	font-weight: 600;
	line-height: 1.3;
}

h1 {
	font-size: 28px;
}

h2 {
	font-size: 24px;
	color: #1a1a1a;
	text-align: center;
}

.voting-title {
	text-align: center;
	font-size: 16px;
	font-weight: 500;
	color: #555;
	margin: 0 0 20px 0;
	word-break: break-word;
}

p {
	margin: 16px 0;
	line-height: 1.6;
	font-size: 15px;
	color: #333;
}

/* ============================================
   Icons
   ============================================ */

.warning-icon,
.error-icon,
.success-icon {
	font-size: 64px;
	margin-bottom: 24px;
	display: block;
}

.warning-icon,
.error-icon {
	color: #dc3545;
}

.success-icon {
	color: #28a745;
}

/* ============================================
   Message boxes
   ============================================ */

.info-box,
.error-box,
.info,
.error {
	margin: 24px 0;
	padding: 20px;
	border-radius: 8px;
	border-left: 4px solid;
	line-height: 1.5;
}

.info-box {
	background-color: #d4edda;
	border-left-color: #28a745;
	color: #155724;
}

.error-box {
	background-color: #f8d7da;
	border-left-color: #dc3545;
	color: #721c24;
}

.info {
	background-color: #e7f3ff;
	border-left-color: #0b4f8a;
	color: #0b4f8a;
	font-size: 14px;
	margin: 20px 0;
	padding: 14px 16px;
}

.error {
	background-color: #f8d7da;
	border-left-color: #842029;
	color: #842029;
	font-size: 14px;
	margin: 20px 0;
	padding: 14px 16px;
}

.info-box p,
.error-box p {
	margin: 12px 0;
	font-weight: 600;
	font-size: 15px;
}

.info-box ul,
.error-box ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.error-box ul {
	list-style: disc;
	padding-left: 20px;
	margin: 12px 0;
}

.info-box li,
.error-box li {
	padding: 6px 0;
	line-height: 1.6;
	font-size: 15px;
}

.error-box li {
	margin: 8px 0;
	padding: 0;
}

/* ============================================
   Forms
   ============================================ */

form {
	margin-top: 24px;
}

label {
	display: block;
	margin: 0 0 8px 0;
	font-weight: 600;
	font-size: 14px;
	color: #333;
}

input[type="text"],
input[type="checkbox"],
input[type="radio"],
textarea {
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s;
}

input[type="text"] {
	width: 100%;
	padding: 16px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-size: 32px;
	font-weight: 600;
	letter-spacing: 8px;
	text-align: center;
	color: #1a1a1a;
}

input[type="text"]:focus {
	outline: none;
	border-color: #007bff;
	background-color: #f8f9ff;
}

input[type="text"]::placeholder {
	color: #999;
	letter-spacing: 8px;
}

/* ============================================
   Buttons
   ============================================ */

button,
.btn {
	display: inline-block;
	padding: 14px 32px;
	background-color: #007bff;
	color: white;
	text-decoration: none;
	border-radius: 8px;
	border: none;
	font-weight: 600;
	font-size: 15px;
	cursor: pointer;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s, transform 0.2s;
	margin-top: 24px;
	-webkit-appearance: none;
	appearance: none;
}

button {
	width: 100%;
	margin-top: 24px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	box-shadow: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

button:hover,
.btn:hover {
	background-color: #0056b3;
}

button:active,
.btn:active {
	transform: translateY(2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ============================================
   Voting Form Questions
   ============================================ */

.question {
	margin: 24px 0;
	padding: 20px;
	background-color: #f8f9fa;
	border-radius: 12px;
	border: 1px solid #e9ecef;
}

.question-text {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 16px;
	color: #1a1a1a;
	line-height: 1.4;
}

.option {
	margin: 12px 0;
}

.option label {
	display: block;
	padding: 14px 16px;
	background-color: white;
	border: 2px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
	user-select: none;
	min-height: 48px;
	display: flex;
	align-items: center;
	font-size: 15px;
}

.option label:active {
	background-color: #f0f8ff;
	border-color: #007bff;
}

.option input[type="radio"],
.option input[type="checkbox"] {
	margin-right: 12px;
	width: 20px;
	height: 20px;
	cursor: pointer;
	flex-shrink: 0;
	border: 2px solid #ddd;
	border-radius: 4px;
	background: white;
	transition: all 0.2s;
}

.option input[type="radio"] {
	border-radius: 50%;
}

.option input[type="radio"]:checked,
.option input[type="checkbox"]:checked {
	background-color: #007bff;
	border-color: #007bff;
}

.option textarea {
	width: 100%;
	min-height: 120px;
	padding: 12px;
	border: 2px solid #ddd;
	border-radius: 8px;
	font-family: inherit;
	font-size: 15px;
	resize: vertical;
	-webkit-appearance: none;
	appearance: none;
}

.option textarea:focus {
	outline: none;
	border-color: #007bff;
	background-color: #f8f9ff;
}

/* ============================================
   Voting Info Display
   ============================================ */

.vote-info {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin-bottom: 12px;
}

.vote-info div {
	display: flex;
	flex-direction: column;
}

.vote-info dt {
	font-weight: 600;
	font-size: 13px;
	color: #666;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}

.vote-info dd {
	font-size: 15px;
	color: #1a1a1a;
	margin: 0;
	font-weight: 500;
}

.time-remaining {
	font-size: 18px;
	color: #dc3545;
	font-weight: 700;
	margin: 12px 0 8px 0;
}

.note {
	color: #666;
	font-size: 13px;
	margin-top: 24px;
	line-height: 1.6;
}

/* ============================================
   Footer/Note styling
   ============================================ */

.warning-box {
	background-color: #fff3cd;
	border-left: 4px solid #ffc107;
	padding: 16px;
	margin: 16px 0;
	border-radius: 8px;
	font-size: 15px;
}

/* ============================================
   Mobile optimizations (< 600px)
   ============================================ */

@media (max-width: 600px) {
	body {
		padding: 16px;
	}

	.container,
	.card {
		padding: 32px 20px;
		border-radius: 8px;
	}

	h1 {
		font-size: 24px;
		margin-bottom: 20px;
	}

	h2 {
		font-size: 20px;
		margin-bottom: 12px;
	}

	.warning-icon,
	.error-icon,
	.success-icon {
		font-size: 56px;
		margin-bottom: 20px;
	}

	.voting-title {
		font-size: 15px;
		margin-bottom: 16px;
	}

	.info-box,
	.error-box {
		padding: 16px;
		margin: 20px 0;
	}

	.info,
	.error {
		font-size: 13px;
		padding: 12px 14px;
		margin: 16px 0;
	}

	.info-box p,
	.error-box p,
	.info-box li,
	.error-box li,
	.error-box p,
	.error-box li,
	p {
		font-size: 14px;
	}

	p {
		margin: 12px 0;
	}

	.info-box li {
		padding: 5px 0;
	}

	input[type="text"] {
		font-size: 28px;
		padding: 14px;
		letter-spacing: 6px;
	}

	input[type="text"]::placeholder {
		letter-spacing: 6px;
	}

	button,
	.btn {
		width: 100%;
		padding: 14px 16px;
		margin-top: 20px;
		font-size: 14px;
	}

	.vote-info {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.vote-info dt {
		font-size: 12px;
	}

	.vote-info dd {
		font-size: 14px;
	}

	.question {
		padding: 16px;
		margin: 20px 0;
	}

	.question-text {
		font-size: 15px;
		margin-bottom: 14px;
	}

	.option label {
		padding: 12px 14px;
		min-height: 44px;
		font-size: 14px;
	}

	.option input[type="radio"],
	.option input[type="checkbox"] {
		width: 18px;
		height: 18px;
		margin-right: 10px;
	}

	.option textarea {
		min-height: 100px;
		font-size: 14px;
		padding: 10px;
	}

	.time-remaining {
		font-size: 16px;
	}

	.note {
		font-size: 12px;
		margin-top: 20px;
	}
}

/* ============================================
   Large monitors (> 900px)
   ============================================ */

@media (min-width: 900px) {
	.container,
	.card {
		padding: 50px 40px;
	}

	h1 {
		font-size: 32px;
		margin-bottom: 30px;
	}

	h2 {
		font-size: 28px;
		margin-bottom: 20px;
	}

	.warning-icon,
	.error-icon,
	.success-icon {
		font-size: 80px;
		margin-bottom: 30px;
	}

	.info-box,
	.error-box {
		padding: 24px;
		margin: 30px 0;
	}

	.info-box p,
	.error-box p,
	.info-box li,
	.error-box li,
	p {
		font-size: 16px;
	}

	p {
		margin: 18px 0;
	}

	.info-box li {
		padding: 8px 0;
	}

	button,
	.btn {
		padding: 16px 40px;
		margin-top: 30px;
		font-size: 16px;
	}

	.vote-info dt {
		font-size: 13px;
	}

	.vote-info dd {
		font-size: 16px;
	}

	.question {
		padding: 24px;
		margin: 30px 0;
	}

	.question-text {
		font-size: 17px;
		margin-bottom: 18px;
	}

	.note {
		font-size: 14px;
		margin-top: 30px;
	}
}

/* ============================================
   Safe area for notches and rounded corners
   ============================================ */

@supports (padding: max(0px)) {
	body {
		padding-left: max(20px, env(safe-area-inset-left));
		padding-right: max(20px, env(safe-area-inset-right));
		padding-bottom: max(20px, env(safe-area-inset-bottom));
	}

	button,
	.btn {
		margin-bottom: max(16px, env(safe-area-inset-bottom));
	}
}
