/* tooltips.css - 입력 컨테이너 안에 툴팁이 맞도록 수정된 버전 */

/* ----- 툴팁 버튼 스타일 ----- */
.tooltip-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #e1f0f7;
  color: #69BCC9;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
  cursor: pointer;
  border: none;
  transition: background-color 0.2s;
  position: relative;
}

.tooltip-button:hover {
  background-color: #c5e4f0;
}

.tooltip-button.active {
  background-color: #69BCC9;
  color: white;
}

/* 슬라이더 툴팁 버튼 특별 스타일 */
.slider-tooltip-button {
  width: 18px;
  height: 18px;
  font-size: 10px;
  margin-left: 4px;
  vertical-align: middle;
}

/* ----- 툴팁 컨테이너 스타일 ----- */
.tooltip-container {
  position: relative;
  z-index: 10;
  width: calc(100% - 16px); /* 여백을 고려하여 컨테이너 너비 조정 */
  max-width: 100%; /* 부모 요소를 넘지 않도록 최대 너비 설정 */
  background-color: #f5f9fa;
  color: #333;
  font-size: 13px; /* 글꼴 크기 약간 줄임 */
  padding: 10px 12px; /* 패딩 약간 줄임 */
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  margin: 8px auto 12px; /* 마진 조정 */
  border: 1px solid #e1f0f7;
  display: none; /* 기본적으로 숨김 */
  box-sizing: border-box; /* 박스 모델 조정 */
  left: 8px; /* 왼쪽에서 약간의 여백 */
  right: 8px; /* 오른쪽에서 약간의 여백 */
  overflow: auto; /* 내용이 넘칠 경우 스크롤 표시 */
  max-height: 150px; /* 최대 높이 제한 */
}

/* 슬라이더 툴팁 컨테이너 특별 스타일 */
.slider-tooltip-container {
  position: absolute;
  width: 180px; /* 너비 줄임 */
  min-width: 180px; /* 최소 너비 조정 */
  margin-top: 5px;
  top: 100%;
  left: -80px; /* 위치 중앙으로 조정 */
  z-index: 10;
}

/* 닫기 버튼 스타일 */
.tooltip-close {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #999;
  cursor: pointer;
  border-radius: 50%;
}

.tooltip-close:hover {
  background-color: #f0f0f0;
  color: #666;
}

/* ----- 레이블 및 입력 요소 스타일 ----- */
.input-group {
  position: relative;
  margin-bottom: 15px;
}

.input-group label {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

/* ----- 슬라이더 영역 스타일 ----- */
/* 슬라이더 라벨 아이템 스타일 */
.slider-labels .label-item {
  position: relative;
  display: flex;
  flex-direction: row; /* 가로 정렬 */
  align-items: center; /* 중앙 정렬 */
  gap: 5px; /* 요소 간 간격 */
  flex-wrap: nowrap; /* 줄바꿈 방지 */
}

/* 마커 박스와 텍스트 간격 조정 */
.current-marker-box,
.highlight-box {
  margin-right: 4px;
  flex-shrink: 0; /* 크기 축소 방지 */
}

/* 슬라이더 라벨 텍스트 */
.current-time-label,
.recommended-label {
  white-space: nowrap; /* 텍스트 줄바꿈 방지 */
  font-size: 12px; /* 폰트 사이즈 줄임 */
}

/* 툴팁 컨텐츠 가로 정렬 */
.tooltip-content {
  text-align: left; /* 텍스트 왼쪽 정렬 */
  padding: 3px 0; /* 여백 조정 */
  margin-right: 15px; /* 닫기 버튼 여백 확보 */
}

/* ----- 모바일 반응형 스타일 ----- */
@media (max-width: 768px) {
  /* 모바일에서 툴팁 컨테이너 크기 조정 */
  .tooltip-container {
    width: calc(100% - 10px);
    font-size: 12px;
    padding: 8px 10px;
  }
  
  /* 슬라이더 레이블 구조 */
  .slider-labels {
    display: flex;
    justify-content: space-between;
    padding: 0 5px;
  }
  
  .slider-labels .label-item {
    flex: 1;
    margin: 0 5px;
  }
  
  /* 모바일에서 슬라이더 툴팁 레이어 위치 */
  .slider-tooltip-container {
    width: 150px;
    left: -60px;
    min-width: unset;
  }
  
  /* 닫기 버튼 크기 축소 */
  .tooltip-close {
    width: 16px;
    height: 16px;
    font-size: 12px;
  }
}

/* 매우 작은 화면에 대한 추가 조정 */
@media (max-width: 480px) {
  .tooltip-container {
    font-size: 11px;
    padding: 6px 8px;
  }
  
  .slider-tooltip-container {
    width: 130px;
    left: -50px;
  }
}