/* AOA 가까운 서비스 지역 자동 선택
 * Booknetic은 `.booknetic_appointment * { all: unset }` 으로 스타일을 격리하므로
 * 패널 내부 요소는 display 등 모든 속성을 명시한다. (커스텀 속성은 all: unset 대상 아님)
 */

.booknetic_appointment {
	--aoa-nl-accent: #2563eb;
	--aoa-nl-accent-soft: #eef4ff;
}

/* ---------- 지점 단계 상단 박스 ---------- */

.booknetic_appointment .aoa-nl-box {
	display: block;
	box-sizing: border-box;
	width: 100%;
	flex: 0 0 100%;
	grid-column: 1 / -1;
	margin: 0 0 16px;
	padding: 14px 16px;
	border: 1px solid #d7e2f5;
	border-radius: 10px;
	background: var(--aoa-nl-accent-soft);
	font-family: inherit;
	font-size: 14px;
	line-height: 1.5;
	color: #1f2937;
	text-align: left;
}

.booknetic_appointment .aoa-nl-title {
	display: block;
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: #111827;
	word-break: keep-all;
}

.booknetic_appointment .aoa-nl-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.booknetic_appointment .aoa-nl-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 40px;
	padding: 8px 16px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	color: #1f2937;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	user-select: none;
	transition: border-color .15s, background-color .15s, opacity .15s;
}

.booknetic_appointment .aoa-nl-btn:hover {
	border-color: var(--aoa-nl-accent);
}

.booknetic_appointment .aoa-nl-btn:focus-visible {
	outline: 2px solid var(--aoa-nl-accent);
	outline-offset: 2px;
}

.booknetic_appointment .aoa-nl-btn-primary {
	border-color: var(--aoa-nl-accent);
	background: var(--aoa-nl-accent);
	color: #fff;
}

.booknetic_appointment .aoa-nl-box.is-busy .aoa-nl-btn {
	opacity: .55;
	cursor: progress;
	pointer-events: none;
}

.booknetic_appointment .aoa-nl-status {
	display: block;
	margin-top: 10px;
	font-size: 13px;
	color: #475569;
	word-break: keep-all;
}

.booknetic_appointment .aoa-nl-status:empty {
	display: none;
}

.booknetic_appointment .aoa-nl-status[data-type="success"] { color: #15803d; }
.booknetic_appointment .aoa-nl-status[data-type="warning"] { color: #b45309; }
.booknetic_appointment .aoa-nl-status[data-type="error"]   { color: #b91c1c; }

/* ---------- 주소 입력 모드 (지점 카드 숨김) ---------- */

.booknetic_appointment .aoa-nl-hide-cards .booknetic_card {
	display: none !important;
}

.booknetic_appointment .aoa-nl-box.aoa-nl-mode-address {
	padding: 4px 0 0;
	border: 0;
	background: transparent;
}

.booknetic_appointment .aoa-nl-mode-address .aoa-nl-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 700;
}

.booknetic_appointment .aoa-nl-desc {
	display: block;
	margin: 0 0 14px;
	font-size: 13px;
	color: #64748b;
	word-break: keep-all;
}

.booknetic_appointment .aoa-nl-field {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	padding: 6px 6px 6px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color .15s, box-shadow .15s;
}

.booknetic_appointment .aoa-nl-field:hover {
	border-color: var(--aoa-nl-accent);
}

.booknetic_appointment .aoa-nl-field:focus-visible {
	outline: 2px solid var(--aoa-nl-accent);
	outline-offset: 2px;
}

.booknetic_appointment .aoa-nl-field-text {
	display: block;
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	font-size: 15px;
	color: #94a3b8;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.booknetic_appointment .aoa-nl-field.has-value .aoa-nl-field-text {
	color: #111827;
	font-weight: 600;
}

.booknetic_appointment .aoa-nl-field-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0 16px;
	border-radius: 6px;
	background: var(--aoa-nl-accent);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

.booknetic_appointment .aoa-nl-box.is-busy .aoa-nl-field {
	opacity: .6;
	cursor: progress;
	pointer-events: none;
}

/* ---------- 고객 정보 단계: 주소 필드 ---------- */

.booknetic_appointment input.aoa-nl-addr {
	cursor: pointer;
	background-color: #fff !important; /* 읽기 전용이지만 회색으로 보이지 않게 */
}

.booknetic_appointment .aoa-nl-note {
	display: block;
	margin: 6px 0 0;
	font-family: inherit;
	font-size: 12px;
	line-height: 1.5;
	color: #475569;
	word-break: keep-all;
}

.booknetic_appointment .aoa-nl-note:empty { display: none; }
.booknetic_appointment .aoa-nl-note[data-type="success"] { color: #15803d; }
.booknetic_appointment .aoa-nl-note[data-type="warning"] { color: #b45309; }
.booknetic_appointment .aoa-nl-note[data-type="error"]   { color: #b91c1c; }

/* ---------- 가장 가까운 지점 카드 ---------- */

.booknetic_appointment .booknetic_card.aoa-nl-nearest {
	position: relative;
	box-shadow: 0 0 0 2px var(--aoa-nl-accent) !important;
}

.booknetic_appointment .booknetic_card .aoa-nl-badge {
	display: inline-block;
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--aoa-nl-accent);
	color: #fff;
	font-family: inherit;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	white-space: nowrap;
	pointer-events: none;
}

/* ---------- 주소 검색 레이어 (패널 밖, body 직속) ---------- */

.aoa-nl-layer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2147483000;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 16px;
	background: rgba(15, 23, 42, .55);
}

.aoa-nl-layer-inner {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 520px;
	height: min(640px, 90vh);
	overflow: hidden;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

.aoa-nl-layer-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #e5e7eb;
	font-size: 15px;
	color: #111827;
}

.aoa-nl-layer-close {
	appearance: none;
	margin: 0;
	padding: 0 6px;
	border: 0;
	background: none;
	color: #374151;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.aoa-nl-layer-body {
	position: relative;
	flex: 1 1 auto;
	min-height: 0;
}

.aoa-nl-layer-embed {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
}

body.aoa-nl-noscroll {
	overflow: hidden;
}

@media (max-width: 600px) {
	.aoa-nl-layer { padding: 0; }
	.aoa-nl-layer-inner { max-width: none; height: 100%; border-radius: 0; }
}
