/* 답안 select(answeringWayS=41) 커스텀 드롭다운 */

.answer-select-enhance {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  max-width: 100%;
  /* .questioning-box select 의 margin 을 래퍼로 이전 (숨긴 select 마진은 레이아웃에 반영되지 않음) */
  margin: 0 0.25rem;
}

.answer-select-enhance .answer-select-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.answer-select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  box-sizing: border-box;
  width: 100%;
  min-width: 3.2rem;
  max-width: 100%;
  min-height: 28px;
  padding: 0.2rem 1.5rem 0.2rem 0.45rem !important;
  border: 2px solid #58391f;
  border-radius: 5px;
  background: rgba(255, 239, 240, 1);
  color: #58391f;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%2358391f' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.4rem center;
  background-size: 10px 6px;
}

/* text-right 등 줄간격이 좁아도 테두리가 잘리지 않도록 */
.questioning-box .text-right,
.questioning-box .text-right-ex,
.questioning-title .text-right,
.questioning-title .text-right-ex {
  line-height: normal;
  overflow: visible;
}

.answer-select-trigger.is-placeholder {
  color: #8a6a52;
}

.answer-select-enhance.is-disabled .answer-select-trigger,
.answer-select-trigger:disabled {
  opacity: 0.65;
  cursor: default;
}

.answer-select-list {
  /* left/top/width 는 JS(positionList)가 #wrapper 로컬 좌표로 설정 */
  position: absolute;
  z-index: 10000;
  box-sizing: border-box;
  margin: 0;
  padding: 0.2rem 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  border: 2px solid #58391f;
  border-radius: 5px;
  background: #fff8f8;
  box-shadow: 0 4px 12px rgba(88, 57, 31, 0.18);
}

.answer-select-option {
  display: block;
  width: max-content;
  min-width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.45rem 0.7rem;
  border: 0;
  background: transparent;
  color: #58391f;
  font-size: 0.9rem;
  font-family: inherit;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
}

/* mousedown 후 드래그 시 이전 옵션에 :focus 가 남아 이중 하이라이트되는 것 방지
   → 마우스 hover 와 키보드 focus-visible 만 강조 */
.answer-select-option:focus {
  outline: none;
}

.answer-select-option:hover,
.answer-select-option:focus-visible {
  background: rgba(255, 183, 190, 0.45);
}

.answer-select-option.is-selected {
  background: rgba(255, 183, 190, 0.7);
  font-weight: 700;
}

.answer-select-option.is-selected:hover,
.answer-select-option.is-selected:focus-visible {
  background: rgba(255, 183, 190, 0.7);
}
