/* =========================================================
   Assesment-Consult Popup Form — all rules scoped under .ac-scope
   and every class/id prefixed "ac-" so nothing collides with
   other forms/plugins/themes on the page.
   ========================================================= */

.ac-scope {
	--ac-primary: #d4a24e;
	--ac-primary-hover: #c08f3c;
	--ac-button-text: #ffffff;
	--ac-heading: #4a3735;
	--ac-subtext: #8c7f7a;
	--ac-body-bg: #e7dcd2;
	--ac-card-bg: #e7dcd2;
	--ac-border: #d7c9bd;
	--ac-option-hover-bg: #f2ebe3;
	--ac-overlay: rgba(20, 16, 14, 0.6);
	--ac-outer-border: #1a1a1a;
	--ac-radius: 18px;
	--ac-button-radius: 8px;
	--ac-font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
	--ac-font-family-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
	--ac-font-weight-heading: 600;
	--ac-font-weight-body: 400;

	font-family: var(--ac-font-family);
	font-weight: var(--ac-font-weight-body);
	box-sizing: border-box;
}
.ac-scope *, .ac-scope *::before, .ac-scope *::after {
	box-sizing: border-box;
}

/* Trigger button on the page */
.ac-trigger-btn {
	font-family: var(--ac-font-family);
	background: var(--ac-primary);
	color: var(--ac-button-text);
	border: none;
	padding: 14px 28px;
	border-radius: var(--ac-button-radius);
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.1s ease;
}
.ac-trigger-btn:hover {
	background: var(--ac-primary-hover);
}
.ac-trigger-btn:active {
	transform: translateY(1px);
}

/* Overlay + modal */
.ac-overlay {
	position: fixed;
	inset: 0;
	background: var(--ac-overlay);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}
.ac-overlay--inline {
	position: static;
	background: transparent;
	padding: 0;
	inset: auto;
}

.ac-modal {
	position: relative;
	width: 100%;
	max-width: 700px;
	max-height: 90vh;
	overflow-y: auto;
	background: var(--ac-card-bg);
	border: 1px solid var(--ac-outer-border);
	border-radius: 24px;
	padding: 48px 56px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}
.ac-overlay--inline .ac-modal {
	border-radius: var(--ac-radius);
	box-shadow: none;
}

@media (max-width: 640px) {
	.ac-modal {
		padding: 32px 24px;
	}
}

.ac-close-btn {
	position: absolute;
	top: 18px;
	right: 22px;
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: var(--ac-subtext);
	cursor: pointer;
	padding: 4px 8px;
}
.ac-close-btn:hover {
	color: var(--ac-heading);
}

/* Intro (step 1 header) */
.ac-intro {
	text-align: center;
	margin-bottom: 28px;
}
.ac-title {
	font-family: var(--ac-font-family-heading);
	font-weight: var(--ac-font-weight-heading);
	color: var(--ac-heading);
	font-size: 28px;
	margin: 0 0 10px;
}
.ac-intro-sub {
	color: var(--ac-subtext);
	font-size: 15px;
	line-height: 1.5;
	margin: 0 auto;
	max-width: 460px;
}

/* Question header */
.ac-step-label {
	color: var(--ac-primary);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.02em;
	margin: 0 0 8px;
}
.ac-question {
	font-family: var(--ac-font-family-heading);
	font-weight: var(--ac-font-weight-heading);
	color: var(--ac-heading);
	font-size: 24px;
	margin: 0 0 6px;
	line-height: 1.3;
}
.ac-question-sub {
	color: var(--ac-subtext);
	font-size: 14px;
	margin: 0 0 24px;
}

/* Options */
.ac-options {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 32px;
}
.ac-option {
	display: flex;
	align-items: center;
	gap: 14px;
	border: 1px solid var(--ac-border);
	border-radius: 10px;
	padding: 16px 18px;
	cursor: pointer;
	background: transparent;
	transition: background 0.15s ease, border-color 0.15s ease;
}
.ac-option:hover {
	background: var(--ac-option-hover-bg);
}
.ac-option input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}
.ac-radio-dot {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 1.5px solid var(--ac-subtext);
	position: relative;
}
.ac-option input[type="radio"]:checked + .ac-radio-dot {
	border-color: var(--ac-primary);
}
.ac-option input[type="radio"]:checked + .ac-radio-dot::after {
	content: "";
	position: absolute;
	inset: 3px;
	border-radius: 50%;
	background: var(--ac-primary);
}
.ac-option input[type="radio"]:checked ~ .ac-option-label {
	color: var(--ac-heading);
	font-weight: 600;
}
.ac-option:has(input[type="radio"]:checked),
.ac-option.ac-option--selected {
	border-color: var(--ac-primary);
	background: var(--ac-option-hover-bg);
}
.ac-option-label {
	color: var(--ac-heading);
	font-size: 15px;
}

/* Fields (contact step) */
.ac-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 20px;
}
.ac-field {
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.ac-field-half {
	flex: 1 1 45%;
	min-width: 200px;
}
.ac-field label {
	font-size: 13px;
	color: var(--ac-heading);
	font-weight: 600;
}
.ac-required {
	color: #b5473c;
}
.ac-input {
	font-family: var(--ac-font-family);
	border: 1px solid var(--ac-border);
	border-radius: 8px;
	padding: 12px 14px;
	font-size: 15px;
	background: #ffffff;
	color: var(--ac-heading);
	width: 100%;
}
.ac-input:focus {
	outline: none;
	border-color: var(--ac-primary);
}
.ac-input::placeholder {
	color: #b9aca5;
}

.ac-error-msg {
	background: #fbeceb;
	color: #a8362b;
	border: 1px solid #f0c7c3;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 14px;
	margin-bottom: 16px;
}

/* Navigation buttons */
.ac-nav {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}
.ac-nav--single {
	justify-content: flex-end;
}

.ac-btn {
	font-family: var(--ac-font-family);
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: var(--ac-button-radius);
	padding: 13px 26px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
	text-decoration: none;
}
.ac-btn:active {
	transform: translateY(1px);
}
.ac-btn-primary {
	background: var(--ac-primary);
	color: var(--ac-button-text);
}
.ac-btn-primary:hover {
	background: var(--ac-primary-hover);
}
.ac-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}
.ac-btn-ghost {
	background: var(--ac-option-hover-bg);
	color: var(--ac-heading);
}
.ac-btn-ghost:hover {
	background: var(--ac-border);
}
.ac-arrow {
	font-size: 15px;
	line-height: 1;
}

.ac-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	display: inline-block;
	animation: ac-spin 0.7s linear infinite;
}
@keyframes ac-spin {
	to { transform: rotate(360deg); }
}

/* Thank-you step */
.ac-thankyou {
	text-align: center;
	padding: 20px 0;
}
.ac-check-circle {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--ac-primary);
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 22px;
}
.ac-thankyou-title {
	font-family: var(--ac-font-family-heading);
	font-weight: var(--ac-font-weight-heading);
	color: var(--ac-heading);
	font-size: 24px;
	max-width: 460px;
	margin: 0 auto 12px;
	line-height: 1.3;
}
.ac-thankyou-sub {
	color: var(--ac-subtext);
	font-size: 14px;
	max-width: 440px;
	margin: 0 auto 28px;
	line-height: 1.6;
}
.ac-thankyou .ac-btn {
	display: inline-flex;
}

/* Progress fade between steps */
.ac-step {
	animation: ac-fade-in 0.25s ease;
}
@keyframes ac-fade-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.ac-shake {
	animation: ac-shake-kf 0.3s ease;
}
@keyframes ac-shake-kf {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-6px); }
	75% { transform: translateX(6px); }
}
