@charset "UTF-8";

/* ==========================================================================
   Modern Community & Archive - Main Stylesheet
   ========================================================================== */

:root {
	--primary-gradient: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
	--card-border-radius: 0.85rem;
}

/* PC/마우스 환경: 스크롤바 영구 고정 & 모던 슬림 투명 스크롤바 (너비 들썩임 원천 차단) */
@media (pointer: fine) {
	html {
		overflow-y: scroll;
	}

	::-webkit-scrollbar {
		width: 8px;
		height: 8px;
	}

	::-webkit-scrollbar-track {
		background: transparent;
	}

	::-webkit-scrollbar-thumb {
		background: rgba(0, 0, 0, 0.2);
		border-radius: 9999px;
	}

	::-webkit-scrollbar-thumb:hover {
		background: rgba(0, 0, 0, 0.38);
	}

	* {
		scrollbar-width: thin;
		scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
	}
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #333d4b;
	line-height: 1.6;
}

a {
	text-decoration: none;
}

/* 카드 및 컨테이너 스타일 */
.card-custom {
	border: none;
	border-radius: var(--card-border-radius);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	background: #ffffff;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-custom:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.card-gallery {
	overflow: hidden;
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-gallery:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

/* 썸네일 컨테이너 (순수 CSS 연회색 배경 & 스무스 fadeIn) */
.thumb-container {
	position: relative;
	width: 100%;
	padding-top: 66.66%; /* 3:2 비율 */
	background-color: #f1f5f9;
	overflow: hidden;
}

.thumb-container img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: app-img-fadein 0.3s ease-out forwards;
	transition: transform 0.35s ease;
}

.card-gallery:hover .thumb-container img {
	transform: scale(1.04);
}

@keyframes app-img-fadein {
	from { opacity: 0; }
	to { opacity: 1; }
}

.thumb-badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 5 !important;
	font-weight: 500;
	backdrop-filter: blur(4px);
}

.no-image-box {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: #eef2f6;
	color: #8c9ba5;
	font-size: 0.9rem;
	font-weight: 500;
}

.no-image-box i {
	font-size: 2.2rem;
	margin-bottom: 0.25rem;
	opacity: 0.6;
}

/* 속성 카드 (Property Card) */
.property-card {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 0.75rem;
	padding: 1.25rem;
}

.property-item {
	display: flex;
	align-items: center;
	padding: 0.5rem 0;
	border-bottom: 1px dashed #e2e8f0;
}

.property-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.property-label {
	width: 120px;
	font-weight: 600;
	color: #64748b;
	font-size: 0.9rem;
}

.property-value {
	flex: 1;
	font-size: 0.95rem;
}

/* 댓글 영역 */
.comment-item {
	padding: 1rem 0;
	border-bottom: 1px solid #f1f5f9;
}

.comment-item:last-child {
	border-bottom: none;
}

#comment-list:has(> .comment-item) + #comment-new-items > .comment-item:first-child {
	border-top: 1px solid #f1f5f9;
}

/* Toast notifications */
#app-toast-container {
	z-index: 1090;
	margin-top: 4rem;
}

.app-toast {
	width: min(360px, calc(100vw - 2rem));
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.2);
}

/* EasyMDE 마크다운 에디터 툴바 1줄 정렬 & 모던 스타일 */
.EasyMDEContainer {
	border-radius: 0.5rem;
}

.editor-toolbar {
	display: flex !important;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	align-items: center;
	padding: 6px 10px !important;
	background: #f8fafc !important;
	border: 1px solid #ced4da !important;
	border-bottom: 1px solid #e2e8f0 !important;
	border-radius: 0.5rem 0.5rem 0 0 !important;
}

.editor-toolbar button {
	width: 32px !important;
	height: 32px !important;
	min-width: 32px !important;
	padding: 0 !important;
	margin: 0 1px !important;
	border-radius: 4px !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	flex-shrink: 0 !important;
	color: #475569 !important;
	border: 1px solid transparent !important;
	transition: all 0.15s ease;
}

.editor-toolbar button:hover,
.editor-toolbar button.active {
	background: #e2e8f0 !important;
	color: #0d6efd !important;
	border-color: #cbd5e1 !important;
}

.editor-toolbar i.separator {
	display: inline-block !important;
	margin: 0 6px !important;
	border-left: 1px solid #cbd5e1 !important;
	border-right: none !important;
	height: 18px !important;
	flex-shrink: 0 !important;
}

.CodeMirror {
	border: 1px solid #ced4da !important;
	border-top: none !important;
	border-radius: 0 0 0.5rem 0.5rem !important;
	min-height: 300px !important;
	font-family: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	font-size: 0.95rem !important;
	padding: 4px 8px !important;
}

/* ==========================================================================
   Dynamic Staggered Fade-in (CSS 변수 기반 자동 연산 순차 애니메이션)
   ========================================================================== */
@keyframes fadeInUpItem {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gallery-stagger-item {
	opacity: 0;
	animation: fadeInUpItem 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	animation-delay: calc(var(--i, 0) * 35ms);
}

@keyframes fadeInTableRow {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}


/* ==========================================================================
   Soft & Modern Skeleton Placeholders (초연한 모던 스켈레톤 플레이스홀더)
   ========================================================================== */
.placeholder {
	background-color: #e9ecef !important;
	opacity: 0.55 !important;
	border-radius: 4px;
}

.placeholder-glow .placeholder {
	animation: placeholderGlowSoft 1.6s ease-in-out infinite;
}

@keyframes placeholderGlowSoft {
	50% {
		opacity: 0.25;
	}
}

.card-gallery .thumb-container .placeholder {
	background-color: #e9ecef !important;
	opacity: 0.55 !important;
}
