/* カスタムセレクトボックス */
.custom-select {
  position: relative;
  width: calc(100% - 0.875rem);
}

/* 選択表示部分 */
.select-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

@media screen and (max-width: 767px) {
  .select-selected {
    padding: 5px 8px;
  }
}


.select-selected.open {
  border-radius: 8px 8px 0 0;
}

.selected-text {
  flex: 1;
  color: #333;
}

/* 矢印アイコン */
.select-arrow {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #666;
  transition: transform 0.2s;
}

.select-selected.open .select-arrow {
  transform: rotate(180deg);
}

/* オプションリスト */
.select-options {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 0;
  overflow: hidden;
  background-color: #fff;
  border: 2px solid #ccc;
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 100;
  transition: max-height 0.3s ease;
  opacity: 0;
  visibility: hidden;
}

.select-options.open {
  max-height: 250px;
  overflow-y: auto;
  opacity: 1;
  visibility: visible;
}

/* 各オプション */
.select-option {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.select-option:hover {
  background-color: #f0f7ff;
}

.select-option.selected {
  background-color: #e6f0ff;
  color: #007bff;
  font-weight: 500;
}

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

/* 非表示オプション（display:noneを使用） */
.select-option.hidden {
  display: none;
}

/* 結果表示 */
.selected-value {
  margin-top: 24px;
  padding: 16px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.selected-value span {
  font-weight: bold;
  color: #007bff;
}

.result-box {
  margin-top: 32px;
  padding: 20px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.result-box h3 {
  font-size: 1rem;
  margin-bottom: 12px;
  color: #333;
  border-bottom: 1px solid #eee;
  padding-bottom: 8px;
}

.result-box p {
  margin-bottom: 8px;
  color: #666;
}

.result-box p:last-child {
  margin-bottom: 0;
}

.result-box span {
  font-weight: 600;
  color: #007bff;
}

/* スクロールバーのスタイル */
.select-options::-webkit-scrollbar {
  width: 8px;
}

.select-options::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0 0 8px 0;
}

.select-options::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

.select-options::-webkit-scrollbar-thumb:hover {
  background: #aaa;
}
