/**
 * NexForm Pro - Frontend Public Stylesheet
 * Responsive, Modern, Clean Form Theme matching Elementor / Pro design
 */

.nexform-container {
	width: 100%;
	max-width: 100%;
	margin: 20px 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.nexform-container * {
	box-sizing: border-box;
}

.nexform-grid {
	display: flex;
	flex-wrap: wrap;
	margin: -8px;
}

/* Multi-Column Grid System */
.nexform-field-wrapper {
	padding: 8px;
	width: 100%;
	transition: all 0.2s ease;
}

.nexform-col-100 { width: 100%; }
.nexform-col-50  { width: 50%; }
.nexform-col-33  { width: 33.333%; }
.nexform-col-25  { width: 25%; }

@media (max-width: 768px) {
	.nexform-col-50,
	.nexform-col-33,
	.nexform-col-25 {
		width: 100%;
	}
}

/* Label Styles (Clean above label) */
.nexform-label {
	display: block;
	font-size: 14px;
	font-weight: 500;
	color: #334155;
	margin-bottom: 7px;
	line-height: 1.4;
}

.nexform-required-mark {
	color: #ef4444;
	margin-left: 3px;
	font-weight: 700;
}

/* Input Controls with Rounded Smooth Border */
.nexform-input {
	width: 100%;
	border: 1.5px solid #e2e8f0;
	border-radius: 12px;
	background-color: #ffffff;
	color: #1e293b;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.nexform-input::placeholder {
	color: #94a3b8;
	opacity: 1;
}

.nexform-input:focus {
	border-color: #312e81;
	box-shadow: 0 0 0 3px rgba(49, 46, 129, 0.12);
}

/* Form Sizes */
.nexform-size-small .nexform-input {
	padding: 9px 14px;
	font-size: 14px;
}
.nexform-size-small .nexform-label {
	font-size: 14px;
}

.nexform-size-medium .nexform-input {
	padding: 11px 16px;
	font-size: 14px;
}
.nexform-size-medium .nexform-label {
	font-size: 14px;
}

.nexform-size-large .nexform-input {
	padding: 14px 18px;
	font-size: 16px;
}
.nexform-size-large .nexform-label {
	font-size: 15px;
}

/* Specific Field Types */
textarea.nexform-input {
	resize: vertical;
	min-height: 105px;
	line-height: 1.5;
}

select.nexform-input {
	appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px 16px;
	padding-right: 40px;
	cursor: pointer;
}

.nexform-options-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 4px 0;
}

.nexform-option-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	color: #334155;
	cursor: pointer;
	user-select: none;
}

.nexform-option-label input[type="radio"],
.nexform-option-label input[type="checkbox"] {
	accent-color: #231f54;
	width: 16px;
	height: 16px;
	margin: 0;
	cursor: pointer;
}

.nexform-input.nexform-file {
	padding: 8px;
	background: #f8fafc;
	cursor: pointer;
}

/* Actions Row & Submit Buttons (Dark Navy Pill Button) */
.nexform-actions-row {
	margin-top: 20px;
	display: flex;
}

.nexform-align-left    { justify-content: flex-start; }
.nexform-align-center  { justify-content: center; }
.nexform-align-right   { justify-content: flex-end; }
.nexform-align-full    { justify-content: stretch; }

.nexform-btn-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #231f54; /* exact dark navy/indigo from screenshot */
	color: #ffffff;
	font-family: inherit;
	font-weight: 600;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 3px 8px rgba(35, 31, 84, 0.2);
	line-height: 1.4;
	text-decoration: none;
}

.nexform-btn-submit:hover {
	background: #1a1740;
	box-shadow: 0 6px 14px rgba(35, 31, 84, 0.3);
	transform: translateY(-1px);
}

.nexform-btn-submit:active {
	transform: translateY(0);
}

.nexform-btn-submit:disabled {
	opacity: 0.65;
	cursor: not-allowed;
	transform: none;
}

.nexform-send-icon {
	width: 15px;
	height: 15px;
	stroke-width: 2.2;
}

.nexform-btn-small  { padding: 9px 20px; font-size: 14px; }
.nexform-btn-medium { padding: 12px 28px; font-size: 15px; }
.nexform-btn-large  { padding: 15px 36px; font-size: 16px; }

.nexform-align-full .nexform-btn-submit {
	width: 100%;
}

/* Button Spinner */
.nexform-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: nexform-spin 0.8s linear infinite;
	display: inline-block;
}

@keyframes nexform-spin {
	to { transform: rotate(360deg); }
}

/* Validation Errors */
.nexform-field-wrapper.has-error .nexform-input {
	border-color: #ef4444 !important;
	background-color: #fef2f2;
}

.nexform-field-wrapper.has-error .nexform-input:focus {
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.nexform-field-error {
	color: #dc2626;
	font-size: 12px;
	font-weight: 500;
	margin-top: 5px;
	line-height: 1.3;
}

/* Alerts / Response Box */
.nexform-response-alert {
	margin-top: 18px;
	padding: 14px 18px;
	border-radius: 10px;
	font-size: 14px;
	line-height: 1.5;
	animation: nexform-fade-in 0.3s ease;
}

.nexform-response-alert.alert-success {
	background-color: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.nexform-response-alert.alert-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

@keyframes nexform-fade-in {
	from { opacity: 0; transform: translateY(-4px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Success Card (Replaces the whole form on submission) */
.nexform-success-card {
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 100%;
	background: #ffffff;
	border: 1.5px solid #e2e8f0;
	border-radius: 16px;
	padding: 40px 24px;
	box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
	box-sizing: border-box;
	animation: nexform-card-enter 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.nexform-success-card-inner {
	max-width: 480px;
	margin: auto;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.nexform-success-icon-wrap {
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background: #ecfdf5;
	border: 2px solid #a7f3d0;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

.nexform-success-svg {
	width: 40px;
	height: 40px;
	display: block;
}

.nexform-success-circle {
	stroke: #10b981;
	stroke-width: 3;
	stroke-miterlimit: 10;
	stroke-dasharray: 166;
	stroke-dashoffset: 166;
	animation: nexform-stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.nexform-success-check {
	transform-origin: 50% 50%;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	stroke: #10b981;
	stroke-width: 3.5;
	stroke-linecap: round;
	stroke-linejoin: round;
	animation: nexform-stroke 0.35s cubic-bezier(0.65, 0, 0.45, 1) 0.45s forwards;
}

@keyframes nexform-stroke {
	100% {
		stroke-dashoffset: 0;
	}
}

@keyframes nexform-card-enter {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(6px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.nexform-success-title {
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	margin: 0 0 10px 0;
	line-height: 1.3;
}

.nexform-success-message {
	font-size: 15px;
	color: #475569;
	line-height: 1.6;
	margin: 0 0 24px 0;
}

.nexform-btn-reset-form {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #231f54;
	background: #f1f5f9;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	padding: 9px 18px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.nexform-btn-reset-form:hover {
	background: #e2e8f0;
	color: #1a1740;
	border-color: #cbd5e1;
	transform: translateY(-1px);
}

.nexform-btn-reset-form svg {
	width: 14px;
	height: 14px;
}

.nexform-redirect-note {
	font-size: 13px;
	color: #64748b;
	font-style: italic;
	margin-top: 8px;
}
