/**
 * Limenco Multipage Forms - Frontend Styles
 */

/* Main wrapper */
.limenco-mpf-wrapper,
.limenco-mpf-widget-wrapper {
	position: relative;
	width: 100%;
	margin: 0 auto;
}

/* Form container */
.limenco-mpf-form-container {
	position: relative;
}

/* Page wrapper */
.limenco-mpf-page {
	display: none !important;
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
	position: relative;
	overflow: hidden;
}

.limenco-mpf-page-active {
	display: block !important;
	opacity: 1;
}

/* Ensure file upload fields stay contained */
.limenco-mpf-page input[type="file"],
.limenco-mpf-page .wpcf7-file,
.limenco-mpf-page .wpcf7-form-control-wrap {
	position: relative;
	max-width: 100%;
}

/* Hide page breaks (they're just markers) */
.limenco-mpf-page-break {
	display: none !important;
}

/* Progress Bar Styles */
.limenco-mpf-progress-wrapper {
	margin: 20px 0;
}

.limenco-mpf-progress-above {
	margin-bottom: 30px;
}

.limenco-mpf-progress-below {
	margin-top: 30px;
}

/* Bar Style */
.limenco-mpf-progress-bar {
	width: 100%;
	height: 8px;
	background-color: #e0e0e0;
	border-radius: 4px;
	overflow: hidden;
	position: relative;
	box-shadow: none;
}

.limenco-mpf-progress-fill {
	height: 100%;
	background-color: #0073aa;
	transition: width 0.4s ease-in-out;
	position: relative;
	min-width: 0;
	border-radius: 4px;
}

.limenco-mpf-progress-text {
	display: none; /* Hide percentage inside bar */
}

.limenco-mpf-progress-label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 8px;
	font-size: 13px;
	color: #666;
}

.limenco-mpf-page-indicator {
	font-weight: 600;
	color: #333;
}

.limenco-mpf-progress-percentage {
	font-weight: 600;
	color: #0073aa;
}

.limenco-mpf-current,
.limenco-mpf-total {
	font-weight: 700;
	color: #0073aa;
}

/* Page names below progress bar */
.limenco-mpf-progress-pages {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 11px;
	color: #999;
}

.limenco-mpf-page-name {
	flex: 1;
	text-align: center;
	padding: 0 5px;
	transition: all 0.3s ease;
}

.limenco-mpf-page-name.active {
	color: #0073aa;
	font-weight: 600;
}

.limenco-mpf-page-name.completed {
	color: #666;
}

/* Steps Style */
.limenco-mpf-progress-steps {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px 0;
	--progress-color: #0073aa;
}

.limenco-mpf-step {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	position: relative;
}

.limenco-mpf-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 20px;
	left: 50%;
	width: 100%;
	height: 2px;
	background-color: #e0e0e0;
	z-index: 0;
}

.limenco-mpf-step.completed::after {
	background-color: var(--progress-color);
}

.limenco-mpf-step-circle {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background-color: #e0e0e0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 600;
	color: #666;
	position: relative;
	z-index: 1;
	transition: all 0.3s ease;
}

.limenco-mpf-step.active .limenco-mpf-step-circle {
	background-color: var(--progress-color);
	color: #ffffff;
	transform: scale(1.1);
}

.limenco-mpf-step.completed .limenco-mpf-step-circle {
	background-color: var(--progress-color);
	color: #ffffff;
}

.limenco-mpf-step-label {
	margin-top: 8px;
	font-size: 12px;
	color: #666;
	text-align: center;
}

.limenco-mpf-step.active .limenco-mpf-step-label {
	color: var(--progress-color);
	font-weight: 600;
}

/* Dots Style */
.limenco-mpf-progress-dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
	--progress-color: #0073aa;
}

.limenco-mpf-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: #e0e0e0;
	transition: all 0.3s ease;
	cursor: pointer;
}

.limenco-mpf-dot.active {
	background-color: var(--progress-color);
	transform: scale(1.3);
}

.limenco-mpf-dot.completed {
	background-color: var(--progress-color);
	opacity: 0.6;
}

/* Save/Resume Buttons */
.limenco-mpf-save-buttons {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin: 15px 0;
	padding: 15px;
	background: #f9f9f9;
	border-radius: 4px;
}

.limenco-mpf-save-progress,
.limenco-mpf-clear-saved {
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	background-color: #fff;
	color: #333;
}

.limenco-mpf-save-progress:hover {
	background-color: #0073aa;
	color: #fff;
	border-color: #0073aa;
}

.limenco-mpf-clear-saved:hover {
	background-color: #dc3232;
	color: #fff;
	border-color: #dc3232;
}

.limenco-mpf-save-message {
	padding: 12px 16px;
	margin: 10px 0;
	border-radius: 4px;
	font-size: 14px;
	text-align: center;
	animation: limenco-mpf-slide-in 0.3s ease-out;
}

.limenco-mpf-save-success {
	background-color: #d4edda;
	border: 1px solid #c3e6cb;
	color: #155724;
}

.limenco-mpf-save-error {
	background-color: #f8d7da;
	border: 1px solid #f5c6cb;
	color: #721c24;
}

.limenco-mpf-save-info {
	background-color: #d1ecf1;
	border: 1px solid #bee5eb;
	color: #0c5460;
}

/* Restore Popup Modal */
.limenco-mpf-restore-popup {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.limenco-mpf-restore-popup.show {
	display: flex;
	opacity: 1;
}

.limenco-mpf-restore-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	cursor: pointer;
}

.limenco-mpf-restore-modal {
	position: relative;
	background-color: #fff;
	border-radius: 8px;
	padding: 30px;
	max-width: 550px;
	width: 90%;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	text-align: center;
	z-index: 1;
	transform: scale(0.9);
	transition: transform 0.3s ease;
}

@media (min-width: 769px) {
	.limenco-mpf-restore-modal {
		max-width: 600px;
		width: auto;
		min-width: 500px;
	}
}

.limenco-mpf-restore-popup.show .limenco-mpf-restore-modal {
	transform: scale(1);
}

.limenco-mpf-restore-close {
	position: absolute;
	top: 15px;
	right: 15px;
	background: none;
	border: none;
	font-size: 32px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	transition: all 0.2s ease;
	z-index: 10;
}

.limenco-mpf-restore-close:hover {
	background: #f0f0f1;
	color: #333;
}

.limenco-mpf-restore-close:focus {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
}

.limenco-mpf-restore-icon {
	width: 60px;
	height: 60px;
	margin: 0 auto 20px;
	background-color: #f0f8ff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.limenco-mpf-restore-icon svg {
	width: 30px;
	height: 30px;
	stroke: #0073aa;
}

.limenco-mpf-restore-modal h3 {
	margin: 0 0 15px 0;
	font-size: 22px;
	font-weight: 600;
	color: #333;
}

.limenco-mpf-restore-modal p {
	margin: 0 0 25px 0;
	font-size: 15px;
	line-height: 1.6;
	color: #666;
}

.limenco-mpf-restore-buttons {
	display: flex;
	gap: 12px;
	justify-content: center;
	flex-wrap: nowrap;
}

.limenco-mpf-restore-yes,
.limenco-mpf-restore-no {
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid #ddd;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s ease;
	background-color: transparent;
	color: #333;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	flex-shrink: 0;
}

.limenco-mpf-restore-yes {
	background-color: #0073aa;
	border-color: #0073aa;
	color: #fff;
}

.limenco-mpf-restore-yes:hover {
	background-color: #005a87;
	border-color: #005a87;
}

.limenco-mpf-restore-no:hover {
	border-color: #999;
	color: #666;
}

.limenco-mpf-restore-yes svg,
.limenco-mpf-restore-no svg {
	width: 16px;
	height: 16px;
}

.limenco-mpf-save-link {
	text-align: right;
	margin-bottom: 15px;
	padding: 0;
	background: transparent;
	border: none;
}

.limenco-mpf-save-trigger {
	color: #0073aa;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.limenco-mpf-save-trigger:hover {
	color: #005a87;
}

.limenco-mpf-save-trigger svg,
.limenco-mpf-restore-yes svg,
.limenco-mpf-restore-no svg,
.limenco-mpf-save-restore p svg {
	width: 16px;
	height: 16px;
	stroke-width: 2;
}

@keyframes limenco-mpf-slide-in {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Navigation Buttons */
.limenco-mpf-navigation {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	margin-top: 0px;
	padding-top: 0;
	border-top: none;
}

/* Right align next button when it's the only visible button (first page) */
.limenco-mpf-navigation .limenco-mpf-prev[style*="display: none"] ~ .limenco-mpf-next {
	margin-left: auto;
}

.limenco-mpf-btn {
	padding: 12px 30px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	background-color: #0073aa;
	color: #ffffff;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.limenco-mpf-btn:hover {
	background-color: #005a87;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.limenco-mpf-btn:active {
	transform: translateY(0);
}

.limenco-mpf-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.limenco-mpf-prev {
	background-color: #666;
}

.limenco-mpf-prev:hover {
	background-color: #555;
}

.limenco-mpf-submit {
	background-color: #28a745;
}

.limenco-mpf-submit:hover {
	background-color: #218838;
}

/* Button Styles */
.limenco-mpf-button-style-rounded .limenco-mpf-btn {
	border-radius: 25px;
}

.limenco-mpf-button-style-square .limenco-mpf-btn {
	border-radius: 0;
}

/* Loading State */
.limenco-mpf-loading {
	position: relative;
	pointer-events: none;
	opacity: 0.6;
}

.limenco-mpf-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 30px;
	height: 30px;
	margin: -15px 0 0 -15px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #0073aa;
	border-radius: 50%;
	animation: limenco-mpf-spin 1s linear infinite;
}

@keyframes limenco-mpf-spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Validation Messages */
.limenco-mpf-validation-error {
	color: #dc3232;
	font-size: 14px;
	margin-top: 5px;
	padding: 8px 12px;
	background-color: #fef7f7;
	border-left: 3px solid #dc3232;
	border-radius: 3px;
	display: block;
	line-height: 1.4;
}

/* Ensure validation errors are visible */
.wpcf7-form-control-wrap .limenco-mpf-validation-error {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Responsive */
@media (max-width: 768px) {
	.limenco-mpf-save-buttons {
		flex-direction: column;
	}
	
	.limenco-mpf-save-progress,
	.limenco-mpf-clear-saved {
		width: 100%;
	}
	
	.limenco-mpf-navigation {
		flex-direction: column;
	}
	
	.limenco-mpf-btn {
		width: 100%;
	}
	
	.limenco-mpf-progress-steps {
		padding: 15px 0;
	}
	
	.limenco-mpf-step-circle {
		width: 30px;
		height: 30px;
		font-size: 12px;
	}
	
	.limenco-mpf-step-label {
		font-size: 10px;
	}
	
	.limenco-mpf-step:not(:last-child)::after {
		top: 15px;
	}
}

/* Contact Form 7 Integration */
.wpcf7-form .limenco-mpf-page {
	/* Ensure CF7 styles don't conflict */
}

.wpcf7-form .limenco-mpf-navigation {
	/* Override CF7 submit button styles if needed */
}

/* Hide CF7 default submit button when using multipage */
.limenco-mpf-wrapper .wpcf7-submit,
.limenco-mpf-widget-wrapper .wpcf7-submit {
	display: none !important;
}

/* CF7 Response Messages - No styling, let CF7/theme handle it */

/* CF7 Validation Errors on Fields */
.limenco-mpf-wrapper .wpcf7-not-valid-tip,
.limenco-mpf-widget-wrapper .wpcf7-not-valid-tip {
	color: #dc3232;
	font-size: 13px;
	display: block;
	margin-top: 5px;
}

.limenco-mpf-wrapper .wpcf7-not-valid,
.limenco-mpf-widget-wrapper .wpcf7-not-valid {
	border-color: #dc3232 !important;
}

/* Hide CF7 spinner completely until form is submitting */
.limenco-mpf-wrapper .wpcf7-spinner,
.limenco-mpf-widget-wrapper .wpcf7-spinner {
	display: none;
	margin: 0;
}

.limenco-mpf-wrapper form.submitting .wpcf7-spinner,
.limenco-mpf-widget-wrapper form.submitting .wpcf7-spinner {
	display: inline-block;
	margin: 0 0 0 10px;
}

/* Animation for page transitions */
@keyframes limenco-mpf-fade-in {
	from {
		opacity: 0;
		transform: translateX(20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

@keyframes limenco-mpf-fade-out {
	from {
		opacity: 1;
		transform: translateX(0);
	}
	to {
		opacity: 0;
		transform: translateX(-20px);
	}
}

.limenco-mpf-page-entering {
	animation: limenco-mpf-fade-in 0.3s ease-in-out;
}

.limenco-mpf-page-leaving {
	animation: limenco-mpf-fade-out 0.3s ease-in-out;
}

/* Guidelines Popup - Minimal Structure */
.limenco-mpf-guidelines-popup {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	max-width: none !important;
	margin: 0 !important;
	z-index: 999999 !important;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.limenco-mpf-guidelines-popup.show {
	display: flex !important;
}

.limenco-mpf-guidelines-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	cursor: pointer;
}

.limenco-mpf-guidelines-modal {
	position: relative;
	background-color: #fff;
	max-height: 90vh;
	overflow-y: auto;
	z-index: 2;
	width: 100%;
	max-width: 600px;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.limenco-mpf-guidelines-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin: 0;
	padding: 0;
	border: none;
}

.limenco-mpf-guidelines-title {
	margin: 0;
	padding: 0;
	font-size: 20px;
}

.limenco-mpf-guidelines-close {
	background: none;
	border: none;
	font-size: 30px;
	cursor: pointer;
	padding: 0;
	margin: 0;
	line-height: 1;
	width: 30px;
	height: 30px;
}

.limenco-mpf-guidelines-body {
	overflow-y: auto;
	max-height: 60vh;
	margin: 0;
	padding: 0;
}

.limenco-mpf-guidelines-footer {
	margin: 0;
	padding: 0;
	border: none;
	text-align: right;
}

.limenco-mpf-guidelines-close-btn {
	padding: 10px 20px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	margin: 0;
}

/* Guidelines wrapper - float right */
.limenco-mpf-guidelines-wrapper {
	display: inline-block;
	float: right;
	margin-left: 10px;
}

/* Guidelines trigger - inline text style */
.limenco-mpf-guidelines-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 0;
	background: none;
	border: none;
	color: #0073aa;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	text-decoration: underline;
	text-transform: none;
	transition: color 0.2s ease;
}

.limenco-mpf-guidelines-trigger:hover {
	color: #005a87;
	background: none;
}

.limenco-mpf-guidelines-trigger svg {
	width: 16px;
	height: 16px;
}



/* File Upload Enhancement - Modern Grey Dashed Style */
.limenco-mpf-hidden-input {
	position: absolute !important;
	opacity: 0 !important;
	width: 0.1px !important;
	height: 0.1px !important;
	overflow: hidden !important;
	z-index: -1 !important;
	top: 0 !important;
	left: 0 !important;
	pointer-events: none !important;
}

.limenco-mpf-file-upload-wrapper {
	display: block;
	width: 100%;
	padding: 32px 12px;
	border: 2px dashed #ccc;
	border-radius: 8px;
	background-color: #f9f9f9;
	transition: all 0.2s ease;
	cursor: pointer;
}

.limenco-mpf-file-upload-wrapper:hover {
	border-color: #999;
	background-color: #f3f3f3;
}

.limenco-mpf-file-upload-wrapper.has-file {
	border-color: #2563EB;
	background-color: #f0f6ff;
}

.limenco-mpf-file-button {
	background: #e5e7eb;
	border: 1px solid #ccc;
	border-radius: 6px;
	padding: 6px 12px;
	margin-right: 10px;
	font-size: 13px;
	color: #333;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
	text-transform: none;
}

.limenco-mpf-file-button:hover {
	background: #2563EB;
	color: #fff;
	border-color: #2563EB;
}

.limenco-mpf-file-text {
	color: #555;
	font-size: 14px;
}

.limenco-mpf-file-upload-wrapper.has-file .limenco-mpf-file-text {
	color: #2563EB;
	font-weight: 500;
}

/* Tagify Taxonomy Field Styles - Minimal Plain */
.limenco-tagify-dropdown {
	z-index: 9999;
}

/* Tagify field styling - minimal */
tags.tagify {
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 5px;
	min-height: 45px;
	background: transparent;
}

tags.tagify:hover {
	border-color: #999;
}

tags.tagify:focus-within {
	border-color: #999;
	box-shadow: none;
}

/* Invalid state */
.wpcf7-not-valid tags.tagify {
	border-color: #dc3232;
}

/* Tag styling - plain pill shape, inherits site colors */
tags.tagify tag {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
	border-radius: 20px;
	padding: 4px 10px;
	margin: 2px;
	display: inline-flex;
	align-items: center;
	vertical-align: middle;
}

tags.tagify tag:hover {
	background: rgba(0, 0, 0, 0.05);
}

tags.tagify tag > div {
	color: inherit;
	padding: 0;
	margin: 0;
	line-height: 1.4;
}

tags.tagify tag > div::before {
	display: none;
}

/* Remove button - plain */
tags.tagify tag x,
tags.tagify tag .tagify__tag__removeBtn {
	background: transparent !important;
	color: inherit !important;
	opacity: 0.6;
	margin-left: 5px;
	padding: 0;
	width: auto;
	height: auto;
	border: none;
	box-shadow: none !important;
}

tags.tagify tag x:hover,
tags.tagify tag .tagify__tag__removeBtn:hover {
	opacity: 1;
	background: transparent !important;
	color: inherit !important;
}

tags.tagify tag .tagify__tag__removeBtn::after {
	background: transparent !important;
	color: inherit !important;
}

/* Input placeholder */
tags.tagify input {
	color: inherit;
}

tags.tagify input::placeholder {
	color: #999;
}
