/* Motala Expo — Publikt formulär CSS */

#motalaexpo-form-container {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	max-width: 720px;
	margin: 0 auto;
	padding: 1rem;
	color: #1a1a1a;
	box-sizing: border-box;
}
#motalaexpo-form-container *, #motalaexpo-form-container *::before, #motalaexpo-form-container *::after {
	box-sizing: border-box;
}

/* Stegindikator — horisontell linje */
.mg-steps {
	margin-bottom: 2rem;
	padding: 0 0.5rem;
}
.mg-steps-list {
	display: flex;
	align-items: flex-start;
	list-style: none;
	margin: 0;
	padding: 0;
}
.mg-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
	flex: 1;
	min-width: 0;
}
.mg-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border-radius: 50%;
	font-size: 0.8125rem;
	font-weight: 700;
	background: #e5e7eb;
	color: #9ca3af;
	flex-shrink: 0;
	position: relative;
	z-index: 1;
	transition: all 0.2s;
}
.mg-step-title {
	display: block;
	font-size: 0.6875rem;
	color: #9ca3af;
	margin-top: 0.375rem;
	text-align: center;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	transition: color 0.2s;
}
/* Linje mellan stegen */
.mg-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 1rem;
	left: calc(50% + 1rem);
	right: calc(-50% + 1rem);
	height: 2px;
	background: #e5e7eb;
	z-index: 0;
	transition: background 0.2s;
}
/* Aktivt steg */
.mg-step-active .mg-step-number {
	background: #0E2E44;
	color: white;
	box-shadow: 0 0 0 4px rgba(14, 46, 68, 0.15);
}
.mg-step-active .mg-step-title {
	color: #0E2E44;
	font-weight: 600;
}
/* Klart steg */
.mg-step-done .mg-step-number {
	background: #15803d;
	color: white;
}
.mg-step-done .mg-step-title {
	color: #15803d;
}
.mg-step-done:not(:last-child)::after {
	background: #15803d;
}
@media (max-width: 640px) {
	.mg-step-title { font-size: 0.5625rem; }
	.mg-step-number { width: 1.75rem; height: 1.75rem; font-size: 0.75rem; }
	.mg-step:not(:last-child)::after { top: 0.875rem; left: calc(50% + 0.875rem); right: calc(-50% + 0.875rem); }
}

/* Sektion */
.mg-section-title {
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0 0 0.25rem;
}
.mg-section-desc {
	color: #6b7280;
	font-size: 0.875rem;
	margin: 0 0 1.5rem;
}

/* Fältlayout */
.mg-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.mg-field-full { grid-column: span 2; }
.mg-field-half { grid-column: span 1; }
@media (max-width: 640px) {
	.mg-fields { grid-template-columns: 1fr; gap: 0.5rem; }
	.mg-field-half,
	.mg-field-full { grid-column: span 1; }
	.mg-field-heading { margin: 0.25rem 0 0; }
	.mg-field-paragraph { margin: 0; }
	.mg-section-desc { margin-bottom: 0.75rem; }
}

/* Fält */
.mg-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 0.25rem;
	color: #374151;
}
.mg-required { color: #dc2626; margin-left: 0.25rem; }
.mg-label-price {
	font-weight: 400;
	font-size: 0.8125rem;
	color: #6b7280;
}
.mg-label-stock {
	font-weight: 400;
	font-size: 0.8125rem;
	color: #6b7280;
}
.mg-input, .mg-textarea, .mg-select {
	display: block;
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	color: #1a1a1a;
	background: white;
	transition: border-color 0.15s;
	font-family: inherit;
}
.mg-input:focus, .mg-textarea:focus, .mg-select:focus {
	outline: 2px solid #0E2E44;
	outline-offset: 1px;
	border-color: #0E2E44;
	box-shadow: 0 0 0 3px rgba(14, 46, 68, 0.1);
}
.mg-textarea { min-height: 80px; resize: vertical; }
.mg-field-error .mg-input,
.mg-field-error .mg-textarea,
.mg-field-error .mg-select {
	border-color: #dc2626;
}

/* Fullbokat fält */
.mg-input-soldout {
	background: #fef2f2;
	border-color: #fca5a5;
	color: #991b1b;
	opacity: 0.8;
	cursor: not-allowed;
}
.mg-input-soldout::placeholder {
	color: #dc2626;
	font-weight: 600;
}

/* Fieldset för radiogrupper */
.mg-fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

/* Radio & checkbox */
.mg-radio-group { display: flex; gap: 1rem; flex-wrap: wrap; }
.mg-radio-label, .mg-checkbox-label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	cursor: pointer;
}
.mg-radio, .mg-checkbox { width: 1rem; height: 1rem; accent-color: #0E2E44; }
.mg-radio:focus, .mg-checkbox:focus {
	outline: 2px solid #0E2E44;
	outline-offset: 2px;
}

/* PDF-länk vid kryssruta */
.mg-checkbox-pdf {
	display: inline-block;
	margin-top: 0.4rem;
	margin-left: 1.5rem;
	color: #0E2E44;
	text-decoration: underline;
	font-size: 0.85em;
}
.mg-checkbox-pdf:hover {
	color: #1a4a6a;
}

/* Fokusmarkering knappar */
.mg-btn:focus {
	outline: 2px solid #0E2E44;
	outline-offset: 2px;
}

/* Hjälptext och felmeddelanden */
.mg-help { display: block; font-size: 0.75rem; color: #9ca3af; margin-top: 0.25rem; }
.mg-error { display: block; font-size: 0.75rem; color: #dc2626; margin-top: 0.25rem; }

/* Dekorativa fält */
.mg-field-heading { font-size: 1rem; font-weight: 600; color: #1a1a1a; margin: 0.5rem 0 0; }
.mg-field-paragraph { font-size: 0.875rem; color: #6b7280; margin: 0; }

/* Sammanfattning */
.mg-summary {
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
}
.mg-summary-title {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.75rem;
	color: #1a1a1a;
}
.mg-summary-group {
	margin-bottom: 0.75rem;
}
.mg-summary-group:last-child {
	margin-bottom: 0;
}
.mg-summary-heading {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	margin-bottom: 0.25rem;
}
.mg-summary-row {
	font-size: 0.875rem;
	padding: 0.125rem 0;
	color: #374151;
}
.mg-summary-label {
	font-weight: 500;
}

/* Totalkostnad */
.mg-total {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	margin-top: 1.5rem;
	font-size: 1rem;
}
.mg-total strong { font-size: 1.25rem; color: #1a1a1a; }

/* Navigation */
.mg-nav {
	display: flex;
	align-items: center;
	margin-top: 1.5rem;
	gap: 0.75rem;
}
.mg-nav-spacer { flex: 1; }
.mg-btn {
	padding: 0.625rem 1.5rem;
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	border: none;
	transition: all 0.15s;
	font-family: inherit;
}
.mg-btn-primary { background: #0E2E44; color: white; }
.mg-btn-primary:hover { background: #091e2d; }
.mg-btn-primary:disabled { background: #5a7d91; cursor: not-allowed; }
.mg-btn-secondary { background: #f3f4f6; color: #374151; }
.mg-btn-secondary:hover { background: #e5e7eb; }

/* Bekräftelse */
.mg-form-success { text-align: center; padding: 3rem 1rem; }
.mg-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border-radius: 50%;
	background: #dcfce7;
	color: #15803d;
	font-size: 2rem;
	margin-bottom: 1rem;
}
.mg-form-success h2 { font-size: 1.25rem; font-weight: 600; color: #1a1a1a; }
