@charset "utf-8";

/* 기존 스타일 */
body { font-family:'Noto Sans KR',sans-serif; font-weight:400; }
.pop_img { width:350px; height:230px; border:1px solid #dadada; border-radius:30px; margin-right: 5px; margin-bottom: 10px; object-fit: cover; }
.biz_title_wrap { margin-top: 20px; margin-bottom: 15px; }
.biz_title { color:#0174DF; font-size:20px; font-weight:bold; display: inline-block; }
.biz_content { width:100%; margin-bottom: 15px; line-height: 1.6; }
.biz_dept { margin-bottom: 20px; color: #666; font-size: 14px; }
.special_labels_wrap { margin-top: 15px; text-align: center; }
.special_label { display: inline-block; margin: 0 15px; font-size: 18px; font-weight: bold; color: #333; }

/* === 관리자 스타일 === */
.btn-edit { background-color: #4CAF50; color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; }
.btn-del { background-color: #f44336; color: white; border: none; padding: 5px 10px; border-radius: 3px; cursor: pointer; margin-left: 5px; }

/* 모달 오버레이 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: none; /* JS로 제어 */
    overflow-y: auto;
}
/* 모달 컨텐츠 */
.modal-content {
    background: #fff; width: 600px; margin: 50px auto;
    padding: 30px; border-radius: 10px; position: relative;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.modal-content h3 { margin-top: 0; margin-bottom: 20px; font-size: 20px; border-bottom: 2px solid #ddd; padding-bottom: 10px; }

/* 폼 스타일 */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 14px; }
.form-group-row { display: flex; gap: 10px; margin-bottom: 15px; }
.form-group-row > div { flex: 1; }

.inp-txt { width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; resize: vertical; }
.img-preview { font-size: 12px; color: #00f; margin-top: 5px; }

.btn-wrap { margin-top: 30px; display: flex; gap: 10px; }
.btn-wrap button {
	flex: 1;
	padding: 10px;
	border-radius: 4px;
}

.btn-order {
    background-color: #fff; border: 1px solid #ccc;
    width: 24px; height: 24px; line-height: 22px; text-align: center;
    padding: 0; font-size: 11px; cursor: pointer; border-radius: 3px; margin-right: 2px;
    color: #555;
}
.btn-order:hover { background-color: #eee; }

.btn_modify, .btn_delete {
	font-size: 14px;
	border: 1px solid #ccc;
    border-radius: 3px;
    cursor: pointer;
    padding: 2px 4px;
}

/* 모달 및 스피너는 공통 파일 혹은 아래 스타일 사용 */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 9999;
    display: none; justify-content: center; align-items: center;
    overflow-y: auto; /* 내용이 길어질 경우 스크롤 */
}
/* 모달이 flex로 중앙 정렬되면 내용이 길 때 잘릴 수 있으므로, 
   CSS Grid나 margin auto 방식을 사용하는 것이 안전하지만, 
   여기서는 JS로 fadeIn하므로 display:block 상태가 됨. 
   따라서 margin을 주어 중앙 배치 */
.modal-content {
    background: #fff; width: 90%; max-width: 600px; 
    margin: 5vh auto; /* 상하 여백 */
    padding: 30px; border-radius: 10px; position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    outline: none; /* 포커스 아웃라인 제거 */
}

.admin-controls {
    text-align: right; 
    margin-bottom: 10px;
    height: 30px; /* 높이 고정하여 버튼 나타날 때 덜컹거림 방지 */
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.edit-mode-label {
    margin-right: 15px; 
    cursor: pointer; 
    user-select: none;
    display: inline-flex;
    align-items: center;
}
.edit-mode-label input { margin-right: 5px; }


.btn_submit {
	padding: 7px 14px;
    border-radius: 3px;
    font-weight: bold;
}

/* ★ 편집 모드일 때만 버튼 보이기 */
.btn_submit, .tab-add-wrap {
    display: none;
}

/* 관리자 버튼 (리스트 내부) */
.admin-btns {
    display: none; /* 기본 숨김 */
    position: absolute; right: 10px; top: 10px;
    background: rgba(255,255,255,0.95);
    padding: 5px; border-radius: 5px; border: 1px solid #ddd; z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tab-admin-btns {
    display: none;
    position: absolute;
    top: -20px; /* 탭 위로 띄움 */
    left: 50%;
    transform: translateX(-50%); /* 중앙 정렬 */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 15px; /* 둥글게 */
    padding: 3px 8px;
    white-space: nowrap;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.is-edit-mode .tab-admin-btns,
.is-edit-mode .btn_submit,
.is-edit-mode .admin-btns,
.is-edit-mode .tab-add-wrap {
	display: block;
}


@media all and (max-width:640px) {
	.btn-order {
    	width: 20px;
    }
    
	.btn_modify, .btn_delete {
    	font-size: 13px;
    }
}
