/* ===============================
 🎨 JEJU MASSAGE 공통 UI 스타일
 작성자: 000 / 유지보수용
================================*/

/* -------------------------------
 🔳 공통 전역 스타일
--------------------------------*/
body.modal-open {
  overflow: hidden;
}
.hidden {
  display: none !important;
}
.text-center {
  text-align: center;
}
.text-right {
  text-align: right;
}
.text-left {
  text-align: left;
}

/* -------------------------------
 ⏳ 로딩 오버레이
--------------------------------*/
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.spinner {
  width: 48px;
  height: 48px;
  border: 5px solid #ddd;
  border-top: 5px solid #6c5ce7;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* -------------------------------
 🔔 토스트 알림
--------------------------------*/
.toast {
  position: fixed;
  left: 50%;
  bottom: -50px;
  transform: translateX(-50%);
  background: #333;
  color: #fff;
  padding: 10px 18px;
  border-radius: 6px;
  opacity: 0;
  transition: all 0.3s ease;
  z-index: 9999;
  font-size: 14px;
}
.toast.show {
  bottom: 60px;
  opacity: 1;
}
.toast.info {
  background: #6c5ce7;
}
.toast.error {
  background: #e74c3c;
}
.toast.warn {
  background: #f1c40f;
  color: #000;
}

/* -------------------------------
 🪟 모달 (공통)
--------------------------------*/
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
  transition: all 0.3s ease;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* 모달 슬라이드 방향 애니메이션 */
.modal.slide-top .modal-content {
  animation: slideTop 0.3s ease;
}
.modal.slide-bottom .modal-content {
  animation: slideBottom 0.3s ease;
}
.modal.slide-left .modal-content {
  animation: slideLeft 0.3s ease;
}
.modal.slide-right .modal-content {
  animation: slideRight 0.3s ease;
}

@keyframes slideTop {
  from {
    transform: translateY(-40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideBottom {
  from {
    transform: translateY(40px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
@keyframes slideLeft {
  from {
    transform: translateX(-40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
@keyframes slideRight {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* -------------------------------
 📋 드롭다운 메뉴
--------------------------------*/
.dropdown {
  position: absolute;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  display: none;
  min-width: 140px;
  padding: 5px 0;
  z-index: 9999;
}
.dropdown.show {
  display: block;
}
.dropdown button,
.dropdown a {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
}
.dropdown button:hover,
.dropdown a:hover {
  background: #f7f7f7;
}

/* -------------------------------
 📑 탭 스타일
--------------------------------*/
.tabs {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #eee;
  margin-bottom: 10px;
}
.tabs [data-tab] {
  background: #f5f5f5;
  border-radius: 6px 6px 0 0;
  padding: 8px 14px;
  cursor: pointer;
}
.tabs [data-tab].active {
  background: #6c5ce7;
  color: #fff;
}
[data-panel] {
  display: none;
}
[data-panel].active {
  display: block;
}

/* -------------------------------
 📄 페이지네이션 / 더보기
--------------------------------*/
.page-btn {
  background: #f9f9f9;
  border: 1px solid #ddd;
  margin: 2px;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
}
.page-btn.active {
  background: #6c5ce7;
  color: #fff;
  border-color: #6c5ce7;
}
.page-btn:hover {
  background: #eee;
}
.load-more {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  margin-top: 10px;
  border: 1px solid #ccc;
  background: #fafafa;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}
.load-more:hover {
  background: #f0f0f0;
}
/* ===============================
   ✅ PC: 게시판(목록/글보기)만 가운데로 모으기
   - 지금 캡처처럼 "딱 보기 좋은 폭" 유지
   - 모바일 영향 없음
================================ */
@media (min-width: 1025px){

  /* 게시판 전체 래퍼 폭 */
  body.bbs #bo_list,
  body.bbs #bo_v,
  #bo_list,
  #bo_v{
    max-width: 1180px;      /* ← 캡처 느낌이면 1100~1200 사이 추천 */
    margin: 28px auto 0;
    padding: 0 24px;        /* 양옆 숨 좀 */
    box-sizing: border-box;
  }

  /* 목록 테이블/컨트롤 100%로 정렬 */
  #bo_list .tbl_wrap,
  #bo_list .tbl_head01,
  #bo_list .bo_fx,
  #bo_list .bo_list_total,
  #bo_list .pg_wrap,
  #bo_list .bo_sch_wrap,
  #bo_list .btn_bo_user{
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  /* 하단 검색/글쓰기 줄: 좌(검색) 우(글쓰기) */
  #bo_list .bo_fx{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }
  #bo_list .bo_sch_wrap{ flex: 1; }
  #bo_list .btn_bo_user{ width: auto !important; }

  /* 검색폼 폭 정리 */
  #bo_list .bo_sch{
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
  }
  #bo_list .bo_sch select{ width: 140px; }
  #bo_list .bo_sch input[type="text"]{ flex: 1; min-width: 260px; }
}
/* ✅ 게시판 목록 상단(전체 n건 / 검색창) 가운데 폭 고정 */
#bo_list_total,
#bo_sch{
  width: 100%;
  max-width: 1200px;          /* ← 이 숫자만 취향대로 (예: 1100~1300) */
  margin: 10px auto;          /* ✅ 가운데 정렬 핵심 */
  box-sizing: border-box;
}

/* ✅ 테이블/리스트 본문도 같이 가운데로 */
#bo_list,
.tbl_head01,
.tbl_head01 table{
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* ✅ PC에서 너무 허전하면 좌우 패딩만 살짝 */
@media (min-width: 1025px){
  #bo_list_total,
  #bo_sch,
  #bo_list{
    padding-left: 14px;
    padding-right: 14px;
  }
}

/* ✅ 모바일에선 꽉 차게(기존처럼) */
@media (max-width: 1024px){
  #bo_list_total,
  #bo_sch,
  #bo_list,
  .tbl_head01{
    max-width: 100%;
  }
}
