/**
 * 어썸 관심고객 등록 폼 — 화면 스타일
 *
 * 모든 선택자는 .aif- 접두사로 격리해 테마·다른 플러그인과 충돌하지 않게 했습니다.
 * Elementor 위젯·쇼트코드가 같은 마크업을 쓰므로 스타일도 한 벌만 있으면 됩니다.
 */

.aif-wrap {
	--aif-accent: #a8873f;
	--aif-accent-rgb: 168, 135, 63;
	--aif-card-bg: #ffffff;
	--aif-radius: 6px;
	--aif-ink: #23211c;
	--aif-muted: #7b766b;
	--aif-line: #ded8ca;
	--aif-field-bg: #ffffff;
	--aif-error: #c0392b;
	--aif-ok: #1c7c4a;
	box-sizing: border-box;
	width: 100%;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	color: var(--aif-ink);
	font-size: 15px;
	line-height: 1.55;
	-webkit-text-size-adjust: 100%;
}

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

.aif-wrap .aif-form {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

/* ---------- 카드 ---------- */

.aif-wrap .aif-card {
	position: relative;
	background: var(--aif-card-bg);
	border: 1px solid var(--aif-line);
	border-radius: var(--aif-radius);
	box-shadow: 0 10px 30px rgba(24, 22, 18, 0.06);
	padding: 34px 32px 30px;
	overflow: hidden;
}

.aif-wrap .aif-card__line {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: var(--aif-accent);
}

/* ---------- 머리말 ---------- */

.aif-wrap .aif-head {
	margin: 0 0 24px;
	padding: 0;
}

.aif-wrap .aif-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 22px;
	line-height: 1.35;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--aif-ink);
	border: 0;
}

.aif-wrap .aif-intro {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: var(--aif-muted);
}

/* ---------- 필드 ---------- */

.aif-wrap .aif-field {
	margin: 0 0 18px;
	padding: 0;
	border: 0;
}

.aif-wrap .aif-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 14px;
}

.aif-wrap .aif-grid .aif-field {
	min-width: 0;
}

.aif-wrap .aif-field > label,
.aif-wrap .aif-field .aif-label {
	display: block;
	margin: 0 0 8px;
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.4;
	color: var(--aif-muted);
}

.aif-wrap .aif-req {
	color: var(--aif-accent);
	font-weight: 700;
}

.aif-wrap .aif-field input[type="text"],
.aif-wrap .aif-field input[type="tel"],
.aif-wrap .aif-field input[type="date"],
.aif-wrap .aif-field input[type="email"],
.aif-wrap .aif-field select,
.aif-wrap .aif-field textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 0 14px;
	height: 48px;
	min-height: 48px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	color: var(--aif-ink);
	background: var(--aif-field-bg);
	border: 1px solid var(--aif-line);
	border-radius: 4px;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}

.aif-wrap .aif-field textarea {
	height: auto;
	min-height: 104px;
	padding: 12px 14px;
	resize: vertical;
}

.aif-wrap .aif-field select {
	padding-right: 38px;
	cursor: pointer;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%237b766b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 14px 9px;
}

.aif-wrap .aif-field input::placeholder,
.aif-wrap .aif-field textarea::placeholder {
	color: #a8a29a;
	opacity: 1;
}

.aif-wrap .aif-field input[type="text"]:focus,
.aif-wrap .aif-field input[type="tel"]:focus,
.aif-wrap .aif-field input[type="date"]:focus,
.aif-wrap .aif-field input[type="email"]:focus,
.aif-wrap .aif-field select:focus,
.aif-wrap .aif-field textarea:focus {
	outline: none;
	border-color: var(--aif-accent);
	box-shadow: 0 0 0 3px rgba(var(--aif-accent-rgb), 0.14);
}

.aif-wrap .aif-field input[aria-invalid="true"],
.aif-wrap .aif-field textarea[aria-invalid="true"] {
	border-color: var(--aif-error);
}

.aif-wrap .aif-field input[type="date"] {
	padding-right: 10px;
}

.aif-wrap .aif-field input[type="date"]::-webkit-calendar-picker-indicator {
	cursor: pointer;
	opacity: 0.55;
}

/* ---------- 관심 사항 칩 (2열) ---------- */

.aif-wrap .aif-chips {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.aif-wrap .aif-chip {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	min-height: 48px;
	padding: 11px 13px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--aif-ink);
	background: var(--aif-field-bg);
	border: 1px solid var(--aif-line);
	border-radius: 4px;
	cursor: pointer;
	transition: border-color 0.15s ease, background-color 0.15s ease;
	user-select: none;
}

.aif-wrap .aif-chip:hover {
	border-color: rgba(var(--aif-accent-rgb), 0.55);
}

.aif-wrap .aif-chip input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: 1px solid #bdb6a8;
	border-radius: 2px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.aif-wrap .aif-chip input[type="checkbox"]:checked {
	background: var(--aif-accent);
	border-color: var(--aif-accent);
}

.aif-wrap .aif-chip input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.aif-wrap .aif-chip input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(var(--aif-accent-rgb), 0.4);
	outline-offset: 2px;
}

.aif-wrap .aif-chip:has(input[type="checkbox"]:checked),
.aif-wrap .aif-chip.is-checked {
	border-color: var(--aif-accent);
	background: rgba(var(--aif-accent-rgb), 0.06);
	font-weight: 600;
}

/* ---------- 개인정보 동의 ---------- */

.aif-wrap .aif-consent {
	margin: 4px 0 20px;
	padding: 0;
	border: 0;
}

.aif-wrap .aif-check {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--aif-ink);
	cursor: pointer;
}

.aif-wrap .aif-check em {
	font-style: normal;
	color: var(--aif-muted);
	font-size: 13px;
}

.aif-wrap .aif-check input[type="checkbox"] {
	appearance: none;
	-webkit-appearance: none;
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin: 1px 0 0;
	padding: 0;
	border: 1px solid #bdb6a8;
	border-radius: 2px;
	background: #fff;
	cursor: pointer;
	position: relative;
}

.aif-wrap .aif-check input[type="checkbox"]:checked {
	background: var(--aif-accent);
	border-color: var(--aif-accent);
}

.aif-wrap .aif-check input[type="checkbox"]:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 1px;
	width: 5px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.aif-wrap .aif-check input[type="checkbox"]:focus-visible {
	outline: 2px solid rgba(var(--aif-accent-rgb), 0.4);
	outline-offset: 2px;
}

.aif-wrap .aif-privacy {
	margin: 8px 0 0 27px;
}

.aif-wrap .aif-privacy > summary {
	display: inline-block;
	padding: 0;
	font-size: 13px;
	color: var(--aif-muted);
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
	list-style: none;
}

.aif-wrap .aif-privacy > summary::-webkit-details-marker {
	display: none;
}

.aif-wrap .aif-privacy > summary:hover {
	color: var(--aif-accent);
}

.aif-wrap .aif-privacy__body {
	margin: 8px 0 0;
	padding: 12px 14px;
	max-height: 240px;
	overflow-y: auto;
	font-size: 12.5px;
	line-height: 1.7;
	color: #5f5a51;
	background: rgba(var(--aif-accent-rgb), 0.045);
	border: 1px solid rgba(var(--aif-accent-rgb), 0.18);
	border-radius: 4px;
}

/* ---------- 오류·상태 ---------- */

.aif-wrap .aif-error {
	margin: 6px 0 0;
	padding: 0;
	min-height: 0;
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--aif-error);
}

.aif-wrap .aif-error:empty {
	display: none;
}

/* ---------- 버튼 ---------- */

.aif-wrap .aif-submit {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 14px 20px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.01em;
	color: #ffffff;
	background: var(--aif-accent);
	border: 1px solid var(--aif-accent);
	border-radius: 4px;
	cursor: pointer;
	transition: filter 0.15s ease, opacity 0.15s ease;
	text-align: center;
}

.aif-wrap .aif-submit:hover {
	filter: brightness(0.94);
}

.aif-wrap .aif-submit:focus-visible {
	outline: 2px solid rgba(var(--aif-accent-rgb), 0.45);
	outline-offset: 2px;
}

.aif-wrap .aif-submit[disabled] {
	opacity: 0.6;
	cursor: default;
}

.aif-wrap .aif-submit__spin {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	border-radius: 50%;
	animation: aif-spin 0.7s linear infinite;
}

.aif-wrap .aif-form.is-busy .aif-submit__spin {
	display: inline-block;
}

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

@media (prefers-reduced-motion: reduce) {
	.aif-wrap .aif-submit__spin {
		animation-duration: 2s;
	}
}

/* ---------- 상태 문구 ---------- */

.aif-wrap .aif-status {
	margin: 14px 0 0;
	padding: 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--aif-muted);
}

.aif-wrap .aif-status:empty {
	display: none;
}

.aif-wrap .aif-status.is-ok {
	padding: 11px 14px;
	color: var(--aif-ok);
	background: rgba(28, 124, 74, 0.07);
	border: 1px solid rgba(28, 124, 74, 0.22);
	border-radius: 4px;
	font-weight: 600;
}

.aif-wrap .aif-status.is-error {
	padding: 11px 14px;
	color: var(--aif-error);
	background: rgba(192, 57, 43, 0.06);
	border: 1px solid rgba(192, 57, 43, 0.2);
	border-radius: 4px;
}

/* ---------- 허니팟 (화면에서 숨김) ---------- */

.aif-wrap .aif-hp {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ---------- 좁은 화면 ---------- */

@media (max-width: 640px) {
	.aif-wrap .aif-card {
		padding: 26px 20px 24px;
	}

	.aif-wrap .aif-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.aif-wrap .aif-title {
		font-size: 20px;
	}

	.aif-wrap .aif-chip {
		padding: 10px 11px;
		font-size: 13.5px;
		gap: 8px;
	}

	.aif-wrap .aif-submit {
		min-height: 50px;
		font-size: 15.5px;
	}
}

@media (max-width: 380px) {
	.aif-wrap .aif-card {
		padding: 22px 16px 20px;
	}

	.aif-wrap .aif-chips {
		gap: 6px;
	}

	.aif-wrap .aif-chip {
		padding: 9px 10px;
		font-size: 13px;
	}
}
