/**
 * Custom Select Box Styles
 * 커스텀 웹 기반 select box 스타일
 */

/* 커스텀 select wrapper */
.custom-select-wrapper {
  position: relative;
  /* width: 100%; */
  min-width:200px;
  display: inline-block;
}

/* 커스텀 select 버튼 */
.custom-select-button {
  width: 100%;
  min-height: 44px;
  padding: 10px 40px 10px 15px;
  background: #fff;
  border: 1px solid #e7eaee;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.5;
  color: #1e2229;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* 호버 상태 */
.custom-select-button:hover {
  border-color: #d8dde2;
  box-shadow: 0px 2px 6px 0px rgba(30, 34, 41, 0.08);
}

/* 열린 상태 */
.custom-select-wrapper.open .custom-select-button {
  border-color: #2876E7;
  box-shadow: 0 0 0 3px rgba(40, 118, 231, 0.1);
}

/* 화살표 아이콘 */
.custom-select-arrow {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 12px;
  height: 12px;
  transform: translateY(-50%);
  pointer-events: none;
}

.custom-select-arrow::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #8f95a1;
  border-bottom: 2px solid #8f95a1;
  transform: translate(-50%, -70%) rotate(45deg);
  transition: transform 0.2s ease;
}

/* 열린 상태의 화살표 */
.custom-select-wrapper.open .custom-select-arrow::before {
  transform: translate(-50%, -30%) rotate(-135deg);
}

/* 드롭다운 */
.custom-select-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid #e7eaee;
  border-radius: 8px;
  box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  max-height: 290px; /*select box 6개 보이기위해 조정*/
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

/* 열린 상태의 드롭다운 */
.custom-select-wrapper.open .custom-select-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* 옵션 아이템 */
.custom-select-option {
  padding: 12px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #353c46;
  font-size: 16px;
  line-height: 1.5;
}

/* 옵션 호버 */
.custom-select-option:hover {
  background-color: #f8f9fa;
}

/* 선택된 옵션 */
.custom-select-option.selected {
  background-color: #f0f6ff;
  color: #2876E7;
  font-weight: 500;
}

/* 선택된 옵션 체크 표시 */
.custom-select-option.selected::after {
  content: '✓';
  float: right;
  color: #2876E7;
}

/* 첫번째/마지막 옵션 라운드 처리 */
.custom-select-option:first-child {
  border-radius: 7px 7px 0 0;
}

.custom-select-option:last-child {
  border-radius: 0 0 7px 7px;
}

/* 스크롤바 스타일 */
.custom-select-dropdown::-webkit-scrollbar {
  width: 4px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 2px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
  background: #c8cdd4;
  border-radius: 2px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #8f95a1;
}

/* 비활성화 상태 */
.custom-select-wrapper.disabled .custom-select-button {
  background-color: #f8f9fa;
  color: #8f95a1;
  cursor: not-allowed;
  opacity: 0.6;
}

/* 작은 사이즈 */
.custom-select-wrapper.small .custom-select-button {
  min-height: 36px;
  padding: 6px 32px 6px 12px;
  font-size: 14px;
}

.custom-select-wrapper.small .custom-select-arrow {
  right: 12px;
}

.custom-select-wrapper.small .custom-select-option {
  padding: 8px 12px;
  font-size: 14px;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
  .custom-select-dropdown {
    max-height: 50vh;
  }
  
    /* 터치 디바이스에서 더 큰 터치 영역 */
  .custom-select-option {
    padding: 14px 16px;
  }
} 