/**
 * Nexloo Trial Form - Standalone Stylesheet
 *
 * Styles for the standalone trial form rendered by [nexloo_trial_form] shortcode.
 * All classes prefixed with `nxlp-trial-` or `nxlp-` to avoid conflicts.
 *
 * @package Nexloo_Pricing
 * @since   1.1.0
 */

/* ==========================================================================
   Form Container
   ========================================================================== */

.nxlp-trial-form-wrapper {
	box-sizing: border-box;
	font-family: var(--nxlp-font-family, inherit), -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
	font-size: 16px;
	line-height: 1.5;
	background: transparent;
	padding: 0;
	border-radius: 0;
	width: 100%;
	max-width: 100%;
	margin: 0;
}

.nxlp-trial-form-wrapper *,
.nxlp-trial-form-wrapper *::before,
.nxlp-trial-form-wrapper *::after {
	box-sizing: border-box;
}

/* ==========================================================================
   Form Element
   ========================================================================== */

.nxlp-trial-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

/* ==========================================================================
   Form Fields
   ========================================================================== */

.nxlp-trial-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	width: 100%;
}

.nxlp-trial-label {
	font-size: 13px;
	font-weight: 600;
	color: #e2e8f0;
	letter-spacing: 0.01em;
}

.nxlp-trial-input {
	width: 100%;
	min-height: 48px;
	padding: 12px 16px;
	font-size: 16px;
	font-family: inherit;
	color: #1e293b;
	background: #ffffff;
	border: 2px solid #e5e7eb;
	border-radius: var(--nxlp-radius, 12px);
	outline: none;
	transition: border-color 200ms ease, box-shadow 200ms ease;
}

.nxlp-trial-input::placeholder {
	color: #9ca3af;
}

.nxlp-trial-input:focus {
	border-color: #25D366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

/* ==========================================================================
   Error State - Invalid Fields
   ========================================================================== */

.nxlp-trial-input--error {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}

.nxlp-trial-input--error:focus {
	border-color: #ef4444;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

.nxlp-trial-error-msg {
	font-size: 12px;
	color: #fca5a5;
	margin-top: 2px;
	display: none;
}

.nxlp-trial-field--error .nxlp-trial-error-msg {
	display: block;
}

/* ==========================================================================
   CTA Button
   ========================================================================== */

.nxlp-trial-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: #25D366;
	border: none;
	border-radius: var(--nxlp-radius, 12px);
	cursor: pointer;
	transition: background 250ms ease, transform 250ms ease, box-shadow 250ms ease;
	margin-top: 8px;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.nxlp-trial-btn:hover {
	background: #1fb855;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.nxlp-trial-btn:active {
	transform: translateY(0);
	box-shadow: none;
}

.nxlp-trial-btn:focus-visible {
	outline: 2px solid #25D366;
	outline-offset: 2px;
}

/* ==========================================================================
   Disabled / Loading State Button
   ========================================================================== */

.nxlp-trial-btn:disabled,
.nxlp-trial-btn.nxlp-btn--loading {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
	transform: none;
	box-shadow: none;
}

/* ==========================================================================
   Error Message (global form error)
   ========================================================================== */

.nxlp-trial-form-error {
	display: none;
	padding: 12px 16px;
	background: rgba(239, 68, 68, 0.1);
	border: 1px solid rgba(239, 68, 68, 0.3);
	border-radius: 8px;
	color: #fca5a5;
	font-size: 14px;
	text-align: center;
}

.nxlp-trial-form-error--visible {
	display: block;
}

/* ==========================================================================
   Responsive: Mobile (≤ 768px) — fields 100% width
   ========================================================================== */

@media screen and (max-width: 768px) {
	.nxlp-trial-form-wrapper {
		max-width: 100%;
		padding: 0;
		border-radius: 0;
	}

	.nxlp-trial-input {
		width: 100%;
	}

	.nxlp-trial-btn {
		min-height: 48px;
	}
}

/* ==========================================================================
   Responsive: Desktop (> 768px) — full width
   ========================================================================== */

@media screen and (min-width: 769px) {
	.nxlp-trial-form-wrapper {
		max-width: 100%;
		margin: 0;
	}
}

/* ==========================================================================
   Touch Target Accessibility
   ========================================================================== */

@media (pointer: coarse) {
	.nxlp-trial-input {
		min-height: 48px;
	}

	.nxlp-trial-btn {
		min-height: 52px;
	}
}

/* ==========================================================================
   Screen Reader Only (Accessibility)
   ========================================================================== */

.nxlp-trial-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ==========================================================================
   Multistep: Steps
   ========================================================================== */

.nxlp-trial-step {
	display: none;
	flex-direction: column;
	gap: 16px;
	width: 100%;
}

.nxlp-trial-step--active {
	display: flex;
}

/* ==========================================================================
   Multistep: Progress Indicator
   ========================================================================== */

.nxlp-trial-progress {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 8px;
}

.nxlp-trial-progress__step {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 700;
	background: rgba(255, 255, 255, 0.1);
	color: rgba(255, 255, 255, 0.4);
	transition: background 300ms ease, color 300ms ease;
}

.nxlp-trial-progress__step--active {
	background: #25D366;
	color: #ffffff;
}

.nxlp-trial-progress__step--completed {
	background: #1fb855;
	color: #ffffff;
}

.nxlp-trial-progress__line {
	width: 40px;
	height: 3px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 2px;
	position: relative;
	overflow: hidden;
}

.nxlp-trial-progress__line-fill {
	position: absolute;
	top: 0;
	left: 0;
	height: 100%;
	width: 0%;
	background: #25D366;
	border-radius: 2px;
	transition: width 300ms ease;
}

/* ==========================================================================
   Multistep: Navigation Button (Próximo)
   ========================================================================== */

.nxlp-trial-btn-next {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	padding: 14px 24px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: #25D366;
	border: none;
	border-radius: var(--nxlp-radius, 12px);
	cursor: pointer;
	transition: background 250ms ease, transform 250ms ease, box-shadow 250ms ease;
	margin-top: 8px;
	line-height: 1.2;
	letter-spacing: 0.01em;
}

.nxlp-trial-btn-next:hover {
	background: #1fb855;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.nxlp-trial-btn-next:active {
	transform: translateY(0);
	box-shadow: none;
}

/* ==========================================================================
   Reduced Motion Preference
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.nxlp-trial-btn {
		transition: none;
	}

	.nxlp-trial-btn:hover {
		transform: none;
	}

	.nxlp-trial-input {
		transition: none;
	}
}
