/* ARKDIO Form Builder — 채널톡형 플로팅 문의 (display_type=chat) */

.ak-chat-root{ position:fixed; right:24px; bottom:24px; z-index:2147483000; }

/* 런처 버튼 */
#ak-chat-root .ak-chat-launcher{
	display:inline-flex; align-items:center; justify-content:center; gap:8px;
	/* 테마(Salient) 버튼 규칙을 이기기 위해 #id 특이성 + !important */
	background:var(--ak-bg,#111) !important; color:#fff !important; border:0 !important; border-radius:var(--ak-radius,30px) !important;
	height:var(--ak-btn,52px) !important; min-height:0 !important; width:auto !important; padding:0 20px !important;
	font-size:var(--ak-font,15px) !important; font-weight:600; line-height:1; cursor:pointer;
	box-shadow:0 6px 24px rgba(0,0,0,.25);
	transition:box-shadow .15s ease;
	font-family:Inter,-apple-system,system-ui,"Noto Sans KR",sans-serif;
}
.ak-chat-launcher:hover{ box-shadow:0 10px 30px rgba(0,0,0,.32); }
.ak-chat-launcher__icon{ display:inline-flex; }
.ak-chat-launcher__icon svg{ display:block; width:var(--ak-icon,22px); height:var(--ak-icon,22px); }
#ak-chat-root .ak-chat-launcher.ak-no-text{ width:var(--ak-btn,52px) !important; padding:0 !important; gap:0; }
.ak-chat-launcher.ak-no-text .ak-chat-launcher__label{ display:none; }
.ak-chat-root.is-open .ak-chat-launcher{ opacity:0; pointer-events:none; animation:none !important; }

/* 패널 */
.ak-chat-panel{
	position:fixed; right:24px; bottom:24px;
	width:var(--ak-w,380px); max-width:calc(100vw - 32px);
	height:min(640px,82vh);
	background:#fff; border-radius:16px; overflow:hidden;
	display:flex; flex-direction:column;
	box-shadow:0 16px 48px rgba(0,0,0,.28);
	transform-origin:bottom right;
	opacity:0; visibility:hidden; transform:translateY(12px) scale(.96);
	transition:opacity .22s cubic-bezier(.4,0,.2,1), transform .22s cubic-bezier(.4,0,.2,1), visibility .22s;
}
.ak-chat-root.is-open .ak-chat-panel{ opacity:1; visibility:visible; transform:none; }
/* 페이지 이동 후 복원 시: 전환 없이 즉시 표시(열기 모션 반복/깜빡임 방지) */
.ak-chat-root.ak-no-anim .ak-chat-panel,
.ak-chat-root.ak-no-anim .ak-chat-launcher{ transition:none !important; animation:none !important; }

.ak-chat-head{
	display:flex; align-items:center; justify-content:space-between;
	padding:16px 18px; background:#111; color:#fff; flex:0 0 auto;
}
.ak-chat-head__title{ font-size:15px; font-weight:700; }
.ak-chat-close{ background:none; border:0; color:#fff; font-size:24px; line-height:1; cursor:pointer; padding:0 4px; opacity:.85; }
.ak-chat-close:hover{ opacity:1; }

.ak-chat-body{
	padding:18px; overflow-y:auto; flex:1 1 auto; -webkit-overflow-scrolling:touch;
	overscroll-behavior:contain;
}

/* 패널 안 폼은 패널 폭(100%)에 맞춤 — 전역 폭 변수/마진 무력화, 2열은 1열로 */
#ak-chat-root .afb-form-wrapper{ --afb-w-pc:100% !important; --afb-w-mobile:100% !important; width:100% !important; max-width:100% !important; margin:0 !important; }
#ak-chat-root .afb-form-field[class*="afb-col-"]{ grid-column:1 / -1 !important; }

/* 모바일: 하단 시트(전체폭) */
@media(max-width:480px){
	.ak-chat-root{ right:16px; bottom:16px; }
	.ak-chat-panel{ right:0; left:0; bottom:0; width:100%; max-width:100%; height:86vh; border-radius:16px 16px 0 0; }
}

@media(prefers-reduced-motion:reduce){
	.ak-chat-panel{ transition:opacity .12s linear, visibility .12s; transform:none; }
	.ak-chat-launcher{ transition:none; animation:none !important; }
}

/* ── 헤더 뒤로가기 + 뷰 전환 ── */
.ak-chat-back{ background:none; border:0; color:#fff; cursor:pointer; padding:0 4px; margin-right:4px; display:inline-flex; align-items:center; opacity:.9; }
.ak-chat-back:hover{ opacity:1; }
.ak-chat-back[hidden]{ display:none; }
.ak-chat-head__title{ flex:1 1 auto; }

.ak-chat-views{ flex:1 1 auto; min-height:0; overflow-y:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; touch-action:pan-y; }
.ak-chat-view{ padding:18px; }
.ak-chat-view[hidden]{ display:none; }
.ak-chat-view[data-view="form"]{ padding:14px 16px; }

/* 홈 3버튼 */
.ak-chat-welcome{ margin:2px 0 16px; font-size:15px; line-height:1.6; color:#333; }
.ak-chat-menu{ display:block; width:100%; text-align:left; background:#fff; border:1px solid #e6e6e8; border-radius:12px; padding:15px 18px; margin:0 0 10px; cursor:pointer; transition:border-color .15s, box-shadow .15s, transform .1s; }
.ak-chat-menu:hover{ border-color:#111; box-shadow:0 4px 14px rgba(0,0,0,.08); }
.ak-chat-menu:active{ transform:scale(.99); }
.ak-chat-menu__t{ display:block; font-size:15px; font-weight:700; color:#111; }
.ak-chat-menu__d{ display:block; font-size:12.5px; color:#888; margin-top:3px; }

/* 자주하는 질문 */
.ak-chat-faq{ border-bottom:1px solid #eee; }
.ak-chat-faq__q{ cursor:pointer; padding:14px 26px 14px 4px; font-size:14px; font-weight:700; color:#222; list-style:none; position:relative; }
.ak-chat-faq__q::-webkit-details-marker{ display:none; }
.ak-chat-faq__q::after{ content:"+"; position:absolute; right:6px; top:50%; transform:translateY(-50%); font-size:18px; color:#aaa; line-height:1; }
.ak-chat-faq[open] > .ak-chat-faq__q::after{ content:"\2212"; }
.ak-chat-faq__a{ padding:0 4px 16px; font-size:13.5px; line-height:1.65; color:#555; }
.ak-chat-empty{ color:#999; text-align:center; padding:30px 0; font-size:14px; }

/* 연락처 남기기 */
.ak-chat-qc__lead{ margin:0 0 14px; font-size:14px; line-height:1.6; color:#444; }
.ak-chat-qc__input{ display:block; width:100%; box-sizing:border-box; border:1px solid #c1c1c1; border-radius:4px; background:#fff; padding:13px 14px; font-size:14px; margin:0 0 10px; }
.ak-chat-qc__input:focus{ outline:none; border-color:var(--ak-main,#222); }
.ak-chat-qc__btn{ width:100%; background:var(--ak-main,#222); color:#fff; border:0; border-radius:8px; padding:14px; font-size:15px; font-weight:600; cursor:pointer; }
.ak-chat-qc__btn:hover{ filter:brightness(1.12); }
.ak-chat-qc__btn:disabled{ opacity:.6; cursor:default; }
.ak-chat-qc__msg{ margin-top:12px; font-size:13.5px; line-height:1.5; text-align:center; }
/* 연락처 남기기 동의서 게이트(문의하기와 동일) */
#ak-chat-root .ak-qc-gate__title{ font-size:calc(15px * var(--ak-scale,1)); font-weight:700; margin:0 0 10px; color:#222; }
#ak-chat-root .ak-qc-agree-label{ display:flex; align-items:center; gap:8px; margin:12px 0; font-size:calc(13px * var(--ak-scale,1)); cursor:pointer; color:#333; }
#ak-chat-root .ak-qc-continue{ width:100%; background:var(--ak-main,#222) !important; color:#fff !important; border:0; border-radius:8px; padding:13px; font-size:calc(15px * var(--ak-scale,1)); font-weight:600; cursor:pointer; }

/* ── 크기 배율(--ak-scale): 글자·입력칸·버튼 함께 확대(대화방 전용) ── */
#ak-chat-root .ak-chat-welcome{ font-size:calc(15px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-menu__t{ font-size:calc(15px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-menu__d{ font-size:calc(12.5px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-faq__q{ font-size:calc(14px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-faq__a{ font-size:calc(13.5px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-qc__lead{ font-size:calc(14px * var(--ak-scale,1)); }
#ak-chat-root .ak-chat-qc__input{ font-size:calc(14px * var(--ak-scale,1)); padding:calc(9px * var(--ak-scale,1)) calc(12px * var(--ak-scale,1)); border:1px solid #c1c1c1; border-radius:4px; background:#fff; }
#ak-chat-root .ak-chat-qc__btn{ font-size:calc(15px * var(--ak-scale,1)); padding:calc(14px * var(--ak-scale,1)); background:var(--ak-main,#222) !important; color:#fff !important; border:0 !important; border-radius:8px !important; }
/* 문의 폼(form-render) 입력칸·버튼 — 텍스트박스 크기 = 폰트+패딩 */
#ak-chat-root .afb-form-field input:not([type=checkbox]):not([type=radio]),
#ak-chat-root .afb-form-field textarea,
#ak-chat-root .afb-form-field select{
	font-size:calc(14px * var(--ak-scale,1)) !important;
	padding:calc(9px * var(--ak-scale,1)) calc(12px * var(--ak-scale,1)) !important;
	height:auto !important;
}
#ak-chat-root .afb-form-field > label,
#ak-chat-root .afb-contract-title,
#ak-chat-root .afb-check-label{ font-size:calc(14px * var(--ak-scale,1)); }
/* 대화형 동의서: 패널이 곧 박스이므로 외곽/내부 테두리·배경·패딩 제거(답답함 해소), 약관 본문 2px 작게 */
#ak-chat-root [id^="afb-gate-"]{ border:0 !important; border-radius:0 !important; padding:0 !important; background:transparent !important; }
#ak-chat-root .afb-contract-body{ border:0 !important; border-radius:0 !important; padding:0 !important; background:transparent !important; font-size:calc(12px * var(--ak-scale,1)) !important; }
/* 약관 표시 textarea(문의하기 동의서 본문): 1px 라인 박스 */
#ak-chat-root .afb-contract-textarea{ width:100%; box-sizing:border-box; height:170px; border:1px solid #c1c1c1; border-radius:4px; background:#fff; padding:12px 14px; margin:8px 0 0; font-size:calc(12px * var(--ak-scale,1)); line-height:1.6; color:#444; resize:none; font-family:inherit; }
/* 연락처 이용약관 동의 체크박스(문의하기 terms_checkbox와 동일 스타일) */
#ak-chat-root .ak-qc-terms-agree{ margin:2px 0 14px; }
#ak-chat-root .ak-qc-terms-agree .afb-terms-label{ font-size:calc(13px * var(--ak-scale,1)); color:#333; }
#ak-chat-root .ak-qc-terms-agree .afb-terms-link{ color:#999 !important; }
#ak-chat-root .afb-submit-btn{
	font-size:calc(15px * var(--ak-scale,1)) !important;
	height:calc(48px * var(--ak-scale,1)) !important;
	min-height:0 !important;
}
