/* Revolutionary Forms — frontend */

:root {
	--rf-radius: 10px;
	--rf-radius-sm: 6px;
	--rf-color-primary: #2563eb;
	--rf-color-primary-hover: #1d4ed8;
	--rf-color-primary-soft: rgba(37, 99, 235, 0.16);
	--rf-color-text: #111827;
	--rf-color-muted: #6b7280;
	--rf-color-border: #e5e7eb;
	--rf-color-border-hover: #cbd5e1;
	--rf-color-bg: #ffffff;
	--rf-color-bg-soft: #f9fafb;
	--rf-color-error: #dc2626;
	--rf-color-error-bg: #fef2f2;
	--rf-color-success: #15803d;
	--rf-color-success-bg: #f0fdf4;
	--rf-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
	--rf-shadow-md: 0 6px 24px -8px rgba(15, 23, 42, 0.12), 0 1px 2px rgba(15, 23, 42, 0.04);
	--rf-shadow-focus: 0 0 0 4px var(--rf-color-primary-soft);
	--rf-shadow-error-focus: 0 0 0 4px rgba(220, 38, 38, 0.16);
	--rf-transition: 150ms ease;
}

.rf-form-wrap {
	max-width: 720px;
	margin: 1.75em 0;
}

.rf-form {
	background: var(--rf-color-bg);
	padding: 2rem;
	border: 1px solid var(--rf-color-border);
	border-radius: var(--rf-radius);
	box-shadow: var(--rf-shadow-md);
}

.rf-form-title {
	margin: 0 0 0.35em;
	font-size: 1.45em;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--rf-color-text);
	line-height: 1.25;
}
.rf-form-description {
	margin: 0 0 1.5em;
	color: var(--rf-color-muted);
	font-size: 0.95em;
	line-height: 1.55;
}

.rf-fields {
	list-style: none !important;
	margin: 0 0 1.25em !important;
	padding: 0 !important;
}
.rf-field { margin: 0 0 1.15em; padding: 0; }
.rf-field:last-child { margin-bottom: 0; }

.rf-label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.45em;
	color: var(--rf-color-text);
	font-size: 0.95em;
	letter-spacing: -0.005em;
}

.rf-required-marker {
	color: var(--rf-color-error);
	margin-left: 3px;
	font-weight: 700;
	font-size: 1.05em;
}

.rf-input input[type="text"],
.rf-input input[type="email"],
.rf-input input[type="tel"],
.rf-input input[type="url"],
.rf-input input[type="number"],
.rf-input input[type="date"],
.rf-input input[type="time"],
.rf-input textarea,
.rf-input select {
	width: 100%;
	padding: 0.7em 0.9em;
	font-size: 1em;
	line-height: 1.4;
	color: var(--rf-color-text);
	font-family: inherit;
	border: 1px solid var(--rf-color-border);
	border-radius: var(--rf-radius-sm);
	background: #fff;
	box-shadow: var(--rf-shadow-sm);
	box-sizing: border-box;
	transition: border-color var(--rf-transition), box-shadow var(--rf-transition);
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.rf-input input[type="text"]:hover,
.rf-input input[type="email"]:hover,
.rf-input input[type="tel"]:hover,
.rf-input input[type="url"]:hover,
.rf-input input[type="number"]:hover,
.rf-input input[type="date"]:hover,
.rf-input input[type="time"]:hover,
.rf-input textarea:hover,
.rf-input select:hover {
	border-color: var(--rf-color-border-hover);
}

.rf-input input:focus,
.rf-input textarea:focus,
.rf-input select:focus {
	outline: none;
	border-color: var(--rf-color-primary);
	box-shadow: var(--rf-shadow-focus);
}

.rf-input input::placeholder,
.rf-input textarea::placeholder {
	color: #9ca3af;
}

.rf-input select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='%236b7280'%3E%3Cpath d='M5.5 7.5l4.5 4.5 4.5-4.5' stroke='%236b7280' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.85em center;
	background-size: 12px;
	padding-right: 2.4em;
	cursor: pointer;
}

.rf-input textarea {
	resize: vertical;
	min-height: 130px;
}

.rf-input input[type="file"] {
	padding: 0.45em 0;
	font-size: 0.95em;
	background: transparent;
	box-shadow: none;
	border: 0;
}

.rf-file-help {
	margin-top: 6px;
	font-size: 0.85em;
	color: var(--rf-color-muted);
}

.rf-size-small input,
.rf-size-small select,
.rf-size-small textarea { max-width: 240px; }
.rf-size-medium input,
.rf-size-medium select,
.rf-size-medium textarea { max-width: 480px; }
.rf-size-large input,
.rf-size-large select,
.rf-size-large textarea { max-width: 100%; }

.rf-choices {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
}
.rf-choice {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-weight: 400;
	cursor: pointer;
	padding: 0.4em 0.55em;
	border-radius: var(--rf-radius-sm);
	transition: background var(--rf-transition);
	color: var(--rf-color-text);
}
.rf-choice:hover { background: var(--rf-color-bg-soft); }
.rf-choice input[type="radio"],
.rf-choice input[type="checkbox"] {
	margin: 0;
	width: 1.05em;
	height: 1.05em;
	accent-color: var(--rf-color-primary);
	cursor: pointer;
}

.rf-multi {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75em;
}
.rf-multi-name { grid-template-columns: 1fr 1fr; }
.rf-multi-address { grid-template-columns: 1fr 1fr; }
.rf-multi-address .rf-sub-street,
.rf-multi-address .rf-sub-street2 { grid-column: 1 / -1; }

.rf-sub { display: flex; flex-direction: column; }
.rf-sub input {
	width: 100%;
	padding: 0.65em 0.9em;
	border: 1px solid var(--rf-color-border);
	border-radius: var(--rf-radius-sm);
	background: #fff;
	font-size: 1em;
	font-family: inherit;
	color: var(--rf-color-text);
	box-sizing: border-box;
	box-shadow: var(--rf-shadow-sm);
	transition: border-color var(--rf-transition), box-shadow var(--rf-transition);
	-webkit-appearance: none;
	appearance: none;
}
.rf-sub input:hover { border-color: var(--rf-color-border-hover); }
.rf-sub input:focus {
	outline: none;
	border-color: var(--rf-color-primary);
	box-shadow: var(--rf-shadow-focus);
}
.rf-sub-label {
	font-size: 0.78em;
	color: var(--rf-color-muted);
	margin-top: 5px;
	letter-spacing: 0.01em;
}

.rf-field-description {
	margin-top: 0.45em;
	font-size: 0.875em;
	color: var(--rf-color-muted);
	line-height: 1.45;
}

.rf-field.rf-has-error .rf-input input,
.rf-field.rf-has-error .rf-input textarea,
.rf-field.rf-has-error .rf-input select,
.rf-field.rf-has-error .rf-sub input {
	border-color: var(--rf-color-error);
}
.rf-field.rf-has-error .rf-input input:focus,
.rf-field.rf-has-error .rf-input textarea:focus,
.rf-field.rf-has-error .rf-input select:focus,
.rf-field.rf-has-error .rf-sub input:focus {
	box-shadow: var(--rf-shadow-error-focus);
}

.rf-field-error {
	margin-top: 0.5em;
	color: var(--rf-color-error);
	font-size: 0.875em;
	font-weight: 500;
}

.rf-form-error-summary {
	background: var(--rf-color-error-bg);
	border: 1px solid rgba(220, 38, 38, 0.25);
	border-left: 4px solid var(--rf-color-error);
	color: #7f1d1d;
	padding: 0.85em 1em;
	margin-bottom: 1.25em;
	border-radius: var(--rf-radius-sm);
	font-size: 0.95em;
}

.rf-form-confirmation {
	background: var(--rf-color-success-bg);
	border: 1px solid rgba(21, 128, 61, 0.25);
	border-left: 4px solid var(--rf-color-success);
	color: #14532d;
	padding: 1.1em 1.25em;
	border-radius: var(--rf-radius-sm);
	font-size: 1em;
	line-height: 1.55;
}

.rf-form-footer {
	display: flex;
	align-items: center;
	gap: 0.85em;
	margin-top: 0.5em;
}

.rf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.8em 1.6em;
	background: var(--rf-color-primary);
	color: #fff;
	border: 0;
	border-radius: var(--rf-radius-sm);
	font-weight: 600;
	font-size: 1em;
	font-family: inherit;
	letter-spacing: 0.005em;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
	transition: background var(--rf-transition), transform var(--rf-transition), box-shadow var(--rf-transition);
}
.rf-submit:hover {
	background: var(--rf-color-primary-hover);
	box-shadow: 0 8px 16px -4px rgba(37, 99, 235, 0.35);
	transform: translateY(-1px);
}
.rf-submit:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
.rf-submit:focus-visible {
	outline: none;
	box-shadow: var(--rf-shadow-focus), 0 1px 2px rgba(15, 23, 42, 0.08);
}
.rf-submit:disabled {
	background: #9ca3af;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.rf-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid var(--rf-color-border);
	border-top-color: var(--rf-color-primary);
	border-radius: 50%;
	animation: rf-spin 0.7s linear infinite;
}
.rf-form.rf-loading .rf-spinner { display: inline-block; }
.rf-form.rf-loading .rf-submit { opacity: 0.85; }

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

.rf-section-title {
	margin: 1.6em 0 0.5em;
	padding-bottom: 0.45em;
	border-bottom: 1px solid var(--rf-color-border);
	font-size: 1.1em;
	color: var(--rf-color-text);
	font-weight: 600;
	letter-spacing: -0.005em;
}
.rf-section-description {
	color: var(--rf-color-muted);
	font-size: 0.95em;
	margin-bottom: 0.6em;
	line-height: 1.5;
}

.rf-page-break {
	border: 0;
	border-top: 1px dashed var(--rf-color-border);
	margin: 1.5em 0;
}

.rf-field-recaptcha .rf-input {
	display: flex;
}
.rf-recaptcha-note {
	margin: 0;
	color: var(--rf-color-muted);
	font-size: 0.85em;
	line-height: 1.45;
}
.rf-invisible-captcha { display: none; }
.rf-recaptcha-missing {
	display: inline-block;
	padding: 0.7em 0.95em;
	background: var(--rf-color-error-bg);
	color: #7f1d1d;
	border: 1px dashed var(--rf-color-error);
	border-radius: var(--rf-radius-sm);
	font-style: normal;
	font-size: 0.9em;
}
