/* =========================================================
   Custom Registration Form — front-end styles
   ========================================================= */

.crf-wrap {
	--crf-brand: #2563eb;
	--crf-radius: 14px;
	--crf-border: #e4e7ec;
	--crf-text: #101828;
	--crf-muted: #667085;
	--crf-bg-soft: #f9fafb;
	--crf-error: #d92d20;
	--crf-success: #039855;

	max-width: 780px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--crf-text);
	line-height: 1.5;
	box-sizing: border-box;
}

.crf-wrap *,
.crf-wrap *::before,
.crf-wrap *::after {
	box-sizing: border-box;
}

/* ---------- Card ---------- */
.crf-card {
	background: #fff;
	border: 1px solid var(--crf-border);
	border-radius: var(--crf-radius);
	overflow: hidden;
	box-shadow: 0 8px 28px rgba(16, 24, 40, 0.06);
}

.crf-card-head {
	padding: 30px 32px 26px;
	background: var(--crf-brand);
	background-image: linear-gradient(135deg, var(--crf-brand) 0%, rgba(0, 0, 0, .28) 220%);
	color: #fff;
	text-align: center;
}

.crf-title {
	margin: 0 0 6px;
	font-size: 25px;
	font-weight: 700;
	color: #fff;
	line-height: 1.25;
}

.crf-subtitle {
	margin: 0;
	font-size: 14.5px;
	color: rgba(255, 255, 255, .88);
}

.crf-card-body {
	padding: 30px 32px 34px;
}

/* ---------- Sections ---------- */
.crf-section {
	margin-bottom: 30px;
}

.crf-section:last-of-type {
	margin-bottom: 22px;
}

.crf-section-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--crf-border);
}

.crf-section-num {
	flex: 0 0 26px;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: var(--crf-brand);
	color: #fff;
	font-size: 12.5px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.crf-section-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .2px;
	color: var(--crf-text);
}

/* ---------- Grid & fields ---------- */
.crf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.crf-field {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.crf-col-2 {
	grid-column: 1 / -1;
}

.crf-field label {
	font-size: 13.5px;
	font-weight: 600;
	margin-bottom: 7px;
	color: #344054;
}

.crf-req {
	color: var(--crf-error);
}

.crf-optional {
	color: var(--crf-muted);
	font-weight: 400;
	font-size: 12.5px;
}

.crf-wrap input[type="text"],
.crf-wrap input[type="email"],
.crf-wrap input[type="tel"],
.crf-wrap select,
.crf-wrap textarea {
	width: 100%;
	padding: 11px 14px;
	font-size: 14.5px;
	font-family: inherit;
	color: var(--crf-text);
	background: #fff;
	border: 1px solid var(--crf-border);
	border-radius: 9px;
	transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.crf-wrap textarea {
	resize: vertical;
	min-height: 108px;
}

/* Custom select arrow */
.crf-wrap select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 36px;
	cursor: pointer;
}

.crf-wrap input:focus,
.crf-wrap select:focus,
.crf-wrap textarea:focus {
	outline: none;
	border-color: var(--crf-brand);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.crf-wrap input::placeholder,
.crf-wrap textarea::placeholder {
	color: #98a2b3;
}

.crf-wrap select:disabled {
	background-color: var(--crf-bg-soft);
	color: #98a2b3;
	cursor: not-allowed;
}

/* Invalid state */
.crf-field.crf-invalid input,
.crf-field.crf-invalid select,
.crf-field.crf-invalid textarea {
	border-color: var(--crf-error);
	background: #fffbfa;
}

.crf-field.crf-invalid input:focus,
.crf-field.crf-invalid select:focus {
	box-shadow: 0 0 0 4px rgba(217, 45, 32, .11);
}

.crf-error {
	display: none;
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--crf-error);
}

.crf-field.crf-invalid .crf-error {
	display: block;
}

.crf-hint {
	margin-top: 6px;
	font-size: 12.5px;
	color: var(--crf-muted);
}

/* ---------- Phone group ---------- */
.crf-phone {
	display: flex;
	gap: 8px;
}

.crf-phone select {
	flex: 0 0 132px;
	font-size: 14.5px;
	padding-left: 12px;
	padding-right: 30px;
	background-position: right 9px center;
}

.crf-phone input {
	flex: 1 1 auto;
	min-width: 0;
}

/* ---------- City field + spinner ---------- */
.crf-city-wrap {
	position: relative;
}

.crf-spinner {
	display: none;
	position: absolute;
	right: 38px;
	top: 50%;
	width: 16px;
	height: 16px;
	margin-top: -8px;
	border: 2px solid rgba(37, 99, 235, .25);
	border-top-color: var(--crf-brand);
	border-radius: 50%;
	animation: crf-spin .7s linear infinite;
}

.crf-spinner.is-active {
	display: block;
}

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

/* ---------- Alerts ---------- */
.crf-alert {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	padding: 14px 16px;
	margin-bottom: 22px;
	border-radius: 10px;
	font-size: 14px;
	border: 1px solid transparent;
}

.crf-alert-icon {
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	color: #fff;
	font-weight: 700;
	font-size: 12px;
	line-height: 20px;
	text-align: center;
}

.crf-alert.is-success {
	background: #ecfdf3;
	border-color: #abefc6;
	color: #05603a;
}

.crf-alert.is-success .crf-alert-icon {
	background: var(--crf-success);
}

.crf-alert.is-success .crf-alert-icon::before {
	content: "\2713";
}

.crf-alert.is-error {
	background: #fef3f2;
	border-color: #fecdca;
	color: #912018;
}

.crf-alert.is-error .crf-alert-icon {
	background: var(--crf-error);
}

.crf-alert.is-error .crf-alert-icon::before {
	content: "!";
}

/* ---------- Honeypot ---------- */
.crf-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ---------- Actions ---------- */
.crf-actions {
	padding-top: 6px;
	text-align: center;
}

.crf-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	min-width: 230px;
	padding: 13px 34px;
	font-size: 15px;
	font-family: inherit;
	font-weight: 600;
	color: #fff;
	background: var(--crf-brand);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: transform .12s ease, box-shadow .18s ease, opacity .18s ease;
	box-shadow: 0 4px 14px rgba(37, 99, 235, .28);
}

.crf-btn:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 7px 20px rgba(37, 99, 235, .34);
}

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

.crf-btn:disabled {
	opacity: .68;
	cursor: not-allowed;
	box-shadow: none;
}

.crf-btn-loader {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, .4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: crf-spin .7s linear infinite;
}

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

.crf-privacy {
	margin: 13px 0 0;
	font-size: 12.5px;
	color: var(--crf-muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.crf-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.crf-card-head {
		padding: 24px 20px 20px;
	}

	.crf-card-body {
		padding: 22px 20px 26px;
	}

	.crf-title {
		font-size: 21px;
	}

	.crf-phone select {
		flex: 0 0 112px;
	}

	.crf-btn {
		width: 100%;
	}
}

/* =========================================================
   Searchable dropdown (combobox)
   ========================================================= */

.crf-wrap .crf-native-hidden {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.crf-combo {
	position: relative;
	width: 100%;
}

.crf-combo-btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	padding: 11px 14px;
	font-size: 14.5px;
	font-family: inherit;
	line-height: 1.4;
	text-align: left;
	color: var(--crf-text);
	background: #fff;
	border: 1px solid var(--crf-border);
	border-radius: 9px;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.crf-combo-btn:hover:not(:disabled) {
	border-color: #cfd4dc;
}

.crf-combo-btn:focus {
	outline: none;
	border-color: var(--crf-brand);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.crf-combo-btn:disabled {
	background: var(--crf-bg-soft);
	color: #98a2b3;
	cursor: not-allowed;
}

.crf-combo-label {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.crf-combo-label.is-placeholder {
	color: #98a2b3;
}

.crf-combo-caret {
	flex: 0 0 10px;
	width: 10px;
	height: 10px;
	border-right: 2px solid #667085;
	border-bottom: 2px solid #667085;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .18s ease;
}

.crf-combo.is-open .crf-combo-caret {
	transform: rotate(-135deg) translate(-3px, -3px);
}

.crf-combo.is-open .crf-combo-btn {
	border-color: var(--crf-brand);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

/* Panel */
.crf-combo-panel {
	display: none;
	position: absolute;
	z-index: 9999;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid var(--crf-border);
	border-radius: 11px;
	box-shadow: 0 12px 32px rgba(16, 24, 40, .14);
	overflow: hidden;
}

.crf-combo.is-open .crf-combo-panel {
	display: block;
	animation: crf-fade .14s ease;
}

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

.crf-combo-search-wrap {
	padding: 9px;
	border-bottom: 1px solid #f2f4f7;
	background: var(--crf-bg-soft);
}

.crf-wrap .crf-combo-search {
	width: 100%;
	padding: 9px 12px 9px 34px;
	font-size: 14px;
	border: 1px solid var(--crf-border);
	border-radius: 8px;
	background-color: #fff;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.2-3.2'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 10px center;
}

.crf-combo-list {
	list-style: none;
	margin: 0;
	padding: 6px;
	max-height: 260px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.crf-combo-item {
	padding: 9px 12px;
	margin: 0;
	font-size: 14.5px;
	color: #344054;
	border-radius: 7px;
	cursor: pointer;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	list-style: none;
	transition: background .12s ease;
}

.crf-combo-item:hover,
.crf-combo-item.is-active {
	background: #f2f6ff;
	color: var(--crf-brand);
}

.crf-combo-item.is-selected {
	background: var(--crf-brand);
	color: #fff;
	font-weight: 600;
}

.crf-combo-item.is-manual {
	border-top: 1px solid #f2f4f7;
	margin-top: 4px;
	font-style: italic;
	color: var(--crf-muted);
}

.crf-combo-empty {
	padding: 16px 12px;
	text-align: center;
	font-size: 13.5px;
	color: var(--crf-muted);
	list-style: none;
}

/* Scrollbar polish */
.crf-combo-list::-webkit-scrollbar { width: 8px; }
.crf-combo-list::-webkit-scrollbar-thumb { background: #d0d5dd; border-radius: 8px; }
.crf-combo-list::-webkit-scrollbar-track { background: transparent; }

/* Phone group: keep the country combo narrow */
.crf-phone .crf-combo {
	flex: 0 0 132px;
	width: 132px;
}

.crf-phone .crf-combo-panel {
	width: 290px;
	min-width: 290px;
}

.crf-invalid .crf-combo-btn {
	border-color: var(--crf-error);
	background: #fffbfa;
}

@media (max-width: 640px) {
	.crf-phone .crf-combo {
		flex: 0 0 112px;
		width: 112px;
	}
	.crf-phone .crf-combo-panel {
		width: 265px;
		min-width: 265px;
	}
	.crf-combo-list {
		max-height: 220px;
	}
}


/* =========================================================
   Thank You page
   ========================================================= */

.crf-ty-wrap {
	max-width: 560px;
}

.crf-ty-card {
	text-align: center;
}

.crf-ty-body {
	padding: 46px 34px 40px;
}

.crf-ty-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 84px;
	height: 84px;
	margin: 0 auto 22px;
	border-radius: 50%;
	background: rgba(3, 152, 85, .1);
}

.crf-ty-circle {
	stroke: var(--crf-success, #039855);
	stroke-width: 2.5;
	stroke-miterlimit: 10;
	opacity: .35;
}

.crf-ty-check {
	stroke: var(--crf-success, #039855);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-dasharray: 48;
	stroke-dashoffset: 48;
	animation: crf-ty-draw .5s ease .15s forwards;
}

@keyframes crf-ty-draw {
	to { stroke-dashoffset: 0; }
}

.crf-ty-heading {
	margin: 0 0 10px;
	font-size: 26px;
	font-weight: 700;
	color: var(--crf-text);
}

.crf-ty-intro {
	margin: 0 auto 26px;
	max-width: 420px;
	font-size: 15px;
	line-height: 1.65;
	color: var(--crf-muted);
}

.crf-ty-summary {
	margin: 0 0 22px;
	padding: 4px 0;
	border: 1px solid var(--crf-border);
	border-radius: 10px;
	background: var(--crf-bg-soft);
	overflow: hidden;
	text-align: left;
}

.crf-ty-row {
	display: flex;
	justify-content: space-between;
	gap: 14px;
	padding: 12px 18px;
	border-bottom: 1px solid var(--crf-border);
	font-size: 14px;
}

.crf-ty-row:last-child {
	border-bottom: none;
}

.crf-ty-label {
	color: var(--crf-muted);
}

.crf-ty-value {
	font-weight: 600;
	color: var(--crf-text);
	text-align: right;
	word-break: break-word;
}

.crf-ty-note {
	margin: 0 0 28px;
	padding: 14px 16px;
	border-left: 4px solid var(--crf-brand);
	border-radius: 6px;
	background: #f6f8fc;
	font-size: 13.5px;
	line-height: 1.6;
	color: #475467;
	text-align: left;
}

.crf-ty-btn {
	text-decoration: none;
}

@media (max-width: 640px) {
	.crf-ty-body {
		padding: 34px 22px 30px;
	}
	.crf-ty-heading {
		font-size: 22px;
	}
}
