/* Ajebang Form and Survey Builder - 편집 화면 스타일 */

.aj-form-builder {
	display: flex;
	gap: 20px;
	margin-top: 10px;
	align-items: flex-start;
}

.aj-form-palette {
	flex: 0 0 200px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 16px;
	position: sticky;
	top: 40px;
}

.aj-form-palette h2,
.aj-form-canvas h2 {
	margin-top: 0;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #50575e;
}

.aj-form-palette .aj-form-add-field {
	display: block;
	width: 100%;
	text-align: left;
	margin-bottom: 8px;
}

.aj-form-canvas {
	flex: 1 1 auto;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 16px;
	min-height: 200px;
}

.aj-form-empty-hint {
	color: #787c82;
	font-style: italic;
}

.aj-form-field {
	background: #fff;
	border: 1px solid #dcdcde;
	border-left: 4px solid #2271b1;
	border-radius: 4px;
	padding: 12px 14px;
	margin-bottom: 12px;
	cursor: default;
}

.aj-form-field.aj-form-dragging {
	opacity: .5;
}

.aj-form-field.aj-form-collapsed {
	padding: 8px 14px;
}

.aj-form-field-head {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 8px;
}

.aj-form-field.aj-form-collapsed .aj-form-field-head {
	margin-bottom: 0;
}

.aj-form-toggle {
	color: #2271b1;
	font-size: 12px;
	user-select: none;
	width: 14px;
	text-align: center;
}

.aj-form-field-preview {
	font-size: 13px;
	color: #1d2327;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 40%;
}

.aj-form-field-body {
	margin-top: 8px;
}

.aj-form-drag {
	cursor: grab;
	color: #a7aaad;
	user-select: none;
}

.aj-form-type-badge {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	background: #2271b1;
	color: #fff;
	padding: 2px 8px;
	border-radius: 3px;
}

.aj-form-spacer {
	flex: 1 1 auto;
}

.aj-form-remove {
	color: #b32d2e;
	text-decoration: none;
	font-weight: bold;
	cursor: pointer;
}

.aj-form-inline-label {
	display: block;
	font-size: 12px;
	color: #50575e;
	margin-bottom: 8px;
}

.aj-form-inline-label input,
.aj-form-inline-label textarea {
	display: block;
	width: 100%;
	margin-top: 3px;
}

.aj-form-required {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 13px;
	color: #50575e;
}

/* 목록: 유형 태그 */
.aj-form-type-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	color: #fff;
}

.aj-form-type-form {
	background: #50575e;
}

.aj-form-type-survey {
	background: #2271b1;
}

/* 응답/통계 화면 상단 안내 내용 */
.aj-form-admin-description {
	margin: 0 0 16px;
	padding: 12px 16px;
	background: #f7f9fb;
	border-left: 4px solid #2271b1;
	border-radius: 0 4px 4px 0;
}

.aj-form-admin-description p:last-child {
	margin-bottom: 0;
}

/* 설문 통계 */
.aj-form-stats {
	display: grid;
	gap: 16px;
}

.aj-form-stat-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 14px 18px;
}

.aj-form-stat-card h3 {
	margin: 0 0 12px;
	font-size: 15px;
}

.aj-form-stat-meta {
	font-weight: 400;
	color: #787c82;
	font-size: 12px;
}

.aj-form-stat-note {
	color: #787c82;
	margin: 0;
}

.aj-form-bars,
.aj-form-number-stats {
	margin: 0;
	list-style: none;
}

.aj-form-number-stats li {
	display: inline-block;
	margin-right: 20px;
	color: #50575e;
}

/* 프론트엔드와 동일: 라벨 한 줄, 그 아래 막대 + 수치. */
.aj-form-bar-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
	margin-bottom: 14px;
}

.aj-form-bar-label {
	flex: 0 0 100%;
	font-size: 13px;
	line-height: 1.45;
	color: #1d2327;
	word-break: break-word;
}

.aj-form-bar-track {
	flex: 1 1 auto;
	min-width: 0;
	height: 18px;
	background: #f0f0f1;
	border-radius: 3px;
	overflow: hidden;
}

.aj-form-bar-fill {
	display: block;
	height: 100%;
	background: #2271b1;
	min-width: 2px;
	transition: width .3s ease;
}

.aj-form-bar-value {
	flex: 0 0 auto;
	text-align: right;
	white-space: nowrap;
	font-size: 12px;
	color: #50575e;
}

/* 폼 미리보기 화면 - 프론트엔드 렌더링을 감싸는 무대 */
.aj-form-preview-stage {
	margin: 16px 0 24px;
	padding: 24px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
}

.aj-form-preview-note {
	color: #646970;
	font-size: 12px;
}

/* 선택지 편집 (옵션 텍스트 + 표시 개수) */
.aj-form-options-editor {
	margin-bottom: 10px;
}

.aj-form-option-rows {
	display: grid;
	gap: 6px;
	margin-bottom: 8px;
}

.aj-form-option-row {
	display: flex;
	align-items: center;
	gap: 8px;
}

.aj-form-option-text {
	flex: 1 1 auto;
	min-width: 0;
}

.aj-form-option-count {
	flex: 0 0 80px;
	text-align: right;
}

.aj-form-option-real {
	flex: 0 0 auto;
	font-size: 11px;
	color: #787c82;
	white-space: nowrap;
}

.aj-form-option-remove {
	flex: 0 0 auto;
	color: #b32d2e;
	text-decoration: none;
	cursor: pointer;
}

.aj-form-danger {
	color: #b32d2e;
}

/* 편집 화면 탭 */
.aj-form-tabs {
	margin-bottom: 0;
}

.aj-form-tabs .nav-tab {
	background: none;
	cursor: pointer;
	font-size: 14px;
	line-height: inherit;
}

.aj-form-tab-panel {
	padding-top: 4px;
}

.aj-form-tab-panel[hidden] {
	display: none;
}

/* 목록: 상태 태그 (초안/마감) */
.aj-form-status-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
	margin-left: 4px;
	color: #fff;
}

.aj-form-status-draft {
	background: #b26b00;
}

.aj-form-status-closed {
	background: #8c8f94;
}

/* 목록: 바로가기 주소 */
.aj-form-direct-url {
	margin-top: 4px;
	font-size: 12px;
	word-break: break-all;
}

/* 목록: 마감 일시 */
.aj-form-deadline-cell {
	margin-top: 4px;
	font-size: 12px;
	color: #646970;
}

/* 편집 화면: 관련 링크 리피터 */
.aj-form-links-repeater .aj-form-link-row {
	display: flex;
	gap: 6px;
	align-items: center;
	margin-bottom: 6px;
}

.aj-form-links-repeater .aj-form-link-row input {
	flex: 1 1 200px;
	min-width: 0;
}

.aj-form-links-repeater .aj-form-link-remove {
	flex: none;
	color: #b32d2e;
}

/* 편집 화면: 대표 이미지 */
.aj-form-image-preview img {
	max-width: 320px;
	height: auto;
	display: block;
	margin-bottom: 8px;
	border: 1px solid #dcdcde;
	border-radius: 4px;
}

.aj-form-image-remove {
	color: #b32d2e;
	margin-left: 8px;
}

/* 미리보기: 문항별 숏코드 표 */
.aj-form-sno-table {
	max-width: 900px;
	margin-bottom: 20px;
}

/* 설정: 숏코드 안내 탭 */
.aj-form-doc {
	max-width: 1000px;
}

.aj-form-doc-lead {
	font-size: 14px;
	margin-top: 16px;
}

.aj-form-doc h2 {
	margin-top: 32px;
	padding-bottom: 6px;
	border-bottom: 1px solid #dcdcde;
}

.aj-form-doc h2 code {
	font-size: inherit;
	background: #f0f0f1;
	padding: 2px 8px;
}

.aj-form-doc h3 {
	margin-bottom: 8px;
}

.aj-form-doc-table {
	margin-bottom: 8px;
}

.aj-form-doc-table th:nth-child(1),
.aj-form-doc-table td:nth-child(1) {
	width: 130px;
}

.aj-form-doc-table th:nth-child(2),
.aj-form-doc-table td:nth-child(2) {
	width: 200px;
}

.aj-form-doc-table th:nth-child(3),
.aj-form-doc-table td:nth-child(3) {
	width: 90px;
}

.aj-form-doc-table code {
	white-space: nowrap;
}

.aj-form-doc-none {
	color: #787c82;
}

.aj-form-doc-url {
	word-break: break-all;
}

.aj-form-doc-url code {
	white-space: normal;
}

.aj-form-doc-examples {
	margin: 0 0 16px;
	list-style: none;
}

.aj-form-doc-examples li {
	margin-bottom: 8px;
}

.aj-form-doc-examples code {
	display: inline-block;
	margin-right: 10px;
	padding: 4px 8px;
	background: #f0f0f1;
}

.aj-form-doc-example-desc {
	color: #50575e;
}
