/* EMSNext Survey Styles */

/* ==================== */
/* Front-End Form       */
/* ==================== */

.next-form-wrap {
	max-width: 640px;
	background: #f9fafb;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 2em 2.5em;
	box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.next-field {
	margin-bottom: 1.6em;
}

.next-label {
	display: block;
	font-weight: 600;
	font-size: 0.93em;
	margin-bottom: 0.4em;
	color: #2d3748;
}

.next-input {
	width: 100%;
	padding: 0.55em 0.7em;
	box-sizing: border-box;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	font-size: 0.9em;
	background: #fff;
	transition: border-color 0.2s;
}

.next-input:focus {
	outline: none;
	border-color: #194077;
	box-shadow: 0 0 0 2px rgba(25,64,119,0.12);
}

select.next-input {
	appearance: auto;
}

select.next-input[multiple] {
	height: auto;
	min-height: 120px;
}

textarea.next-input {
	resize: vertical;
}

/* Options: checkboxes and radios */
.next-options {
	display: flex;
	flex-direction: column;
	gap: 0.35em;
}

.next-option {
	font-weight: normal;
	font-size: 0.9em;
	cursor: pointer;
	padding: 0.3em 0.5em;
	border-radius: 4px;
	transition: background 0.15s;
}

.next-option:hover {
	background: #edf2f7;
}

/* Yes/No radios: display inline */
.next-field-radio .next-options {
	flex-direction: row;
	gap: 1.2em;
}

/* Rating scale */
.next-rating {
	display: flex;
	gap: 0;
	background: #edf2f7;
	border-radius: 6px;
	overflow: hidden;
	border: 1px solid #cbd5e0;
}

.next-rating-option {
	flex: 1;
	text-align: center;
	font-weight: normal;
	font-size: 0.82em;
	cursor: pointer;
	padding: 0.6em 0.3em;
	transition: background 0.15s, color 0.15s;
	border-right: 1px solid #cbd5e0;
}

.next-rating-option:last-child {
	border-right: none;
}

.next-rating-option:hover {
	background: #dbe4f0;
}

.next-rating-option input[type="radio"] {
	display: block;
	margin: 0 auto 0.25em auto;
}

/* Progress bar */
.next-form-progress {
	margin-bottom: 1.2em;
}

.next-form-progress-text {
	font-size: 0.82em;
	color: #718096;
	margin-bottom: 0.35em;
}

.next-form-progress-bar {
	background: #e2e8f0;
	border-radius: 6px;
	height: 6px;
	overflow: hidden;
}

.next-form-progress-fill {
	background: linear-gradient(90deg, #194077, #2c5aa0);
	height: 100%;
	border-radius: 6px;
	transition: width 0.3s ease;
}

/* Subheader */
.next-form-subheader {
	font-size: 1.1em;
	color: #194077;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 0.4em;
	margin-bottom: 1.2em;
	margin-top: 0;
}

/* Navigation buttons */
.next-form-nav {
	margin-top: 2em;
	padding-top: 1.2em;
	border-top: 1px solid #e2e8f0;
	display: flex;
	gap: 0.6em;
}

.next-submit,
.next-btn-next {
	padding: 0.6em 2em;
	font-size: 0.9em;
	cursor: pointer;
	background: #194077;
	color: #fff;
	border: 2px solid #194077;
	border-radius: 6px;
	font-weight: 600;
	transition: background 0.2s, transform 0.1s;
}

.next-submit:hover,
.next-btn-next:hover {
	background: #0f2d54;
	border-color: #0f2d54;
}

.next-submit:active,
.next-btn-next:active {
	transform: translateY(1px);
}

.next-btn-prev {
	padding: 0.6em 2em;
	font-size: 0.9em;
	cursor: pointer;
	background: #fff;
	color: #194077;
	border: 2px solid #194077;
	border-radius: 6px;
	font-weight: 600;
	transition: background 0.2s;
}

.next-btn-prev:hover {
	background: #edf2f7;
}

/* Success / Error messages */
.next-success {
	color: #2e7d32;
	font-weight: 600;
	font-size: 1.05em;
	text-align: center;
	padding: 1.5em 0;
}

.next-error {
	color: #c62828;
	font-weight: 600;
	font-size: 0.95em;
}

/* ========================= */
/* Summary Dashboard Styles  */
/* ========================= */

.next-summary-wrap {
	max-width: 1200px;
	margin: 0 auto;
}

.next-summary-header {
	text-align: center;
	margin-bottom: 1.5em;
}

.next-summary-header h2 {
	font-size: 1.6em;
	color: #194077;
	margin-bottom: 0.3em;
}

.next-summary-total {
	display: inline-block;
	font-size: 0.9em;
	color: #fff;
	background: #194077;
	padding: 0.35em 1.2em;
	border-radius: 20px;
}

/* Tabs */
.next-summary-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3em;
	margin-bottom: 1.5em;
	border-bottom: 2px solid #e2e8f0;
	padding-bottom: 0;
}

.next-summary-tab {
	padding: 0.5em 1em;
	border: 1px solid #e2e8f0;
	border-bottom: none;
	background: #f7fafc;
	color: #555;
	font-size: 0.82em;
	cursor: pointer;
	border-radius: 6px 6px 0 0;
	margin-bottom: -2px;
	transition: background 0.2s, color 0.2s;
}

.next-summary-tab:hover {
	background: #edf2f7;
	color: #2d3748;
}

.next-summary-tab-active {
	background: #194077;
	color: #fff;
	border-color: #194077;
	border-bottom: 2px solid #194077;
}

.next-summary-tab-active:hover {
	background: #194077;
	color: #fff;
}

/* Grid */
.next-summary-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.2em;
	align-items: start;
}

.next-summary-divider {
	border: none;
	border-top: 2px solid #e2e8f0;
	margin: 2em 0;
}

/* Cards */
.next-summary-card {
	background: #fff;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 1px 6px rgba(0,0,0,0.07);
	padding: 1em;
	transition: transform 0.2s, box-shadow 0.2s;
	min-height: 360px;
	display: flex;
	flex-direction: column;
}

.next-summary-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.next-summary-card-wide {
	grid-column: 1 / -1;
	min-height: auto;
}

.next-summary-card-title {
	font-size: 0.82em;
	text-align: center;
	color: #2d3748;
	margin: 0 0 0.6em 0;
	line-height: 1.3;
	min-height: 2.6em;
	display: flex;
	align-items: center;
	justify-content: center;
}

.next-summary-banner {
	background: linear-gradient(135deg, #194077, #2c5aa0);
	color: #fff;
	text-align: center;
	padding: 0.4em 0.8em;
	border-radius: 4px;
	font-size: 0.78em;
	margin-bottom: 0.6em;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.next-summary-banner:hover {
	white-space: normal;
	overflow: visible;
}

.next-banner-prefix {
	opacity: 0.65;
}

.next-banner-value {
	font-weight: 700;
}

.next-banner-pct {
	opacity: 0.75;
	font-weight: 400;
}

.next-summary-chart-wrap {
	position: relative;
	flex: 1;
}

/* Comments */
.next-summary-comments-search {
	margin-bottom: 0.8em;
}

.next-summary-search-input {
	width: 100%;
	padding: 0.5em 0.7em;
	border: 1px solid #cbd5e0;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 0.85em;
}

.next-summary-search-input:focus {
	outline: none;
	border-color: #194077;
	box-shadow: 0 0 0 2px rgba(25,64,119,0.12);
}

.next-summary-comments-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.next-summary-comment {
	padding: 0.6em 1em;
	border-left: 3px solid #2c5aa0;
	background: #f7fafc;
	font-size: 0.85em;
	line-height: 1.4;
}

.next-summary-comment:nth-child(even) {
	background: #edf2f7;
}

/* Responsive */
@media (max-width: 900px) {
	.next-summary-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.next-summary-grid {
		grid-template-columns: 1fr;
	}

	.next-form-wrap {
		padding: 1.2em 1.5em;
	}

	.next-summary-tabs {
		gap: 0.2em;
	}

	.next-summary-tab {
		font-size: 0.75em;
		padding: 0.4em 0.7em;
	}
}
