/**
 * Free License Distribution - Frontend Form Styles
 * Fully scoped under .fld-container to prevent theme collisions.
 */

.fld-container {
	max-width: 580px;
	margin: 28px auto;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.fld-container *,
.fld-container *::before,
.fld-container *::after {
	box-sizing: border-box;
}

.fld-card {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 32px 28px;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
	transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.fld-card:hover {
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
	border-color: #cbd5e1;
}

.fld-header {
	margin-bottom: 24px;
	text-align: center;
}

.fld-title {
	margin: 0 0 8px 0;
	font-size: 22px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.02em;
}

.fld-description {
	margin: 0;
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
}

.fld-form-group {
	margin-bottom: 20px;
}

.fld-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 7px;
}

.fld-required {
	color: #ef4444;
}

.fld-input-wrapper,
.fld-select-wrapper {
	position: relative;
	display: flex;
	align-items: center;
}

.fld-input-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: #94a3b8;
	pointer-events: none;
	z-index: 2;
}

.fld-select-arrow {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: #64748b;
	pointer-events: none;
	z-index: 2;
}

.fld-input,
.fld-select {
	display: block !important;
	width: 100% !important;
	height: 50px !important;
	min-height: 50px !important;
	box-sizing: border-box !important;
	font-size: 15px !important;
	line-height: normal !important;
	color: #1e293b !important;
	background-color: #f8fafc !important;
	border: 1.5px solid #cbd5e1 !important;
	border-radius: 8px !important;
	outline: none !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

.fld-input {
	padding: 12px 14px 12px 42px !important;
}

.fld-select {
	padding: 12px 40px 12px 14px !important;
	appearance: none !important;
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	cursor: pointer !important;
}

.fld-input:hover,
.fld-select:hover {
	border-color: #94a3b8 !important;
	background-color: #ffffff !important;
}

.fld-input:focus,
.fld-select:focus {
	border-color: #2563eb !important;
	background-color: #ffffff !important;
	box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.15) !important;
}

.fld-form-action {
	margin-top: 24px;
}

.fld-submit-btn {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	padding: 13px 24px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: #ffffff !important;
	background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
	border: none !important;
	border-radius: 8px !important;
	cursor: pointer !important;
	box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.25) !important;
	transition: all 0.2s ease !important;
}

.fld-submit-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #1d4ed8, #1e40af) !important;
	box-shadow: 0 6px 12px -2px rgba(37, 99, 235, 0.35) !important;
	transform: translateY(-1px);
}

.fld-submit-btn:active:not(:disabled) {
	transform: translateY(0);
}

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

/* Spinner */
.fld-btn-spinner {
	display: inline-flex;
	margin-right: 8px;
}

.fld-animate-spin {
	animation: fld-spin 1s linear infinite;
	width: 18px;
	height: 18px;
}

.fld-opacity-25 {
	opacity: 0.25;
}

.fld-opacity-75 {
	opacity: 0.75;
}

@keyframes fld-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* Feedback Alerts */
.fld-feedback-box {
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.5;
	margin-bottom: 20px;
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.fld-feedback-success {
	background-color: #f0fdf4;
	color: #166534;
	border: 1px solid #bbf7d0;
}

.fld-feedback-error {
	background-color: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

.fld-alert-info {
	background-color: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.fld-icon {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}
