/* ---------- 설정 버튼 및 패널 관련 스타일 ---------- */

/* 설정 버튼 컨테이너 */
#settingsButtonContainer,
.settings-button-container {
  position: absolute !important;
  bottom: 20px !important;
  right: 20px !important;
  z-index: 9999 !important;
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  visibility: visible !important;
  opacity: 1 !important;
  gap: 10px !important;
  flex-direction: row !important;
}

/* 공통 버튼 스타일 */
#settingsButton, #loginButton, #adminButton {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50% !important;
  background-color: white !important;
  border: 1px solid #ddd !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
  font-size: 24px !important;
  line-height: 1 !important;
  padding: 0 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* 설정 버튼 호버 효과 */
#settingsButton:hover {
  transform: rotate(30deg) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* 로그인 버튼 - 미로그인 상태 */
#loginButton {
  background-color: #f8f9fa !important;
  border-color: #ddd !important;
  color: #6c757d !important;
}

/* 로그인 버튼 - 로그인 상태 */
#loginButton.logged-in {
  background-color: #d4edda !important;
  border-color: #28a745 !important;
  color: #155724 !important;
}

/* 로그인 버튼 호버 효과 */
#loginButton:hover {
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

#loginButton.logged-in:hover {
  background-color: #c3e6cb !important;
}

/* 관리자 버튼 스타일 */
#adminButton {
  background-color: #e3f2fd !important;
  border-color: #2196f3 !important;
  color: #1976d2 !important;
}

#adminButton:hover {
  background-color: #bbdefb !important;
  transform: scale(1.1) !important;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3) !important;
}

.settings-panel {
  position: absolute;
  bottom: 70px;
  right: 20px;
  width: 280px;
  max-height: 70vh;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  padding: 15px;
  overflow-y: auto;
  display: none;
}

.settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  border-bottom: 1px solid #eee;
  padding-bottom: 10px;
}

.settings-section {
  margin-bottom: 20px;
  padding-bottom: 10px;
}

.setting-item {
  margin-bottom: 12px;
}

/* 설정 패널 버튼 스타일 */
.settings-reset-btn {
  background-color: #f8f9fa;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-reset-btn:hover {
  background-color: #e9ecef;
  border-color: #ced4da;
}

.settings-save-btn {
  background-color: #4285f4;
  color: white;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.settings-save-btn:hover {
  background-color: #3367d6;
}

/* 체크박스 컨테이너 */
.checkbox-container {
  display: flex;
  align-items: center;
}

/* 설정 설명 스타일 */
.setting-description {
  margin: 5px 0 0 0;
  font-size: 12px;
  color: #888;
}

/* 슬라이더 컨테이너 */
.range-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-value {
  min-width: 30px;
  text-align: right;
  font-size: 14px;
}

@media (max-width: 768px) {
  .settings-panel {
    width: 90%;
    max-width: 280px;
    bottom: 70px;
    right: 20px;
    left: auto;
    transform: none;
  }
  
  /* 모바일에서 버튼 컨테이너 간격 조정 */
  #settingsButtonContainer,
  .settings-button-container {
    gap: 8px !important;
  }
  
  /* 모바일에서 관리자 패널 크기 조정 */
  .admin-panel > div {
    width: 95% !important;
    max-width: none !important;
    margin: 10px !important;
  }
  
  /* 모바일에서 테이블 반응형 */
  .admin-panel table {
    font-size: 12px !important;
  }
  
  .admin-panel th,
  .admin-panel td {
    padding: 8px 6px !important;
  }
  
  /* 모바일에서 사용자 추가 폼 */
  .admin-panel .user-add-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  
  .admin-panel .user-add-form > div {
    width: 100% !important;
  }
}

/* 관리자 패널 애니메이션 효과 */
.admin-panel tbody {
  transition: opacity 0.3s ease;
}

.admin-panel tr {
  transition: all 0.2s ease;
}

.admin-panel tr:hover {
  transform: translateY(-1px);
}

/* 부드러운 페이드 효과 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-panel tr {
  animation: fadeInUp 0.3s ease forwards;
}