/* zittme demobar — zitt.me 공홈 톤(흰 배경, 브랜드 블루). 모든 선택자를 .demobar* 로 한정한다 */
.demobar,
.demobar-fab,
.demobar-modal {
	--db-bg: #ffffff;
	--db-fg: #222831;
	--db-accent: #2677e3;
	--db-accent-fg: #ffffff;
	--db-line: rgba(0,0,0,.08);
	--db-hover: rgba(38,119,227,.08);
	--db-sub: rgba(34,40,49,.62);
	font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic", sans-serif;
	font-size: 13px;
	line-height: 1.4;
	box-sizing: border-box;
}
.demobar *,
.demobar-fab *,
.demobar-modal * { box-sizing: inherit; }

/* 바 --------------------------------------------------------------- */
.demobar {
	position: relative;
	z-index: 9990;
	background: var(--db-bg);
	color: var(--db-fg);
	border-bottom: 1px solid var(--db-line);
	box-shadow: 0 1px 0 rgba(0,0,0,.02), 0 6px 18px -12px rgba(0,0,0,.25);
}
.demobar--bottom {
	position: fixed;
	left: 0; right: 0; bottom: 0;
	border-bottom: 0;
	border-top: 1px solid var(--db-line);
	box-shadow: 0 -6px 18px -12px rgba(0,0,0,.3);
}
html.demobar-bottom body { padding-bottom: 50px; }

.demobar__inner {
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 46px;
	padding: 0 16px;
	max-width: 1400px;
	margin: 0 auto;
}
.demobar__logo {
	display: inline-flex;
	align-items: center;
	flex: 0 0 auto;
	height: 46px;
	text-decoration: none;
	color: var(--db-fg);
}
.demobar__logo img { height: 20px; width: auto; display: block; }
.demobar__logo strong { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.demobar__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	padding-left: 14px;
	border-left: 1px solid var(--db-line);
	color: var(--db-fg);
	text-decoration: none;
	white-space: nowrap;
	flex: 0 1 auto;
}
.demobar__brand:hover { text-decoration: none; color: var(--db-accent); }
.demobar__badge {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--db-accent);
	color: var(--db-accent-fg);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .08em;
	flex: 0 0 auto;
}
.demobar__title { font-weight: 700; font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.demobar__note { color: var(--db-sub); font-size: 12px; }

.demobar__links {
	display: flex;
	align-items: center;
	gap: 2px;
	margin-left: auto;
	white-space: nowrap;
}
.demobar__links a,
.demobar__links button,
.demobar__dd-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 10px;
	border-radius: 8px;
	color: var(--db-fg);
	text-decoration: none;
	font: inherit;
	font-weight: 500;
	background: transparent;
	border: 0;
	cursor: pointer;
	flex: 0 0 auto;
}
.demobar__links a:hover,
.demobar__links button:hover,
.demobar__dd-btn:hover,
.demobar__dd.is-open .demobar__dd-btn { background: var(--db-hover); color: var(--db-accent); text-decoration: none; }
.demobar__sep { width: 1px; height: 18px; background: var(--db-line); margin: 0 6px; flex: 0 0 auto; }
.demobar__group-label { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--db-sub); padding: 0 4px; }
.demobar__account {
	font-size: 11px;
	font-weight: 500;
	color: var(--db-sub);
	padding: 1px 6px;
	border: 1px solid var(--db-line);
	border-radius: 4px;
	background: rgba(0,0,0,.02);
}

/* 드롭다운 */
.demobar__dd { position: relative; flex: 0 0 auto; }
.demobar__dd-btn { font-weight: 700; }
.demobar__dd-btn svg { width: 14px; height: 14px; transition: transform .15s; }
.demobar__dd.is-open .demobar__dd-btn svg { transform: rotate(180deg); }
.demobar__dd-menu {
	display: none;
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	min-width: 200px;
	padding: 6px;
	background: var(--db-bg);
	color: var(--db-fg);
	border: 1px solid var(--db-line);
	border-radius: 12px;
	box-shadow: 0 16px 40px -12px rgba(0,0,0,.35);
	z-index: 2;
}
.demobar--bottom .demobar__dd-menu { top: auto; bottom: calc(100% + 6px); }
.demobar__dd.is-open .demobar__dd-menu { display: block; }
.demobar__dd-menu a { display: flex; width: 100%; padding: 9px 12px; border-radius: 8px; font-weight: 500; }
.demobar__dd-menu a:first-child { font-weight: 700; color: var(--db-accent); }

.demobar__cta {
	background: var(--db-accent);
	color: var(--db-accent-fg);
	border: 0;
	border-radius: 8px;
	padding: 8px 14px;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	flex: 0 0 auto;
	box-shadow: 0 6px 14px -8px var(--db-accent);
}
.demobar__cta:hover { filter: brightness(.94); }
.demobar__menu,
.demobar__toggle {
	flex: 0 0 auto;
	width: 30px; height: 30px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--db-sub);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}
.demobar__menu { display: none; }
.demobar__toggle { font-size: 20px; }
.demobar__menu:hover,
.demobar__toggle:hover { background: var(--db-hover); color: var(--db-accent); }

/* 접힘 상태 */
html.demobar-collapsed .demobar { display: none; }
html.demobar-collapsed.demobar-bottom body { padding-bottom: 0; }
.demobar-fab {
	position: fixed;
	right: 14px;
	bottom: 14px;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 9px 14px;
	border: 1px solid var(--db-line);
	border-radius: 999px;
	background: var(--db-bg);
	color: var(--db-fg);
	font: inherit;
	font-weight: 700;
	box-shadow: 0 8px 24px rgba(0,0,0,.18);
	cursor: pointer;
}
.demobar-fab[hidden] { display: none; }

/* 모바일: 로고 + DEMO + 구축 문의 + 메뉴 버튼만 남기고 링크는 패널로 */
@media (max-width: 760px) {
	.demobar__inner { gap: 8px; padding: 0 10px; min-height: 46px; }
	.demobar__logo img { height: 18px; }
	.demobar__brand { padding-left: 8px; gap: 6px; }
	.demobar__title { max-width: 34vw; }
	.demobar__note,
	.demobar__account,
	.demobar__sep,
	.demobar__group-label { display: none; }
	.demobar__menu { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
	.demobar__cta--bar { padding: 7px 10px; font-size: 12px; }
	.demobar__links {
		display: none;
		position: absolute;
		left: 0; right: 0;
		top: 100%;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 0;
		padding: 8px;
		background: var(--db-bg);
		border-bottom: 1px solid var(--db-line);
		box-shadow: 0 16px 30px -10px rgba(0,0,0,.3);
		white-space: normal;
		max-height: 70vh;
		overflow: auto;
	}
	.demobar--bottom .demobar__links { top: auto; bottom: 100%; }
	.demobar--menu-open .demobar__links { display: flex; }
	.demobar--menu-open .demobar__group-label { display: block; padding: 10px 10px 4px; }
	.demobar__links a,
	.demobar__links button { justify-content: flex-start; padding: 11px 10px; border-radius: 8px; font-size: 14px; }
	.demobar--menu-open .demobar__account { display: inline; margin-left: 6px; }
	/* 모바일에서는 드롭다운을 펼쳐진 목록으로 */
	.demobar__dd { position: static; }
	.demobar__dd-btn { width: 100%; justify-content: flex-start; padding: 11px 10px; font-size: 14px; }
	.demobar__dd-btn svg { margin-left: auto; }
	.demobar__dd-menu { position: static; display: none; min-width: 0; padding: 0 0 0 10px; border: 0; box-shadow: none; }
	.demobar__dd.is-open .demobar__dd-menu { display: block; }
}

/* 문의 창 ----------------------------------------------------------- */
.demobar-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.demobar-modal[hidden] { display: none; }
.demobar-modal__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.6); backdrop-filter: blur(2px); }
.demobar-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	background: #fff;
	color: #1f2937;
	border-radius: 16px;
	padding: 20px 26px 24px;
	box-shadow: 0 24px 70px rgba(0,0,0,.35);
}
.demobar-modal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; min-height: 30px; }
.demobar-modal__logo { height: 18px; width: auto; }
.demobar-modal__close {
	width: 34px; height: 34px;
	border: 0; border-radius: 50%;
	background: #f1f5f9; color: #334155;
	font-size: 20px; line-height: 1; cursor: pointer;
	margin-left: auto;
}
.demobar-step[hidden] { display: none; }
.demobar-step__back { border: 0; background: transparent; color: #64748b; font: inherit; font-size: 12px; padding: 0 0 10px; cursor: pointer; }
.demobar-step__back:hover { color: var(--db-accent); }
.demobar-step__foot { margin: 12px 0 0; text-align: center; font-size: 12px; }
.demobar-step__foot a { color: #64748b; }
.demobar-form__title { margin: 0 0 6px; font-size: 20px; font-weight: 800; color: #111827; letter-spacing: -.01em; outline: none; }
.demobar-form__desc { margin: 0 0 16px; color: #64748b; font-size: 13px; }

/* 전문가 목록 */
.demobar-experts { display: grid; gap: 10px; max-height: 46vh; overflow: auto; padding-right: 2px; margin-bottom: 12px; }
.demobar-experts__status { margin: 0; padding: 14px; text-align: center; color: #64748b; font-size: 13px; background: #f8fafc; border-radius: 10px; }
.demobar-expert {
	display: grid;
	grid-template-columns: 52px 1fr auto;
	gap: 12px;
	align-items: center;
	padding: 12px;
	border: 1px solid #e5e9f0;
	border-radius: 12px;
	background: #fff;
	transition: border-color .15s, box-shadow .15s;
}
.demobar-expert:hover { border-color: var(--db-accent); box-shadow: 0 8px 20px -14px var(--db-accent); }
.demobar-expert__photo,
.demobar-target__photo {
	width: 52px; height: 52px;
	border-radius: 50%;
	overflow: hidden;
	display: inline-flex; align-items: center; justify-content: center;
	background: #eef2f7;
	flex: 0 0 auto;
}
.demobar-expert__photo img,
.demobar-target__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.demobar-expert__initial { font-weight: 800; font-size: 18px; color: var(--db-accent); }
.demobar-expert__body { min-width: 0; }
.demobar-expert__name { display: block; font-size: 15px; font-weight: 700; color: #111827; }
.demobar-expert__fields { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.demobar-expert__fields em { font-style: normal; font-size: 11px; padding: 2px 7px; border-radius: 999px; background: rgba(38,119,227,.1); color: var(--db-accent); }
.demobar-expert__intro { margin: 4px 0 0; font-size: 12px; color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demobar-expert__meta { display: block; margin-top: 3px; font-size: 11px; color: #94a3b8; }
.demobar-expert__actions { display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
.demobar-expert__actions a { font-size: 11px; text-align: center; color: #64748b; }
.demobar-expert__pick { padding: 8px 12px; font-size: 12px; white-space: nowrap; box-shadow: none; }
.demobar-public {
	width: 100%;
	display: flex; flex-direction: column; gap: 3px;
	padding: 12px 14px;
	border: 1px dashed #cbd5e1;
	border-radius: 12px;
	background: #f8fafc;
	color: #1f2937;
	font: inherit;
	text-align: left;
	cursor: pointer;
}
.demobar-public:hover { border-color: var(--db-accent); background: rgba(38,119,227,.05); }
.demobar-public strong { font-size: 14px; }
.demobar-public span { font-size: 12px; color: #64748b; }

/* 선택된 전문가 표시 */
.demobar-target { display: flex; align-items: center; gap: 12px; padding: 10px 12px; margin-bottom: 14px; border-radius: 12px; background: #f1f5f9; }
.demobar-target[hidden] { display: none; }
.demobar-target strong { display: block; font-size: 14px; color: #111827; }
.demobar-target small { color: #64748b; font-size: 12px; }

/* 폼 */
.demobar-form__field { display: block; margin-bottom: 12px; }
.demobar-form__field > span { display: block; margin-bottom: 5px; font-size: 12px; font-weight: 600; color: #475569; }
.demobar-form__field input,
.demobar-form__field textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font: inherit;
	font-size: 14px;
	color: #1f2937;
	background: #fff;
}
.demobar-form__field input:focus,
.demobar-form__field textarea:focus { outline: 2px solid var(--db-accent); outline-offset: 0; border-color: transparent; }
.demobar-form__field textarea { resize: vertical; min-height: 110px; }
.demobar-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.demobar-form__agree { display: flex; gap: 8px; align-items: flex-start; margin: 6px 0 14px; font-size: 12px; color: #475569; }
.demobar-form__agree input { margin-top: 2px; flex: 0 0 auto; }
.demobar-form__error { margin: 0 0 12px; padding: 8px 10px; border-radius: 6px; background: #fef2f2; color: #b91c1c; font-size: 12px; }
.demobar-form__error[hidden] { display: none; }
.demobar-form__submit { width: 100%; padding: 12px; border-radius: 8px; font-size: 15px; }
.demobar-form__submit[disabled] { opacity: .6; cursor: wait; }
.demobar-step--done { text-align: center; padding: 10px 0 4px; }
.demobar-done__link { margin: 0 0 10px; font-size: 13px; }
.demobar-done__link a { color: var(--db-accent); }
.demobar-done__link[hidden] { display: none; }
.demobar-step--done .demobar__cta { padding: 10px 22px; margin-top: 8px; }

@media (max-width: 640px) {
	.demobar-modal { padding: 10px; align-items: flex-end; }
	.demobar-modal__dialog { padding: 16px 16px 18px; border-radius: 14px 14px 10px 10px; max-height: calc(100vh - 20px); }
	.demobar-expert { grid-template-columns: 44px 1fr; }
	.demobar-expert__actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
	.demobar-expert__pick { flex: 1 1 auto; }
}

/* 다크 모드: 바는 밝은 브랜드 톤을 유지하고, 문의 창만 어둡게 */
@media (prefers-color-scheme: dark) {
	.demobar-modal__dialog { background: #14161a; color: #e5e7eb; }
	.demobar-form__title { color: #fff; }
	.demobar-form__desc, .demobar-form__agree, .demobar-form__field > span, .demobar-step__back { color: #9ca3af; }
	.demobar-form__field input, .demobar-form__field textarea { background: #1c1f26; border-color: #374151; color: #f3f4f6; }
	.demobar-modal__close { background: #1c1f26; color: #e5e7eb; }
	.demobar-expert, .demobar-public, .demobar-target, .demobar-experts__status { background: #1c1f26; border-color: #2a2f3a; color: #e5e7eb; }
	.demobar-expert__name, .demobar-target strong, .demobar-public strong { color: #f9fafb; }
	.demobar-expert__photo, .demobar-target__photo { background: #2a2f3a; }
}
