/* ===============================
 🎨 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;
}
