/* 화살표 자체가 fa-angle-down / fa-angle-up 으로 분기되므로 회전 트랜지션은 제거 */

/* 서브메뉴 열림/닫힘 트랜지션 */
.submenu-enter-active {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.submenu-leave-active {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.submenu-enter-from,
.submenu-leave-to {
  height: 0;
  opacity: 0;
  transform: translateY(-10px);
}

.submenu-enter-to,
.submenu-leave-from {
  opacity: 1;
  transform: translateY(0);
}

/* 기본 셀렉트 박스 스타일 */
.simple-select-container {
  min-width: 145px;
  position: relative;
  width: 100%;
  font-size: 16px;
  user-select: none;
  background-color: rgba(255, 255, 255, 0);
  color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gn-menu-main .simple-select-container {
  height: 56px;
}

.svcHeader .simple-select-container {
  height: 66px;
}

.simple-select-container:hover {
  border-color: #007bff;
}

.simple-select-container.is-active {
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.simple-select-container.is-disabled {
  background-color: #f8f9fa;
  opacity: 0.6;
  cursor: not-allowed;
}

.simple-select-container.is-disabled .select-header {
  cursor: not-allowed;
}

/* 다크 테마 */
.simple-select-container.dark-theme {
  background-color: #374151;
  border-color: #4b5563;
}

.simple-select-container.dark-theme .select-header {
  background-color: #374151;
  color: #fff;
}

.simple-select-container.dark-theme .dropdown-container {
  background-color: #374151;
  border-color: #4b5563;
}

.simple-select-container.dark-theme .option-item {
  color: #fff;
  border-bottom-color: #4b5563;
}

.simple-select-container.dark-theme .option-item:hover {
  background-color: #4b5563;
}

.simple-select-container.dark-theme .option-item.selected {
  background-color: #1e40af;
}

.simple-select-container.dark-theme .check-icon {
  color: #60a5fa;
}

/* 셀렉트 헤더 */
.select-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  height: 100%;
}

.select-header:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.selected-value {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

.simple-select-container.dark-theme .selected-value {
  color: #fff;
}

/* 드롭다운 아이콘 - MDI chevron-down */
.dropdown-icon {
  width: 20px;
  height: 20px;
  margin-left: 8px;
  transition: transform 0.2s ease;
  color: #fff;
  flex-shrink: 0;
}

.dropdown-icon.is-open {
  transform: rotate(180deg);
}

.simple-select-container.dark-theme .dropdown-icon {
  color: #9ca3af;
}

/* 드롭다운 컨테이너 */
.dropdown-container {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 300px;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 옵션 목록 */
.options-list {
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.option-item {
  height: 56px;
  padding: 0 8px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  border-bottom: 1px solid #f1f3f4;
  color: #333;
  display: flex;
  align-items: center;
}

.option-content {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.option-flag {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.option-text {
  flex: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 12px;
  margin-right: 8px;
}

.check-icon {
  color: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.option-item:last-child {
  border-bottom: none;
}

.option-item:hover {
  background-color: #f8f9fa;
}

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

.no-options {
  padding: 16px;
  text-align: center;
  color: #999;
  font-style: italic;
}

/* 스크롤바 스타일 */
.options-list::-webkit-scrollbar {
  width: 6px;
}

.options-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.options-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.options-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.menu-flex {
  display: flex !important;
  align-items: center;
  width: 100%;
}

.menu-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0; /* 이게 핵심! flexbox에서 ellipsis가 제대로 작동하게 함 */
}

.arrow {
  margin-left: auto; /* 화살표를 오른쪽 끝으로 밀어냄 */
  flex-shrink: 0; /* 화살표는 축소되지 않도록 */
}
