/* ============================================================
   list.css — sendi_board2 게시판 목록 스타일
   보라색 테마 (sample.html 기반)
   board.default.css 완전 독립 — 이 파일만으로 동작
   ============================================================ */

/* 1–2. 완전 격리 리셋 + CSS Variables
   all:initial → board.default.css · .xe-board-container 상속 완전 차단
   이후 변수와 기본 속성을 다시 선언 */
.sendi-list-wrap {
	all: initial;
	/* -- CSS Variables -- */
	--brand: #786BAF;
	--brand-dark: #5a4f8a;
	--brand-light: #9e94c8;
	--brand-pale: #f0eef9;
	--dark: #1a1825;
	--gray: #5c5a6b;
	--gray-lt: #f7f6fc;
	--rule: #e0daf4;
	--fs-xs: 12px;
	--fs-sm: 14px;
	--fs-base: 16px;
	--ls: -0.04em;
	/* -- Base Properties -- */
	display: block;
	font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
	font-size: 16px;
	letter-spacing: -0.04em;
	color: #1a1825;
	line-height: 1.5;
	max-width: 1200px;
	margin: 0 auto;
	padding: 24px 20px 40px;
	-webkit-text-size-adjust: 100%;
}
.sendi-list-wrap *,
.sendi-list-wrap *::before,
.sendi-list-wrap *::after {
	box-sizing: border-box;
	font-family: inherit;
	letter-spacing: inherit;
	color: inherit;
	line-height: inherit;
}
.sendi-list-wrap a {
	color: inherit;
	text-decoration: none;
	background: transparent;
	cursor: pointer;
}
.sendi-list-wrap img {
	max-width: 100%;
	border: 0;
	vertical-align: middle;
}
.sendi-list-wrap input,
.sendi-list-wrap select,
.sendi-list-wrap button,
.sendi-list-wrap textarea {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
	letter-spacing: inherit;
	line-height: inherit;
	margin: 0;
}
.sendi-list-wrap strong {
	font-weight: 700;
}

/* secret-ticker — _footer.html JS에서 body에 삽입 (글로벌 스코프 필요) */
.secret-ticker {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	background: #786BAF;
	color: #fff;
	font-family: 'Pretendard', sans-serif;
	font-size: 12px;
	font-weight: 600;
	border-radius: 20px;
	position: fixed;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
	z-index: 9999;
	pointer-events: none;
	white-space: nowrap;
}
.secret-ticker::before {
	content: '';
	position: absolute;
	top: -6px;
	left: 16px;
	width: 0;
	height: 0;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-bottom: 6px solid #786BAF;
}
.secret-ticker--show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

/* ── 3. 컨트롤 패널 ── */
.sendi-list-wrap .rec-controls {
	background: #faf9fd;
	border: 1px solid #e0daf4;
	border-radius: 14px;
	padding: 28px 32px;
	margin-bottom: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

/* ctrl-row (form 래핑) */
.sendi-list-wrap .ctrl-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	align-items: end;
	margin: 0;
	padding: 0;
	border: 0;
}

/* ctrl-field */
.sendi-list-wrap .ctrl-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.sendi-list-wrap .ctrl-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #5a4f8a;
	text-transform: uppercase;
}

/* 공통 입력 스타일 */
.sendi-list-wrap .ctrl-select,
.sendi-list-wrap .ctrl-input {
	width: 100%;
	height: 42px;
	padding: 10px 14px;
	border: 1px solid #d4ceed;
	border-radius: 8px;
	font-size: 14px;
	font-family: 'Pretendard', sans-serif;
	color: #1a1825;
	letter-spacing: -0.04em;
	background: #fff;
	outline: none;
	transition: border-color 0.18s, box-shadow 0.18s;
	appearance: none;
	-webkit-appearance: none;
}
.sendi-list-wrap .ctrl-select:focus,
.sendi-list-wrap .ctrl-input:focus {
	border-color: #786BAF;
	box-shadow: 0 0 0 3px rgba(120, 107, 175, 0.1);
}
.sendi-list-wrap .ctrl-select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b0a8d0'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding-right: 32px;
	cursor: pointer;
}
.sendi-list-wrap .ctrl-select option {
	color: #1a1825;
}
.sendi-list-wrap .ctrl-input::placeholder {
	color: #b0a8d0;
}

/* 검색 인풋 래퍼 */
.sendi-list-wrap .ctrl-search-wrap {
	position: relative;
}
.sendi-list-wrap .ctrl-search-wrap .ico {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY(-50%);
	color: #b0a8d0;
	font-size: 12px;
	pointer-events: none;
}
.sendi-list-wrap .ctrl-search-wrap .ctrl-input {
	padding-left: 36px;
	padding-right: 32px;
}
.sendi-list-wrap .search-clear {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: #b0a8d0;
	font-size: 11px;
	padding: 2px;
	display: none;
	line-height: 1;
}
.sendi-list-wrap .search-clear:hover {
	color: #786BAF;
}
.sendi-list-wrap .search-clear.show {
	display: block;
}

/* ctrl-bottom */
.sendi-list-wrap .ctrl-bottom {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid #e0daf4;
}

/* ── 4. 필터 탭 ── */
.sendi-list-wrap .record-filter {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
	flex: 1;
}
.sendi-list-wrap .rf-btn {
	display: inline-block;
	padding: 6px 18px;
	border-radius: 100px;
	border: 1px solid #d4ceed;
	font-size: 12px;
	font-weight: 600;
	color: #5c5a6b;
	background: #fff;
	cursor: pointer;
	transition: all 0.18s;
	letter-spacing: -0.04em;
	font-family: 'Pretendard', sans-serif;
	text-decoration: none;
	white-space: nowrap;
}
.sendi-list-wrap .rf-btn.on,
.sendi-list-wrap .rf-btn:hover {
	background: #786BAF;
	color: #fff;
	border-color: #786BAF;
}

/* ── 5. 결과 카운트 ── */
.sendi-list-wrap .rec-count {
	font-size: 12px;
	color: #5c5a6b;
	letter-spacing: -0.04em;
	white-space: nowrap;
	margin-left: auto;
}
.sendi-list-wrap .rec-count strong {
	color: #786BAF;
	font-weight: 700;
}

/* 초기화 버튼 */
.sendi-list-wrap .ctrl-reset {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 14px;
	border-radius: 8px;
	border: 1px solid #d4ceed;
	background: #fff;
	font-size: 11px;
	font-weight: 600;
	color: #5c5a6b;
	cursor: pointer;
	transition: all 0.18s;
	font-family: 'Pretendard', sans-serif;
	letter-spacing: -0.04em;
	white-space: nowrap;
	text-decoration: none;
}
.sendi-list-wrap .ctrl-reset:hover {
	border-color: #786BAF;
	color: #786BAF;
}

/* ── 6. 글쓰기 버튼 ── */
.sendi-list-wrap .btn-write-new {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: 8px;
	background: #786BAF;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.18s;
	text-decoration: none;
	white-space: nowrap;
	border: none;
}
.sendi-list-wrap .btn-write-new:hover {
	background: #5a4f8a;
	color: #fff;
}

/* ── 7. 게시판 목록 ── */
.sendi-list-wrap .rec-list {
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid #e0daf4;
	box-shadow: 0 4px 20px rgba(120, 107, 175, 0.07);
	margin-bottom: 0;
}

/* 7-1. 헤더 */
.sendi-list-wrap .rec-list-header {
	display: grid;
	grid-template-columns: 80px 2fr 100px 130px 1fr;
	background: #786BAF;
	color: #fff;
	font-weight: 600;
	font-size: 14px;
}
.sendi-list-wrap .rec-list--has-manager .rec-list-header {
	grid-template-columns: 80px 2fr 100px 130px 1fr 50px;
}
.sendi-list-wrap .rec-list-header > span {
	padding: 13px 18px;
	white-space: nowrap;
	letter-spacing: -0.04em;
	color: #fff;
	font-size: 14px;
}

/* ── 8. 게시판 목록 아이템 ── CSS Grid 5열 */
.sendi-list-wrap .rec-list-item {
	display: grid;
	grid-template-columns: 80px 2fr 100px 130px 1fr;
	align-items: center;
	border-bottom: 1px solid #ece9f5;
	transition: background 0.15s;
	font-size: 14px;
	background: #fff;
}
.sendi-list-wrap .rec-list--has-manager .rec-list-item {
	grid-template-columns: 80px 2fr 100px 130px 1fr 50px;
}
.sendi-list-wrap .rec-list-item:last-child {
	border-bottom: none;
}
.sendi-list-wrap .rec-list-item:hover {
	background: #f0eef9;
}

/* 공지 아이템 */
.sendi-list-wrap .rec-list-item--notice {
	background: #f7f6fc;
}
.sendi-list-wrap .rec-list-item--notice:hover {
	background: #f0eef9;
}

/* 셀 스타일 */
.sendi-list-wrap .rl-num {
	padding: 13px 18px;
	color: #5a4f8a;
	font-weight: 700;
	text-align: center;
	white-space: nowrap;
	font-size: 14px;
}
.sendi-list-wrap .rl-title {
	padding: 13px 18px;
	min-width: 0;
}
.sendi-list-wrap .rl-title-inner {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-wrap: wrap;
}
.sendi-list-wrap .rl-title-inner a {
	color: #1a1825;
	font-weight: 500;
	transition: color 0.15s;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	min-width: 0;
}
.sendi-list-wrap .rl-title-inner a:hover {
	color: #786BAF;
}
.sendi-list-wrap .rl-comment {
	color: #786BAF;
	font-weight: 700;
	font-size: 12px;
	flex-shrink: 0;
}
.sendi-list-wrap .rl-category {
	padding: 13px 18px;
	font-size: 14px;
	color: #5a4f8a;
	font-weight: 600;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sendi-list-wrap .rl-service {
	padding: 13px 18px;
	font-size: 14px;
	color: #1a1825;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sendi-list-wrap .rl-detail {
	padding: 13px 18px;
	font-size: 14px;
	color: #1a1825;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.sendi-list-wrap .rl-check {
	padding: 13px 10px;
	text-align: center;
}
.sendi-list-wrap .rl-mobile-icon {
	display: none;
}

/* ── 9. 배지 ── */
.sendi-list-wrap .rec-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 11px;
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
	line-height: 1.4;
}
.sendi-list-wrap .rec-badge--notice {
	background: #786BAF;
	color: #fff;
	font-size: 10px;
	padding: 2px 8px;
}
.sendi-list-wrap .rec-badge--reply {
	background: #e8f5e9;
	color: #2e7d32;
	border: 1px solid #a5d6a7;
}
.sendi-list-wrap .rec-badge--arch {
	background: #f0eef9;
	color: #5a4f8a;
	border: 1px solid #d4ceed;
}
.sendi-list-wrap .rec-badge--civil {
	background: #e8f4ff;
	color: #1a5c8a;
	border: 1px solid #a0ccf0;
}
.sendi-list-wrap .rec-badge--new {
	background: #fff3e0;
	color: #e65100;
	border: 1px solid #ffcc80;
	font-size: 10px;
	padding: 1px 6px;
	font-weight: 800;
	border-radius: 4px;
	min-width: 18px;
}
.sendi-list-wrap .rl-icon-secret {
	color: #FFD700;
	font-size: 13px;
	flex-shrink: 0;
}

/* ── 10. 작성자 아바타 ── */
.sendi-list-wrap .rec-avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	overflow: hidden;
	background: #f0eef9;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 11px;
	font-weight: 600;
	color: #5a4f8a;
	line-height: 1;
}
.sendi-list-wrap .rec-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

/* ── 11. 빈 결과 ── */
.sendi-list-wrap .rec-empty {
	text-align: center;
	padding: 52px 24px;
	color: #5c5a6b;
	font-size: 14px;
}
.sendi-list-wrap .rec-empty i {
	font-size: 28px;
	color: #d4ceed;
	display: block;
	margin-bottom: 12px;
}
.sendi-list-wrap .rec-empty p {
	margin: 0;
}

/* ── 12. 관리자 푸터 ── */
.sendi-list-wrap .rec-admin-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 0;
}
.sendi-list-wrap .btn-manage {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 18px;
	border-radius: 8px;
	border: 1px solid #e0daf4;
	background: #fff;
	color: #5c5a6b;
	font-size: 12px;
	font-weight: 600;
	transition: all 0.18s;
	text-decoration: none;
}
.sendi-list-wrap .btn-manage:hover {
	border-color: #786BAF;
	color: #786BAF;
	background: #f0eef9;
}

/* ── 13. 페이지네이션 ── */
.sendi-list-wrap .rec-pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 24px;
	padding-bottom: 8px;
}
.sendi-list-wrap .rp-btn {
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: 1px solid #d4ceed;
	background: #fff;
	color: #5c5a6b;
	font-size: 14px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.15s;
	font-family: 'Pretendard', sans-serif;
	text-decoration: none;
}
.sendi-list-wrap .rp-btn.on,
.sendi-list-wrap .rp-btn:hover {
	background: #786BAF;
	color: #fff;
	border-color: #786BAF;
}

/* ── 14. 반응형 ── */

/* ▼ 1100px — 테이블 열 축소 */
@media (max-width: 1100px) {
	.sendi-list-wrap .rec-list-header {
		grid-template-columns: 60px 2fr 90px 110px 1fr;
	}
	.sendi-list-wrap .rec-list--has-manager .rec-list-header {
		grid-template-columns: 60px 2fr 90px 110px 1fr 46px;
	}
	.sendi-list-wrap .rec-list-item {
		grid-template-columns: 60px 2fr 90px 110px 1fr;
	}
	.sendi-list-wrap .rec-list--has-manager .rec-list-item {
		grid-template-columns: 60px 2fr 90px 110px 1fr 46px;
	}
	.sendi-list-wrap .rl-num,
	.sendi-list-wrap .rl-title,
	.sendi-list-wrap .rl-category,
	.sendi-list-wrap .rl-service,
	.sendi-list-wrap .rl-detail,
	.sendi-list-wrap .rec-list-header > span {
		padding-left: 12px;
		padding-right: 12px;
	}
}

/* ▼ 768px — 모바일 카드 레이아웃 */
@media (max-width: 768px) {
	.sendi-list-wrap {
		padding: 16px;
	}
	.sendi-list-wrap .rec-controls {
		padding: 20px;
		gap: 16px;
	}
	.sendi-list-wrap .ctrl-row {
		grid-template-columns: 1fr 1fr;
	}
	.sendi-list-wrap .ctrl-bottom {
		flex-wrap: wrap;
		gap: 10px;
	}
	.sendi-list-wrap .rec-count {
		margin-left: 0;
		order: 1;
	}
	.sendi-list-wrap .record-filter {
		flex: 0 0 100%;
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		padding-bottom: 4px;
		scrollbar-width: none;
		order: 0;
	}
	.sendi-list-wrap .record-filter::-webkit-scrollbar {
		display: none;
	}
	.sendi-list-wrap .rf-btn {
		flex-shrink: 0;
	}
	.sendi-list-wrap .ctrl-reset {
		order: 2;
	}
	.sendi-list-wrap .btn-write-new {
		order: 3;
	}

	/* 헤더 숨김 */
	.sendi-list-wrap .rec-list-header {
		display: none;
	}

	/* 카드 레이아웃 */
	.sendi-list-wrap .rec-list {
		border: none;
		box-shadow: none;
		border-radius: 0;
	}
	.sendi-list-wrap .rec-list-item {
		display: grid;
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"num      category"
			"title    title"
			"service  detail";
		padding: 16px;
		gap: 4px 8px;
		border: 1px solid #e0daf4;
		border-radius: 10px;
		margin-bottom: 10px;
		background: #fff;
	}
	.sendi-list-wrap .rec-list-item:last-child {
		margin-bottom: 0;
	}
	.sendi-list-wrap .rec-list--has-manager .rec-list-item {
		grid-template-columns: 1fr 1fr auto;
		grid-template-areas:
			"num      category check"
			"title    title    title"
			"service  detail   detail";
	}

	/* 그리드 영역 배치 */
	.sendi-list-wrap .rec-list-item .rl-num {
		grid-area: num;
		padding: 0;
		text-align: left;
		font-size: 12px;
		color: #5a4f8a;
		font-weight: 700;
	}
	.sendi-list-wrap .rec-list-item .rl-title {
		grid-area: title;
		padding: 4px 0;
	}
	.sendi-list-wrap .rec-list-item .rl-title-inner {
		flex-wrap: wrap;
	}
	.sendi-list-wrap .rec-list-item .rl-title-inner a {
		font-size: 14px;
		font-weight: 700;
		white-space: normal;
		overflow: visible;
		line-height: 1.45;
	}
	.sendi-list-wrap .rec-list-item .rl-category {
		grid-area: category;
		padding: 0;
		text-align: right;
		font-size: 11px;
	}
	.sendi-list-wrap .rec-list-item .rl-service {
		grid-area: service;
		padding: 4px 0 0;
		font-size: 12px;
		color: #5c5a6b;
	}
	.sendi-list-wrap .rec-list-item .rl-detail {
		grid-area: detail;
		padding: 4px 0 0;
		text-align: right;
		font-size: 11px;
		color: #5c5a6b;
	}
	.sendi-list-wrap .rec-list-item .rl-check {
		grid-area: check;
		padding: 0;
		display: flex;
		align-items: center;
		justify-content: center;
	}
}

/* ▼ 480px — 초소형 */
@media (max-width: 480px) {
	.sendi-list-wrap {
		padding: 12px;
	}
	.sendi-list-wrap .rec-controls {
		padding: 16px;
		border-radius: 10px;
	}
	.sendi-list-wrap .ctrl-row {
		grid-template-columns: 1fr;
	}
	.sendi-list-wrap .btn-write-new {
		width: 100%;
		justify-content: center;
	}
	.sendi-list-wrap .ctrl-reset {
		flex: 1;
		justify-content: center;
	}
	.sendi-list-wrap .rec-list-item {
		padding: 14px 12px;
	}
	.sendi-list-wrap .rp-btn {
		width: 30px;
		height: 30px;
		font-size: 12px;
		border-radius: 6px;
	}
}
