@charset "UTF-8";

/* =========================
   cafe.css
   - 공통 레이아웃/변수는 common.css
   - 도란카페 전용: 툴바, 카페 목록, 카드, 모달, 회원 명단
   ========================= */


/* =========================
   0. 페이지 레벨 변수 & 기본 설정
   ========================= */
#cafe_page {
	background: var(--bg);
	--topbar-z: 60;
	--topbar-bg: rgba(251, 251, 253, .92);
	--topbar-inner-max: 1240px;
	--topbar-inner-pad: .75rem 1rem;
}

#cafe_page .topbar-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid var(--line);
	box-shadow: var(--shadow2);
}

#cafe_page .topbar-icon i {
	font-size: 1.35rem;
}


/* =========================
   1. 카페 툴바 (검색 + 만들기 버튼)
   ========================= */
.cafe-toolbar {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}

/* =========================
   2. 만들기 버튼
   ========================= */
.cafe-create-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 9px 20px;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	cursor: pointer;
	white-space: nowrap;
	box-shadow: 0 2px 8px rgba(102, 126, 234, .25);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	letter-spacing: 0.01em;
	flex-shrink: 0;
}

.cafe-create-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, .35);
}

.cafe-create-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px rgba(102, 126, 234, .2);
}


/* =========================
   3. 검색 바
   ========================= */
.cafe-search-wrap {
	display: flex;
	align-items: center;
	flex: 1;
	min-width: 0;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	background: #fff;
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cafe-search-wrap:focus-within {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, .10);
}

.cafe-search-input {
	flex: 1;
	min-width: 0;
	border: none;
	outline: none;
	padding: 8px 12px;
	font-size: 0.85rem;
	color: #333;
	background: transparent;
}

.cafe-search-input::placeholder {
	color: #adb5bd;
	font-size: 0.8rem;
}

.cafe-search-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 36px;
	border: none;
	background: transparent;
	color: #888;
	cursor: pointer;
	transition: color 0.15s ease;
	flex-shrink: 0;
}

.cafe-search-btn:hover {
	color: #667eea;
}


/* =========================
   4. 카페 리스트
   ========================= */
.cafe-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}


/* =========================
   5. 카페 카드
   ========================= */
.cafe-card {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #f0f0f0;
	border-radius: 12px;
	margin-bottom: 10px;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
	animation: cafeCardFadeIn 0.3s ease both;
}

.cafe-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
	border-color: #e0e0e0;
}

/* 순차적 fade-in 딜레이 (JS에서 style로 추가해도 됨) */
@keyframes cafeCardFadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 카페 아이콘 영역 */
.cafe-card-icon {
	width: 42px;
	height: 42px;
	border-radius: 10px;
	background: linear-gradient(135deg, rgba(102, 126, 234, .10), rgba(118, 75, 162, .10));
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	font-size: 1.3rem;
}

/* 카페 정보 영역 */
.cafe-card-body {
	flex: 1;
	min-width: 0;
}

.cafe-card-name {
	font-size: 0.95rem;
	font-weight: 600;
	color: #4a4a4a;
	cursor: pointer;
	transition: color 0.15s ease;
	margin-bottom: 3px;
	display: inline-block;
}

.cafe-card-name:hover {
	color: #667eea;
}

.cafe-card-desc {
	font-size: 0.78rem;
	color: #999;
	line-height: 1.4;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	word-break: break-all;
	max-width: 100%;
	margin-bottom: 4px;
}

.cafe-card-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 14px;
	font-size: 0.75rem;
	color: #999;
}

.cafe-card-meta span {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.cafe-card-meta i {
	font-size: 0.72rem;
	opacity: 0.7;
}

/* 카페 액션 버튼 영역 */
.cafe-card-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
}


/* 액션 버튼 영역 — 통일 크기 */
#cafe_action_buttons .btn,
#cafe_action_buttons .cafe-btn,
#cafe_action_buttons .cafe-submit-btn {
	font-size: 0.78rem !important;
	padding: 5px 14px !important;
	border-radius: 8px !important;
	font-weight: 500;
}

.cafe-btn-edit,
.cafe-btn-join,
.cafe-btn-leave {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 5px 12px;
	border-radius: 8px;
	font-size: 0.78rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	border: 1px solid transparent;
}

/* 수정(관리) 버튼 */
.cafe-btn-edit {
	color: #6c757d;
	background: #f8f9fa;
	border-color: #e0e0e0;
}

.cafe-btn-edit:hover {
	background: #e9ecef;
	color: #495057;
	border-color: #ced4da;
}

/* 가입 버튼 */
.cafe-btn-join {
	color: #fff;
	background: linear-gradient(135deg, #38c6a3, #69db7c);
	border-color: transparent;
	box-shadow: 0 2px 6px rgba(56, 198, 163, .2);
}

.cafe-btn-join:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(56, 198, 163, .3);
}

.cafe-btn-join:active {
	transform: translateY(0);
}

/* 탈퇴 버튼 — 차분한 회색 톤 */
.cafe-btn-leave {
	color: #6c757d;
	background: transparent;
	border-color: #ced4da;
}

.cafe-btn-leave:hover {
	background: #f1f3f5;
	border-color: #adb5bd;
	color: #495057;
}

/* 가입됨 뱃지 (버튼 대신 표시) */
.cafe-badge-joined {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 4px 10px;
	border-radius: 8px;
	font-size: 0.72rem;
	font-weight: 500;
	color: #38c6a3;
	background: rgba(56, 198, 163, .08);
	border: 1px solid rgba(56, 198, 163, .15);
}


/* =========================
   7. 모달 스타일
   ========================= */
.cafe-modal {
	border-radius: 16px;
	border: 1px solid #dee2e6;
	overflow: hidden;
}

.cafe-modal-header {
	background: linear-gradient(135deg, #f8f9ff 0%, #faf7ff 100%);
	border-bottom: 1px solid rgba(0, 0, 0, .06);
	padding: 16px 20px;
}

.cafe-modal-header .modal-title {
	font-size: 1.1rem;
	font-weight: 600;
	color: #333;
}

.cafe-modal .modal-body {
	padding: 20px 24px;
}

.cafe-modal .modal-footer {
	border-top: 1px solid rgba(0, 0, 0, .06);
	padding: 14px 20px;
	background: #fafbfc;
}

/* 폼 그룹 */
.cafe-form-group {
	margin-bottom: 18px;
}

.cafe-form-group:last-child {
	margin-bottom: 0;
}

.cafe-form-label {
	display: block;
	font-size: 0.82rem;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
}

/* 카페지기 표시 영역 */
.cafe-owner-display {
	font-size: 0.88rem;
	color: #667eea;
	font-weight: 500;
	padding: 8px 12px;
	background: rgba(102, 126, 234, .05);
	border-radius: 8px;
	border: 1px solid rgba(102, 126, 234, .12);
}

/* 입력 필드 */
.cafe-form-input {
	width: 100%;
	padding: 9px 12px;
	padding-right: 55px; /* 글자수 카운터 공간 */
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.88rem;
	color: #333;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	background: #fff;
}

.cafe-form-input:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, .08);
}

.cafe-form-input::placeholder {
	color: #bbb;
	font-size: 0.82rem;
}

/* 텍스트에리어 */
.cafe-form-textarea {
	width: 100%;
	padding: 10px 12px;
	padding-bottom: 28px; /* 글자수 카운터 공간 */
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	font-size: 0.88rem;
	color: #333;
	resize: vertical;
	min-height: 140px;
	line-height: 1.6;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	outline: none;
	background: #fff;
}

.cafe-form-textarea:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, .08);
}

.cafe-form-textarea::placeholder {
	color: #bbb;
	font-size: 0.82rem;
}

/* 글자수 카운터 */
.cafe-char-count {
	position: absolute;
	right: 10px;
	bottom: 8px;
	font-size: 0.72rem;
	color: #adb5bd;
	pointer-events: none;
	transition: color 0.15s ease;
}

.cafe-char-count.is-near {
	color: #fcc419;
}

.cafe-char-count.is-limit {
	color: #ff9800;
	font-weight: 600;
}

/* 중복체크 버튼 */
.cafe-dupcheck-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border-radius: 8px;
	font-size: 0.82rem;
	font-weight: 500;
	color: #667eea;
	background: #fff;
	border: 1px solid rgba(102, 126, 234, .3);
	cursor: pointer;
	white-space: nowrap;
	transition: all 0.15s ease;
	flex-shrink: 0;
}

.cafe-dupcheck-btn:hover {
	background: rgba(102, 126, 234, .06);
	border-color: rgba(102, 126, 234, .5);
}

.cafe-dupcheck-btn:active {
	transform: scale(0.97);
}

.cafe-dupcheck-btn.is-checked {
	color: #38c6a3;
	border-color: rgba(56, 198, 163, .3);
	background: rgba(56, 198, 163, .05);
}

/* 제출 버튼 */
.cafe-submit-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 8px 22px;
	border-radius: 10px;
	font-size: 0.88rem;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 2px 8px rgba(102, 126, 234, .2);
}

.cafe-submit-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(102, 126, 234, .3);
}

.cafe-submit-btn:active {
	transform: translateY(0);
}


/* =========================
   8. 회원 명단
   ========================= */
.cafe-member-list {
	max-height: 220px;
	overflow-y: auto;
	border: 1px solid #f0f0f0;
	border-radius: 10px;
	background: #fafafa;
	padding: 4px;
}

/* 스크롤바 커스텀 */
.cafe-member-list::-webkit-scrollbar {
	width: 4px;
}

.cafe-member-list::-webkit-scrollbar-thumb {
	background: rgba(0, 0, 0, .10);
	border-radius: 999px;
}

.cafe-member-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	border-radius: 8px;
	transition: background 0.12s ease;
}

.cafe-member-item:hover {
	background: rgba(0, 0, 0, .02);
}

.cafe-member-item + .cafe-member-item {
	border-top: 1px solid rgba(0, 0, 0, .04);
}

/* 회원 정보 좌측 (닉네임) */
.cafe-member-info {
	flex: 1;
	min-width: 0;
}

/* 회원 액션 우측 (가입일 + 강퇴) */
.cafe-member-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.cafe-member-nick {
	flex: 1;
	font-size: 0.85rem;
	font-weight: 500;
	color: #444;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cafe-member-role {
	font-size: 0.68rem;
	font-weight: 500;
	color: #667eea;
	background: rgba(102, 126, 234, .08);
	padding: 2px 6px;
	border-radius: 4px;
	white-space: nowrap;
}

.cafe-member-date {
	font-size: 0.72rem;
	color: #999;
	white-space: nowrap;
	flex-shrink: 0;
}

/* 강퇴 버튼 — 차분한 회색 톤 */
.cafe-btn-kick {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	padding: 3px 8px;
	border-radius: 6px;
	font-size: 0.72rem;
	font-weight: 500;
	color: #6c757d;
	background: transparent;
	border: 1px solid #ced4da;
	cursor: pointer;
	transition: all 0.15s ease;
	white-space: nowrap;
	flex-shrink: 0;
}

.cafe-btn-kick:hover {
	background: #f1f3f5;
	border-color: #adb5bd;
	color: #495057;
}


/* =========================
   카페 카드 내부 레이아웃
   (.cafe-card-main > .cafe-card-left + .cafe-card-right)
   ========================= */
.cafe-card-main {
	display: flex;
	align-items: center;
	gap: 16px;
	width: 100%;
}

.cafe-card-left {
	flex: 1;
	min-width: 0;
}

.cafe-card-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	flex-shrink: 0;
}

.cafe-meta-item {
	display: inline-flex;
	align-items: center;
	gap: 3px;
}


/* =========================
   9. 빈 상태 (카페 없음)
   ========================= */
.cafe-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
}

.cafe-empty-icon {
	font-size: 3rem;
	color: #ddd;
	margin-bottom: 14px;
	opacity: 0.7;
}

.cafe-empty-text {
	font-size: 0.9rem;
	color: #999;
	line-height: 1.6;
}

.cafe-empty-sub {
	font-size: 0.8rem;
	color: #bbb;
	margin-top: 6px;
}


/* =========================
   10. 리스트 카운트 헤더
   ========================= */
.cafe-list-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
	padding: 0 2px;
}

.cafe-list-count {
	font-size: 0.82rem;
	color: #888;
}

.cafe-list-count strong {
	color: #667eea;
	font-weight: 600;
}


/* =========================
   11. 반응형 (태블릿 768px↓)
   ========================= */
@media (max-width: 768px) {

	/* 툴바 세로 배치 */
	.cafe-toolbar {
		flex-direction: column;
		gap: 10px;
	}

	.cafe-create-btn {
		width: 100%;
		justify-content: center;
		padding: 11px 16px;
		font-size: 0.88rem;
	}

	.cafe-search-wrap {
		width: 100%;
	}

	/* 카드 내부 조정 */
	.cafe-card {
		flex-wrap: wrap;
		gap: 10px;
		padding: 12px 14px;
	}

	.cafe-card-icon {
		width: 36px;
		height: 36px;
		font-size: 1.1rem;
	}

	.cafe-card-body {
		flex: 1 1 calc(100% - 52px);
		min-width: 0;
	}

	.cafe-card-main {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	.cafe-card-right {
		width: 100%;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 8px;
	}

	.cafe-card-actions {
		flex-shrink: 0;
	}

	/* 모달 */
	.cafe-modal .modal-body {
		padding: 16px;
	}

	.cafe-modal-header {
		padding: 14px 16px;
	}

	/* topbar */
	#cafe_page .topbar-inner {
		padding: .65rem .75rem;
	}

	#cafe_page .topbar-icon {
		width: 38px;
		height: 38px;
		border-radius: 10px;
	}

	#cafe_page .topbar-icon i {
		font-size: 1.15rem;
	}

	#cafe_page .topbar-inner .fw-bold {
		font-size: 1rem;
	}

	#cafe_page .topbar-inner .fs090 {
		font-size: 0.78rem;
	}
}


/* =========================
   12. 반응형 (소형 모바일 500px↓)
   ========================= */
@media (max-width: 500px) {

	.cafe-card {
		border-radius: 10px;
		padding: 10px 12px;
		margin-bottom: 8px;
	}

	.cafe-card-name {
		font-size: 0.88rem;
	}

	.cafe-card-desc {
		font-size: 0.75rem;
	}

	.cafe-card-meta {
		font-size: 0.7rem;
		gap: 4px 10px;
	}

	.cafe-btn-edit,
	.cafe-btn-join,
	.cafe-btn-leave {
		padding: 4px 10px;
		font-size: 0.75rem;
	}

	.cafe-create-btn {
		padding: 10px 14px;
		font-size: 0.82rem;
		border-radius: 8px;
	}

	.cafe-search-input {
		font-size: 0.82rem;
		padding: 7px 10px;
	}

	/* 모달 폼 */
	.cafe-form-input {
		font-size: 0.82rem;
		padding: 8px 10px;
		padding-right: 50px;
	}

	.cafe-form-textarea {
		font-size: 0.82rem;
		min-height: 120px;
	}

	.cafe-dupcheck-btn {
		padding: 7px 12px;
		font-size: 0.78rem;
	}

	/* 회원 목록 */
	.cafe-member-item {
		padding: 6px 8px;
		gap: 8px;
	}

	.cafe-member-nick {
		font-size: 0.8rem;
	}

	.cafe-member-date {
		font-size: 0.68rem;
	}

	.cafe-btn-kick {
		font-size: 0.68rem;
		padding: 2px 6px;
	}

	/* 빈 상태 */
	.cafe-empty {
		padding: 40px 16px;
	}

	.cafe-empty-icon {
		font-size: 2.4rem;
	}

	.cafe-empty-text {
		font-size: 0.82rem;
	}
}


/* =========================
   13. 초소형 보정 (400px↓)
   ========================= */
@media (max-width: 400px) {

	.cafe-card-meta {
		flex-direction: column;
		gap: 2px;
	}

	.cafe-card-actions {
		gap: 4px;
	}

	.cafe-modal .modal-body {
		padding: 12px;
	}

	.cafe-modal-header {
		padding: 12px;
	}

	.cafe-modal-header .modal-title {
		font-size: 1rem;
	}
}


/* =========================
   14. 폐쇄 카페 — 회색 처리
   ========================= */
.cafe-card-closed {
	opacity: 0.65;
}

.cafe-text-closed {
	color: #999 !important;
}

.cafe-card-closed .cafe-card-name {
	cursor: default;
	color: #999;
}


/* =========================
   15. 강퇴 회원 — 회색 처리
   ========================= */
.cafe-member-kicked {
	opacity: 0.55;
}

.cafe-member-kicked .cafe-member-nick {
	color: #999;
}


/* =========================
   16. 사유 조회 텍스트
   ========================= */
.cafe-reason-text {
	padding: 8px 12px;
	background: #f8f9fa;
	border-radius: 8px;
	font-size: 0.88rem;
	color: #444;
	line-height: 1.5;
	white-space: pre-wrap;
	word-break: break-word;
}


/* =========================
   17. 사유 버튼 (폐쇄사유 / 강퇴사유)
   ========================= */
.cafe-btn-reason {
	font-size: 0.75rem;
	padding: 3px 10px;
	border-radius: 6px;
	border: 1px solid #bbb;
	background: #f5f5f5;
	color: #777;
	cursor: pointer;
	transition: all 0.15s;
}

.cafe-btn-reason:hover {
	background: #eee;
	color: #555;
}


/* =========================
   18. 페이지네이션바
   ========================= */
.cafe-pagination {
	display: flex;
	justify-content: center;
	padding: 20px 0 10px;
}

.cafe-page-list {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 2px;
	align-items: center;
}

.cafe-page-item {
	display: inline-flex;
}

.cafe-page-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 32px;
	height: 32px;
	padding: 0 6px;
	border-radius: 6px;
	font-size: 0.85rem;
	color: #555;
	text-decoration: none;
	transition: all 0.15s;
	border: 1px solid transparent;
}

.cafe-page-link:hover {
	background: #f0f0f0;
	color: #333;
}

.cafe-page-item.active .cafe-page-link {
	background: rgba(102, 126, 234, 0.12);
	color: #667eea;
	font-weight: 700;
	border: 1px solid rgba(102, 126, 234, 0.25);
}

.cafe-page-item.disabled .cafe-page-link {
	color: #ccc;
	pointer-events: none;
	cursor: default;
}

/* 페이지네이션 모바일 */
@media (max-width: 576px) {
	.cafe-page-link {
		min-width: 28px;
		height: 28px;
		font-size: 0.8rem;
	}
}

/* =========================
   17. 회원명단 페이지네이션
   ========================= */
#cafe_member_pagination .pagination,
.cafe-pagination .pagination {
	gap: 1px;
}
#cafe_member_pagination .page-link,
.cafe-pagination .page-link {
	border: none;
	background: transparent;
	color: #666;
	font-size: 0.78rem;
	min-width: 28px;
	height: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 5px;
	padding: 0;
	transition: background 0.15s, color 0.15s;
}
#cafe_member_pagination .page-link:hover,
.cafe-pagination .page-link:hover {
	background: #f0f0f0;
	color: #333;
}
#cafe_member_pagination .page-item.active .page-link,
.cafe-pagination .page-item.active .page-link {
	background: #e8e0f4;
	color: #5a3da8;
	font-weight: 700;
}
#cafe_member_pagination .page-item.disabled .page-link,
.cafe-pagination .page-item.disabled .page-link {
	color: #ccc;
	pointer-events: none;
}
@media (max-width: 576px) {
	#cafe_member_pagination .page-link,
	.cafe-pagination .page-link {
		font-size: 0.7rem;
		min-width: 24px;
		height: 24px;
	}
	#cafe_member_pagination .pagination,
	.cafe-pagination .pagination {
		gap: 0;
	}
}
