@charset "utf-8";
/* Comment Styles - Sendi Board 2 */
/* Based on board_detail.html design */

/* ========================================
   댓글 컨테이너
   ======================================== */
#comment {
	margin-top: 24px;
}

/* ========================================
   댓글 입력 폼 - 독립 섹션
   ======================================== */
.comment-form {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	padding: 24px;
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

.comment-input-wrap {
	display: flex;
	gap: 12px;
}

.comment-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--bg-tertiary);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--text-tertiary);
	flex-shrink: 0;
	overflow: hidden;
}

.comment-avatar i {
	font-size: 18px;
}

.comment-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.comment-input-box {
	flex: 1;
}

/* 비로그인 사용자 입력 */
.comment-guest-info {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.comment-input {
	flex: 1;
	padding: 10px 14px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-sm);
	font-size: var(--font-caption);
	font-family: inherit;
	transition: var(--transition);
	background: var(--bg-primary);
	color: var(--text-primary);
}

.comment-input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.1);
}

.comment-input::placeholder {
	color: var(--text-tertiary);
}

/* 댓글 textarea 스타일 */
.comment-textarea {
	width: 100%;
	min-height: 100px;
	padding: 14px 16px;
	border: 1px solid var(--border-default);
	border-radius: var(--radius-sm);
	font-size: var(--font-body);
	font-family: inherit;
	line-height: 1.6;
	resize: vertical;
	transition: var(--transition);
	background: var(--bg-primary);
	color: var(--text-primary);
	box-sizing: border-box;
}

.comment-textarea:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.1);
}

.comment-textarea::placeholder {
	color: var(--text-tertiary);
}

/* 댓글 옵션 */
.comment-options {
	display: flex;
	justify-content: flex-end;
	align-items: center;
	margin-top: 12px;
}

.comment-options-left {
	display: flex;
	gap: 16px;
}

.comment-option {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: var(--font-small);
	color: var(--text-secondary);
	cursor: pointer;
}

.comment-option input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--accent);
}

.comment-submit {
	display: flex;
	justify-content: flex-end;
}

.comment-submit button,
.comment-submit .sendi-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px !important;
	padding: 0 24px;
	font-size: var(--font-caption);
	font-weight: 400;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	border: none;
	background: var(--accent);
	color: white;
}

.comment-submit button:hover,
.comment-submit .sendi-btn:hover {
	background: var(--accent-hover);
}

/* 캡차 */
.comment-captcha {
	margin-top: 12px;
	padding: 12px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
}

/* ========================================
   댓글 섹션
   ======================================== */
.comments-section {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	border: 1px solid var(--border-subtle);
	overflow: hidden;
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

.comments-header {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-subtle);
}

.comments-header i {
	color: var(--text-secondary);
	font-size: 16px;
}

.comments-title {
	font-size: var(--font-body);
	font-weight: 600;
	color: var(--text-primary);
}

.comments-count {
	font-size: var(--font-caption);
	color: var(--accent);
	font-weight: 600;
}

/* ========================================
   댓글 목록
   ======================================== */
.comment-list {
	padding-bottom: 20px;
	margin: 0;
}

.comment-list > div,
.comment-item {
	padding: 24px;
	border-bottom: 1px solid var(--border-subtle);
	transition: var(--transition);
}

.comment-list > div:last-child,
.comment-item:last-child {
	border-bottom: none;
}

/* 일반 댓글 다음에 대댓글이 오는 경우 border-bottom 제거 및 padding 조정 */
.comment-list > div:not(.comment-reply):has(+ div.comment-reply),
.comment-item:not(.comment-reply):has(+ .comment-item.comment-reply) {
	border-bottom: none;
	padding-bottom: 5px;
}


.comment-item-header {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
}

.comment-item-avatar {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 600;
	color: white;
	flex-shrink: 0;
	text-transform: uppercase;
}

.comment-item-avatar-img {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.comment-item-info {
	flex: 1;
}

.comment-item-author {
	font-size: var(--font-caption);
	font-weight: 600;
	color: var(--text-primary);
	margin-bottom: 2px;
}

.comment-item-author a {
	color: var(--text-primary);
	text-decoration: none;
}

.comment-item-author a:hover {
	color: var(--accent);
}

.comment-item-date {
	font-size: var(--font-small);
	color: var(--text-tertiary);
}

.comment-item-content {
	font-size: var(--font-caption);
	line-height: 1.7;
	color: var(--text-primary);
	margin-left: 48px;
	white-space: pre-line;
}

.comment-item-content code {
	background: var(--bg-secondary);
	padding: 2px 6px;
	border-radius: 4px;
	font-size: var(--font-small);
	font-family: 'SF Mono', Monaco, monospace;
}

/* 삭제된 댓글 */
.comment-item-content.deleted {
	color: var(--text-tertiary);
	font-style: italic;
}

/* 비밀 댓글 폼 */
.comment-secret-form {
	margin-left: 48px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.comment-secret-form p {
	font-size: var(--font-caption);
	color: var(--text-secondary);
	margin: 0;
	display: flex;
	align-items: center;
	gap: 6px;
}

.comment-secret-form p i {
	color: var(--text-tertiary);
}

.comment-secret-form .comment-input {
	flex: 0 1 200px;
}

/* ========================================
   댓글 첨부파일
   ======================================== */
.comment-files {
	margin-left: 48px;
	margin-top: 12px;
}

.comment-files-toggle {
	font-size: var(--font-small);
	color: var(--text-secondary);
	background: var(--bg-secondary);
	border: none;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.comment-files-toggle:hover {
	background: var(--bg-tertiary);
}

.comment-files-toggle i {
	font-size: 12px;
}

.comment-files-list {
	display: none;
	list-style: none;
	margin-top: 8px;
	padding: 0;
}

.comment-files-list li {
	padding: 4px 0;
}

.comment-files-list a {
	font-size: var(--font-small);
	color: var(--accent);
	text-decoration: none;
}

.comment-files-list a:hover {
	text-decoration: underline;
}

/* ========================================
   댓글 액션 버튼
   ======================================== */
.comment-item-actions {
	display: flex;
	gap: 12px;
	margin-left: 48px;
	margin-top: 12px;
}

.comment-action-btn {
	font-size: var(--font-small);
	color: var(--text-tertiary);
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.comment-action-btn:hover {
	color: var(--text-primary);
}

.comment-action-btn.active {
	color: var(--accent);
}

.comment-action-btn.active i {
	color: var(--accent);
}

.comment-action-btn i {
	font-size: 12px;
}

/* ========================================
   대댓글 (답글) 스타일
   board_detail.html 참조 - 부모 댓글 내부에 중첩
   ======================================== */
.comment-reply {
	margin-left: 48px;
	margin-top: 16px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
}

.comment-reply .comment-item-header {
	margin-bottom: 8px;
}

.comment-reply .comment-item-avatar {
	width: 28px;
	height: 28px;
	font-size: 10px;
}

.comment-reply .comment-item-avatar-img {
	width: 28px;
	height: 28px;
}

.comment-reply .comment-item-content {
	margin-left: 40px;
}

.comment-reply .comment-item-actions {
	margin-left: 40px;
}

.comment-reply .comment-files {
	margin-left: 40px;
}

.comment-reply .comment-secret-form {
	margin-left: 40px;
}

/* XE 스킨용 대댓글 (클래스로 구분되는 경우) */
.comment-item.comment-reply,
.comment-list > div.comment-reply {
	margin-left: 48px;
	margin-right: 16px;
	margin-top: 16px;
	padding: 16px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
	border-bottom: none;
	margin-bottom: 0;
}

/* 대댓글 depth별 마진 (1차~5차) */
.comment-item.comment-depth-1,
.comment-list > div.comment-depth-1 {
	margin-left: 48px;
}

.comment-item.comment-depth-2,
.comment-list > div.comment-depth-2 {
	margin-left: 96px;
}

.comment-item.comment-depth-3,
.comment-list > div.comment-depth-3 {
	margin-left: 144px;
}

.comment-item.comment-depth-4,
.comment-list > div.comment-depth-4 {
	margin-left: 192px;
}

.comment-item.comment-depth-5,
.comment-list > div.comment-depth-5 {
	margin-left: 240px;
}

/* 연속 대댓글 간 간격 조정 */
.comment-item.comment-reply + .comment-item.comment-reply,
.comment-list > div.comment-reply + div.comment-reply {
	margin-top: 8px;
}

/* 대댓글 다음 일반 댓글 간격 */
.comment-item.comment-reply + .comment-item:not(.comment-reply),
.comment-list > div.comment-reply + div:not(.comment-reply) {
	margin-top: 0;
}

.comment-item.comment-reply .comment-item-content,
.comment-item.comment-reply .comment-item-actions,
.comment-item.comment-reply .comment-files,
.comment-item.comment-reply .comment-secret-form,
.comment-list > div.comment-reply .comment-item-content,
.comment-list > div.comment-reply .comment-item-actions,
.comment-list > div.comment-reply .comment-files,
.comment-list > div.comment-reply .comment-secret-form {
	margin-left: 40px;
}

.comment-item.comment-reply .comment-item-avatar,
.comment-item.comment-reply .comment-item-avatar-img,
.comment-list > div.comment-reply .comment-item-avatar,
.comment-list > div.comment-reply .comment-item-avatar-img {
	width: 28px;
	height: 28px;
	font-size: 10px;
}

/* ========================================
   인라인 답글 폼
   ======================================== */
.comment-reply-form {
	margin-left: 48px;
	margin-top: 16px;
	padding: 20px;
	background: var(--bg-secondary);
	border-radius: var(--radius-sm);
	border: 1px solid var(--border-subtle);
}

.comment-reply-form .comment-textarea {
	min-height: 80px;
	margin-bottom: 0;
}

.comment-reply-guest {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.comment-reply-guest .comment-input {
	flex: 1;
}

.comment-reply-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-top: 12px;
}

.comment-reply-actions .sendi-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 38px;
	padding: 0 16px;
	font-size: var(--font-small);
	font-weight: 500;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	border: none;
}

.comment-reply-actions .sendi-btn-primary {
	background: var(--accent);
	color: white;
}

.comment-reply-actions .sendi-btn-primary:hover {
	background: var(--accent-hover);
}

.comment-reply-actions .sendi-btn-cancel {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	border: 1px solid var(--border-default);
}

.comment-reply-actions .sendi-btn-cancel:hover {
	background: var(--bg-secondary);
	color: var(--text-primary);
	border-color: var(--border-strong);
}

/* 대댓글 내의 인라인 답글 폼 */
.comment-reply .comment-reply-form,
.comment-item.comment-reply .comment-reply-form {
	margin-left: 0;
}

/* ========================================
   댓글 페이지네이션
   ======================================== */
.comment-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	padding: 20px 24px;
	border-top: 1px solid var(--border-subtle);
}

.comment-page-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: var(--font-caption);
	color: var(--text-secondary);
	text-decoration: none;
	border-radius: var(--radius-sm);
	transition: var(--transition);
}

.comment-page-btn:hover {
	background: var(--bg-secondary);
	color: var(--text-primary);
}

.comment-page-current {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 8px;
	font-size: var(--font-caption);
	font-weight: 600;
	color: white;
	background: var(--accent);
	border-radius: var(--radius-sm);
}

/* ========================================
   댓글 수정 모달
   ======================================== */
.comment-modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.comment-modal {
	background: var(--bg-primary);
	border-radius: var(--radius-lg);
	width: 90%;
	max-width: 500px;
	max-height: 80vh;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.comment-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border-subtle);
}

.comment-modal-header h3 {
	margin: 0;
	font-size: var(--font-body);
	font-weight: 600;
}

.comment-modal-close {
	background: none;
	border: none;
	font-size: 20px;
	color: var(--text-tertiary);
	cursor: pointer;
	padding: 4px;
}

.comment-modal-close:hover {
	color: var(--text-primary);
}

.comment-modal-body {
	padding: 24px;
}

.comment-modal-body .comment-textarea {
	min-height: 150px;
}

.comment-edit-password {
	margin-bottom: 16px;
}

.comment-modal-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 24px;
	border-top: 1px solid var(--border-subtle);
	background: var(--bg-secondary);
}

.comment-modal-footer .sendi-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 40px;
	padding: 0 20px;
	font-size: var(--font-caption);
	font-weight: 500;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	text-decoration: none;
	border: none;
}

.comment-modal-footer .sendi-btn-primary {
	background: var(--accent);
	color: white;
}

.comment-modal-footer .sendi-btn-primary:hover {
	background: var(--accent-hover);
}

.comment-modal-footer .sendi-btn-cancel {
	background: var(--bg-tertiary);
	color: var(--text-secondary);
	border: 1px solid var(--border-default);
}

.comment-modal-footer .sendi-btn-cancel:hover {
	background: var(--bg-secondary);
	color: var(--text-primary);
	border-color: var(--border-strong);
}

.comment-modal-footer .sendi-btn-danger {
	background: #dc3545;
	color: white;
}

.comment-modal-footer .sendi-btn-danger:hover {
	background: #c82333;
}

/* 삭제 확인 모달 (작은 모달) */
.comment-modal-small {
	max-width: 360px;
}

.comment-modal-small .comment-modal-body {
	padding: 24px;
	text-align: center;
}

.comment-delete-message {
	margin: 0;
	font-size: var(--font-body);
	color: var(--text-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.comment-delete-message i {
	color: #dc3545;
	font-size: 20px;
}

/* ========================================
   반응형 디자인
   ======================================== */
@media (max-width: 768px) {
	.comment-form {
		padding: 16px;
	}

	.comment-input-wrap {
		flex-direction: column;
	}

	.comment-avatar {
		display: none;
	}

	.comment-item,
	.comment-list > div {
		padding: 16px;
	}

	.comment-item-content,
	.comment-item-actions {
		margin-left: 0;
		margin-top: 12px;
	}

	.comment-files,
	.comment-secret-form {
		margin-left: 0;
		margin-top: 12px;
	}

	.comment-guest-info {
		flex-direction: column;
	}

	.comment-options {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.comment-submit {
		width: 100%;
	}

	.comment-submit .sendi-btn {
		width: 100%;
		justify-content: center;
	}

	.comment-reply,
	.comment-item.comment-reply,
	.comment-list > div.comment-reply {
		margin-left: 16px;
		padding: 12px;
	}

	/* 모바일 depth별 마진 */
	.comment-item.comment-depth-1,
	.comment-list > div.comment-depth-1 {
		margin-left: 16px;
	}

	.comment-item.comment-depth-2,
	.comment-list > div.comment-depth-2 {
		margin-left: 32px;
	}

	.comment-item.comment-depth-3,
	.comment-list > div.comment-depth-3 {
		margin-left: 48px;
	}

	.comment-item.comment-depth-4,
	.comment-list > div.comment-depth-4 {
		margin-left: 64px;
	}

	.comment-item.comment-depth-5,
	.comment-list > div.comment-depth-5 {
		margin-left: 80px;
	}

	.comment-reply .comment-item-content,
	.comment-reply .comment-item-actions,
	.comment-reply .comment-files,
	.comment-item.comment-reply .comment-item-content,
	.comment-item.comment-reply .comment-item-actions,
	.comment-item.comment-reply .comment-files,
	.comment-list > div.comment-reply .comment-item-content,
	.comment-list > div.comment-reply .comment-item-actions,
	.comment-list > div.comment-reply .comment-files {
		margin-left: 0;
	}

	.comment-secret-form {
		flex-direction: column;
		align-items: stretch;
	}

	.comment-secret-form .comment-input {
		width: 100%;
		flex: 1;
	}

	/* 모바일 인라인 답글 폼 */
	.comment-reply-form {
		margin-left: 0;
		margin-top: 12px;
		padding: 16px;
	}

	.comment-reply-guest {
		flex-direction: column;
	}

	.comment-reply-actions {
		flex-direction: column;
	}

	.comment-reply-actions .sendi-btn {
		width: 100%;
		justify-content: center;
	}

	.comments-header {
		padding: 16px;
	}

	.comment-pagination {
		padding: 16px;
	}

	/* 모바일 댓글 수정 모달 */
	.comment-modal {
		width: 95%;
		max-height: 90vh;
	}

	.comment-modal-header {
		padding: 16px 20px;
	}

	.comment-modal-body {
		padding: 20px;
	}

	.comment-modal-footer {
		padding: 16px 20px;
		flex-direction: column;
	}

	.comment-modal-footer .sendi-btn {
		width: 100%;
		justify-content: center;
	}
}


.xe_content, .rhymix_content br{
	line-height: 1;
}