/* MobileN Board - 공통 스타일 */

.mbb-board-wrap {
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	font-size: 14px;
	color: #333;
	line-height: 1.6;
	box-sizing: border-box;
}

/* 테이블 목록 */
.mbb-table {
	width: 100%;
	border-collapse: collapse;
	border-top: 2px solid #333;
}

.mbb-table th,
.mbb-table td {
	padding: 10px 8px;
	border-bottom: 1px solid #e5e5e5;
	text-align: center;
	vertical-align: middle;
}

.mbb-table th {
	background: #f8f9fa;
	font-weight: 600;
	font-size: 13px;
	color: #555;
}

.mbb-table td {
	font-size: 13px;
}

.mbb-table .mbb-col-num { width: 60px; }
.mbb-table .mbb-col-title { text-align: left; }
.mbb-table .mbb-col-author { width: 100px; }
.mbb-table .mbb-col-date { width: 90px; }
.mbb-table .mbb-col-views { width: 60px; }
.mbb-table .mbb-col-likes { width: 60px; }

.mbb-table .mbb-notice-badge {
	display: inline-block;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	padding: 1px 6px;
	border-radius: 3px;
	margin-right: 4px;
}

.mbb-table .mbb-secret-icon {
	margin-right: 4px;
	color: #999;
}

.mbb-table .mbb-comment-count {
	color: #e74c3c;
	font-size: 12px;
	margin-left: 4px;
}

.mbb-table .mbb-file-icon {
	color: #999;
	font-size: 12px;
	margin-left: 4px;
}

.mbb-table a {
	color: #333;
	text-decoration: none;
}

.mbb-table a:hover {
	color: #0073aa;
	text-decoration: underline;
}

.mbb-table tr.mbb-notice-row {
	background: #fffdf5;
}

/* 페이지네이션 */
.mbb-pagination {
	text-align: center;
	margin: 20px 0;
}

.mbb-page-link {
	display: inline-block;
	padding: 6px 12px;
	margin: 0 2px;
	border: 1px solid #ddd;
	color: #333;
	text-decoration: none;
	border-radius: 3px;
	font-size: 13px;
}

.mbb-page-link:hover {
	background: #f5f5f5;
	text-decoration: none;
}

.mbb-page-link.mbb-page-current {
	background: #333;
	color: #fff;
	border-color: #333;
}

/* 검색 폼 */
.mbb-search-form {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0;
}

.mbb-search-form select {
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	line-height: 1.4;
	height: auto;
}

.mbb-search-form input[type="text"] {
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	width: 200px;
}

/* 버튼 */
.mbb-btn {
	display: inline-block;
	padding: 8px 16px;
	border: none;
	border-radius: 3px;
	font-size: 13px !important;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.4;
	box-sizing: border-box;
	height: 36px;
}

.mbb-btn-primary {
	background: #333;
	color: #fff;
}

.mbb-btn-primary:hover {
	background: #555;
	color: #fff;
	text-decoration: none;
}

.mbb-btn-secondary {
	background: #f5f5f5;
	color: #333;
	border: 1px solid #ddd;
}

.mbb-btn-secondary:hover {
	background: #e5e5e5;
	text-decoration: none;
}

.mbb-btn-search {
	background: #333;
	color: #fff;
}

.mbb-btn-search:hover {
	background: #555;
}

.mbb-btn-danger {
	background: #e74c3c;
	color: #fff;
}

.mbb-btn-danger:hover {
	background: #c0392b;
}

/* 목록 상단 툴바 */
.mbb-toolbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.mbb-toolbar-right {
	display: flex;
	align-items: center;
	gap: 8px;
}

.mbb-toolbar-right .mbb-search-form {
	margin: 0;
}

.mbb-toolbar-right .mbb-search-form select,
.mbb-toolbar-right .mbb-search-form input[type="text"],
.mbb-toolbar-right .mbb-btn-search,
.mbb-toolbar-right .mbb-btn {
	box-sizing: border-box;
	height: 36px;
	line-height: 36px;
	padding-top: 0;
	padding-bottom: 0;
	vertical-align: middle;
}

.mbb-btn-search {
	background: #666;
	color: #fff;
	font-size: 13px !important;
}

.mbb-btn-search:hover {
	background: #444;
}

.mbb-total-count {
	font-size: 13px;
	color: #777;
}

.mbb-col-check {
	width: 30px;
	text-align: center;
}

.mbb-col-check input[type="checkbox"] {
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* 권한 없음 */
.mbb-denied {
	padding: 40px 20px;
	text-align: center;
	color: #999;
	background: #f9f9f9;
	border: 1px solid #eee;
	border-radius: 4px;
}

/* 하이라이트 */
mark.mbb-highlight {
	background: #fff3cd;
	padding: 0 2px;
}

/* 상세보기 */
.mbb-view-header {
	border-top: 2px solid #333;
	border-bottom: 1px solid #e5e5e5;
	padding: 15px 0;
}

.mbb-view-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0 0 8px;
}

.mbb-view-meta {
	display: flex;
	gap: 15px;
	font-size: 13px;
	color: #777;
}

.mbb-view-content {
	padding: 20px 0;
	min-height: 200px;
	border-bottom: 1px solid #e5e5e5;
	line-height: 1.8;
	word-break: break-word;
}

.mbb-view-content img {
	max-width: 100%;
	height: auto;
}

/* 좋아요 */
.mbb-like-wrap {
	text-align: center;
	padding: 20px 0;
	border-bottom: 1px solid #e5e5e5;
}

.mbb-like-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 20px;
	border: 1px solid #ddd;
	border-radius: 20px;
	background: #fff;
	cursor: pointer;
	font-size: 14px;
	color: #555;
	transition: all 0.2s;
}

.mbb-like-btn:hover {
	border-color: #e74c3c;
	color: #e74c3c;
}

.mbb-like-btn.mbb-liked {
	border-color: #e74c3c;
	color: #e74c3c;
	background: #fff5f5;
}

/* 첨부파일 */
.mbb-files {
	padding: 15px 0;
	border-bottom: 1px solid #e5e5e5;
}

.mbb-files-title {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 8px;
}

.mbb-file-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 4px 0;
	font-size: 13px;
}

.mbb-file-item a {
	color: #0073aa;
	text-decoration: none;
}

.mbb-file-item a:hover {
	text-decoration: underline;
}

.mbb-file-size {
	color: #999;
	font-size: 12px;
}

/* 상세보기 하단 버튼 */
.mbb-view-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 15px 0;
}

/* 별점 */
.mbb-rating {
	color: #f39c12;
	font-size: 14px;
}

.mbb-rating-input {
	display: inline-flex;
	gap: 2px;
	cursor: pointer;
}

.mbb-rating-input .star {
	font-size: 24px;
	color: #ddd;
	cursor: pointer;
}

.mbb-rating-input .star.active {
	color: #f39c12;
}

/* 글쓰기 폼 */
.mbb-write-form {
	border-top: 2px solid #333;
}

.mbb-form-row {
	display: flex;
	border-bottom: 1px solid #e5e5e5;
}

.mbb-form-label {
	width: 120px;
	padding: 10px 15px;
	background: #f8f9fa;
	font-weight: 600;
	font-size: 13px;
	display: flex;
	align-items: center;
}

.mbb-form-field {
	flex: 1;
	padding: 10px 15px;
}

.mbb-form-field input[type="text"],
.mbb-form-field input[type="password"],
.mbb-form-field textarea,
.mbb-form-field select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	box-sizing: border-box;
}

.mbb-form-field textarea {
	min-height: 300px;
	resize: vertical;
}

.mbb-form-field input[type="checkbox"] {
	margin-right: 6px;
}

/* wp_editor 스타일 보정 */
.mbb-editor-field .wp-editor-wrap {
	width: 100%;
}

.mbb-editor-field .wp-editor-tools {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 6px 8px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-bottom: none;
}

.mbb-editor-field .wp-media-buttons {
	float: none;
	margin: 0;
}

.mbb-editor-field .wp-media-buttons .insert-media {
	font-size: 13px;
	line-height: 1.4;
	padding: 4px 10px;
}

.mbb-editor-field .wp-editor-tabs {
	float: none;
	margin: 0;
	display: flex;
	gap: 4px;
}

.mbb-editor-field .wp-editor-tabs .wp-switch-editor {
	float: none;
	margin: 0;
	padding: 4px 10px;
	height: auto;
	font-size: 13px;
	line-height: 1.4;
	box-sizing: border-box;
}

.mbb-editor-field .wp-editor-container {
	border: 1px solid #ddd;
}

.mbb-editor-field .wp-editor-area {
	width: 100% !important;
	min-height: 300px;
}

.mbb-editor-field .mce-toolbar-grp {
	border-bottom: 1px solid #ddd;
}

/* Summernote 보정 */
.mbb-editor-field .note-editor {
	border: 1px solid #ddd;
}

.mbb-editor-field .note-editor .note-editing-area .note-editable {
	min-height: 300px;
}

/* CKEditor 보정 */
.mbb-editor-field .ck-editor {
	width: 100%;
}

.mbb-editor-field .ck-editor__editable {
	min-height: 300px;
}

/* Smart Editor 2 보정 */
.mbb-editor-field #mbb_content + iframe,
.mbb-editor-field .husky_seditor_outer {
	width: 100% !important;
	min-height: 400px;
	border: 1px solid #ddd;
}

.mbb-form-actions {
	display: flex;
	justify-content: center;
	gap: 8px;
	padding: 20px 0;
}

/* 파일 업로드 영역 */
.mbb-upload-area {
	border: 2px dashed #ddd;
	border-radius: 4px;
	padding: 20px;
	text-align: center;
	margin-top: 8px;
	cursor: pointer;
	transition: border-color 0.2s;
}

.mbb-upload-area:hover,
.mbb-upload-area.mbb-drag-over {
	border-color: #0073aa;
	background: #f0f8ff;
}

.mbb-upload-area p {
	margin: 0;
	color: #999;
	font-size: 13px;
}

.mbb-upload-list {
	margin-top: 10px;
}

.mbb-upload-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 6px 10px;
	background: #f8f9fa;
	border: 1px solid #eee;
	border-radius: 3px;
	margin-bottom: 4px;
	font-size: 13px;
}

.mbb-upload-item .mbb-upload-preview {
	width: 40px;
	height: 40px;
	object-fit: cover;
	border-radius: 3px;
	margin-right: 8px;
}

.mbb-upload-item .mbb-remove-file {
	color: #e74c3c;
	cursor: pointer;
	border: none;
	background: none;
	font-size: 16px;
}

/* 댓글 영역 */
.mbb-comments {
	margin-top: 30px;
}

.mbb-comments-title {
	font-size: 15px;
	font-weight: 600;
	margin-bottom: 15px;
	padding-bottom: 10px;
	border-bottom: 1px solid #e5e5e5;
}

.mbb-comment-item {
	padding: 12px 0;
	border-bottom: 1px solid #f0f0f0;
}

.mbb-comment-item.mbb-reply {
	margin-left: 40px;
	padding-left: 15px;
	border-left: 2px solid #e5e5e5;
}

.mbb-comment-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 6px;
	font-size: 13px;
}

.mbb-comment-author {
	font-weight: 600;
}

.mbb-comment-date {
	color: #999;
}

.mbb-comment-actions {
	margin-left: auto;
	display: flex;
	gap: 8px;
}

.mbb-comment-actions a,
.mbb-comment-actions button {
	font-size: 12px;
	color: #999;
	cursor: pointer;
	background: none;
	border: none;
	padding: 0;
	text-decoration: none;
}

.mbb-comment-actions a:hover,
.mbb-comment-actions button:hover {
	color: #333;
}

.mbb-comment-content {
	font-size: 14px;
	line-height: 1.6;
}

.mbb-comment-content.mbb-secret {
	color: #999;
	font-style: italic;
}

.mbb-comment-content.mbb-deleted {
	color: #999;
	font-style: italic;
}

/* 댓글 작성 폼 */
.mbb-comment-form {
	margin-top: 20px;
	padding: 15px;
	background: #f8f9fa;
	border-radius: 4px;
}

.mbb-comment-form textarea {
	width: 100%;
	min-height: 80px;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	resize: vertical;
	box-sizing: border-box;
}

.mbb-comment-form-meta {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.mbb-comment-form-meta input {
	padding: 6px 10px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	width: 150px;
}

.mbb-comment-form-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 8px;
}

.mbb-comment-form-actions label {
	font-size: 13px;
	color: #666;
}

/* 대댓글 폼 */
.mbb-reply-form {
	margin-top: 10px;
	padding: 10px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 4px;
	display: none;
}

.mbb-reply-form textarea {
	width: 100%;
	min-height: 60px;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 3px;
	font-size: 13px;
	resize: vertical;
	box-sizing: border-box;
}

/* QnA 뱃지 */
.mbb-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
}

.mbb-badge-answered {
	background: #d4edda;
	color: #155724;
}

.mbb-badge-waiting {
	background: #fff3cd;
	color: #856404;
}

.mbb-badge-notice {
	background: #e74c3c;
	color: #fff;
}

/* 반응형 */
@media (max-width: 768px) {
	.mbb-board-wrap {
		font-size: 13px;
	}

	.mbb-table .mbb-col-num,
	.mbb-table .mbb-col-views,
	.mbb-table .mbb-col-likes {
		display: none;
	}

	.mbb-table th,
	.mbb-table td {
		padding: 8px 4px;
	}

	.mbb-view-meta {
		flex-wrap: wrap;
		gap: 8px;
	}

	.mbb-form-row {
		flex-direction: column;
	}

	.mbb-form-label {
		width: 100%;
		padding: 8px 15px;
	}

	.mbb-search-form {
		flex-wrap: nowrap;
	}

	.mbb-search-form select {
		flex-shrink: 0;
		font-size: 11px;
		padding: 6px 4px;
		max-width: 80px;
	}

	.mbb-search-form input[type="text"] {
		flex: 1;
		min-width: 0;
	}

	.mbb-search-form .mbb-btn-search {
		flex-shrink: 0;
	}

	.mbb-toolbar {
		flex-direction: column;
		gap: 8px;
		align-items: stretch;
	}

	.mbb-toolbar-right {
		display: flex;
		flex-wrap: nowrap;
		align-items: center;
		gap: 6px;
	}

	.mbb-toolbar-right .mbb-search-form {
		flex: 1;
		min-width: 0;
	}

	.mbb-toolbar-right .mbb-btn {
		flex-shrink: 0;
		white-space: nowrap;
	}

	.mbb-comment-item.mbb-reply {
		margin-left: 20px;
	}

	.mbb-comment-form-meta {
		flex-direction: column;
	}

	.mbb-comment-form-meta input {
		width: 100%;
	}
}
