/* ===================================================
   УманьФермаш — Форма заявок  |  form.css  v1.1.0
   Isolated styles: all selectors scoped to .ulfm-*
   =================================================== */

/* ---------- Reset ---------- */
.ulfm-form-wrap *,
.ulfm-form-wrap *::before,
.ulfm-form-wrap *::after,
.ulfm-modal *,
.ulfm-modal *::before,
.ulfm-modal *::after {
	box-sizing: border-box;
}

/* ---------- Inline wrapper ---------- */
.ulfm-form-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	max-width: 540px;
	width: 100%;
	margin: 0 auto;
}

/* ---------- Form inner (shared) ---------- */
.ulfm-form-inner {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Form title ---------- */
.ulfm-form-title {
	font-size: 22px;
	font-weight: 700;
	color: #35566B;
	margin: 0 0 22px 0;
	padding: 0;
	line-height: 1.3;
	letter-spacing: -0.2px;
}

/* ---------- Field wrapper ---------- */
.ulfm-field {
	margin-bottom: 18px;
}

/* ---------- Labels ---------- */
.ulfm-label {
	display: block;
	margin-bottom: 7px;
	font-size: 14px;
	font-weight: 600;
	color: #35566B;
	line-height: 1.4;
}

.ulfm-req {
	color: #C47B2E;
	margin-left: 2px;
}

/* ---------- Text / Tel inputs ---------- */
.ulfm-input {
	display: block;
	width: 100%;
	padding: 11px 14px;
	font-size: 15px;
	color: #35566B;
	background: #ffffff;
	border: 1.5px solid #5F7680;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ulfm-input::placeholder { color: #9bb0ba; font-weight: 400; }

.ulfm-input:focus {
	border-color: #E7A34D;
	box-shadow: 0 0 0 3px rgba(231, 163, 77, 0.18);
}

.ulfm-input.ulfm-has-error { border-color: #c0392b; }

/* ---------- Select ---------- */
.ulfm-select-wrap { position: relative; }

.ulfm-select-wrap::after {
	content: '';
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 0; height: 0;
	border-left: 5px solid transparent;
	border-right: 5px solid transparent;
	border-top: 6px solid #5F7680;
	pointer-events: none;
}

.ulfm-select {
	display: block;
	width: 100%;
	padding: 11px 40px 11px 14px;
	font-size: 15px;
	color: #35566B;
	background: #ffffff;
	border: 1.5px solid #5F7680;
	border-radius: 8px;
	outline: none;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
}

.ulfm-select:focus {
	border-color: #E7A34D;
	box-shadow: 0 0 0 3px rgba(231, 163, 77, 0.18);
}

.ulfm-select.ulfm-has-error { border-color: #c0392b; }

/* ---------- Radio badges ---------- */
.ulfm-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ulfm-radio-label { cursor: pointer; display: block; margin: 0; }

.ulfm-radio-label input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0; height: 0;
	pointer-events: none;
}

.ulfm-radio-badge {
	display: inline-block;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #5F7680;
	border: 1.5px solid #5F7680;
	border-radius: 50px;
	background: #ffffff;
	transition: all 0.18s ease;
	user-select: none;
	white-space: nowrap;
}

.ulfm-radio-label:hover .ulfm-radio-badge {
	border-color: #E7A34D;
	color: #35566B;
}

.ulfm-radio-label input[type="radio"]:checked + .ulfm-radio-badge {
	background: #E7A34D;
	border-color: #E7A34D;
	color: #ffffff;
}

.ulfm-radio-group.ulfm-has-error .ulfm-radio-badge { border-color: #c0392b; }

/* ---------- Error messages ---------- */
.ulfm-error {
	display: block;
	margin-top: 5px;
	font-size: 12px;
	color: #c0392b;
	min-height: 16px;
}

/* ---------- Submit button ---------- */
.ulfm-submit-wrap { margin-top: 6px; }

.ulfm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 14px 28px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: #C47B2E;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
	letter-spacing: 0.3px;
}

.ulfm-btn:hover:not(:disabled) { background: #9C6229; }
.ulfm-btn:active:not(:disabled) { transform: scale(0.985); }
.ulfm-btn:disabled { opacity: 0.72; cursor: not-allowed; }

.ulfm-btn-loader {
	display: none;
	width: 18px; height: 18px;
	border: 2.5px solid rgba(255,255,255,0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: ulfm-spin 0.7s linear infinite;
	flex-shrink: 0;
}

.ulfm-btn.ulfm-loading .ulfm-btn-loader { display: inline-block; }

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

/* ---------- Status message ---------- */
.ulfm-message {
	margin-top: 14px;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 500;
	display: none;
}

.ulfm-message.ulfm-success {
	background: #eaf7ee;
	color: #1e7e34;
	border: 1px solid #b8e0c4;
	display: block;
}

.ulfm-message.ulfm-fail {
	background: #fdf0f0;
	color: #c0392b;
	border: 1px solid #f5c6cb;
	display: block;
}

/* ==========================================================
   FLOATING ACTION BUTTON (FAB)
   !important used intentionally to prevent theme overrides
   ========================================================== */
button#ulfm-fab,
button.ulfm-fab {
	position: fixed !important;
	right: 28px !important;
	bottom: 28px !important;
	z-index: 9990 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 62px !important;
	height: 62px !important;
	min-width: 0 !important;
	max-width: none !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	border-radius: 50% !important;
	background: #C47B2E !important;
	background-color: #C47B2E !important;
	color: #ffffff !important;
	border: none !important;
	outline: none !important;
	font-size: 0 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	letter-spacing: 0 !important;
	box-shadow: 0 4px 20px rgba(196, 123, 46, 0.55) !important;
	cursor: pointer !important;
	transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease !important;
	overflow: hidden !important;
}

button#ulfm-fab:hover,
button.ulfm-fab:hover {
	background: #9C6229 !important;
	background-color: #9C6229 !important;
	box-shadow: 0 6px 26px rgba(156, 98, 41, 0.6) !important;
	transform: translateY(-3px) !important;
}

button#ulfm-fab:active,
button.ulfm-fab:active {
	transform: scale(0.92) !important;
}

button#ulfm-fab:focus,
button.ulfm-fab:focus {
	outline: 3px solid rgba(231, 163, 77, 0.6) !important;
	outline-offset: 2px !important;
}

.ulfm-fab .ulfm-fab-icon {
	width: 26px !important;
	height: 26px !important;
	flex-shrink: 0 !important;
	display: block !important;
	pointer-events: none !important;
}

.ulfm-fab .ulfm-fab-label,
.ulfm-fab-label {
	display: none !important;
}

/* ==========================================================
   OVERLAY
   ========================================================== */
.ulfm-overlay {
	position: fixed;
	inset: 0;
	z-index: 9995;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;

	/* Hidden state */
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.28s ease, visibility 0.28s ease;
}

.ulfm-overlay.ulfm-open {
	opacity: 1;
	visibility: visible;
}

/* Prevent body scroll when open */
body.ulfm-modal-open {
	overflow: hidden;
}

/* ==========================================================
   MODAL
   ========================================================== */
.ulfm-modal {
	position: relative;
	background: #ffffff;
	border-radius: 14px;
	width: 100%;
	max-width: 500px;
	max-height: 90vh;
	overflow-y: auto;
	padding: 32px 32px 28px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);

	/* Entry animation */
	transform: translateY(20px) scale(0.97);
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ulfm-overlay.ulfm-open .ulfm-modal {
	transform: translateY(0) scale(1);
}

/* Close button */
.ulfm-modal-close {
	position: absolute;
	top: 14px;
	right: 16px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	border-radius: 50%;
	color: #5F7680;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	line-height: 1;
}

.ulfm-modal-close:hover {
	background: #f0f4f6;
	color: #35566B;
}

/* Modal scrollbar styling */
.ulfm-modal::-webkit-scrollbar { width: 6px; }
.ulfm-modal::-webkit-scrollbar-track { background: transparent; }
.ulfm-modal::-webkit-scrollbar-thumb { background: #c5d5dc; border-radius: 3px; }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 540px) {
	.ulfm-modal {
		padding: 28px 20px 24px;
		border-radius: 12px;
	}

	.ulfm-form-title { font-size: 19px; }

	.ulfm-radio-badge {
		padding: 7px 13px;
		font-size: 12px;
	}

	.ulfm-btn {
		font-size: 15px;
		padding: 13px 20px;
	}
}

/* ==========================================================
   FAB TOOLTIP (desktop/tablet hover)
   ========================================================== */
button#ulfm-fab::after,
button.ulfm-fab::after {
	content: 'Отримати пропозицію' !important;
	position: absolute !important;
	right: 72px !important;
	bottom: 50% !important;
	transform: translateY(50%) !important;
	background: rgba(53, 86, 107, 0.92) !important;
	color: #fff !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
	letter-spacing: 0 !important;
	white-space: nowrap !important;
	padding: 6px 12px !important;
	border-radius: 6px !important;
	pointer-events: none !important;
	opacity: 0 !important;
	transition: opacity 0.2s ease !important;
	line-height: 1.4 !important;
}

button#ulfm-fab:hover::after,
button.ulfm-fab:hover::after {
	opacity: 1 !important;
}

@media (hover: none) {
	button#ulfm-fab::after,
	button.ulfm-fab::after {
		display: none !important;
	}
}

/* ==========================================================
   TABLET
   ========================================================== */
@media (min-width: 541px) and (max-width: 1024px) {
	button#ulfm-fab,
	button.ulfm-fab {
		right: 24px !important;
		bottom: 24px !important;
	}
}
