/* ==========================================================================
   Custom Select Component 
   ========================================================================== */

.custom-select-wrapper {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  height: calc(42px * var(--u, 1));
  background: #FFFFFF;
  border: 1px solid #d4d4d4;
  border-radius: 0;
  padding: 0 calc(14px * var(--u, 1));
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--fs-body);
  color: #000000;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
  text-align: left;
}

.custom-select-trigger:hover {
  border-color: #9a9a9a;
}

.custom-select-wrapper.open .custom-select-trigger {
  border-color: #000000;
  border-width: 1.5px;
  box-shadow: none;
}

.custom-select-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: calc(8px * var(--u, 1));
  font-weight: 500;
}

.custom-select-text.placeholder {
  color: #6e6e6e;
  font-weight: 400;
}

.custom-select-chevron {
  width: calc(18px * var(--u, 1));
  height: calc(18px * var(--u, 1));
  color: #6e6e6e;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease;
  flex-shrink: 0;
}

.custom-select-wrapper.open .custom-select-chevron {
  transform: rotate(180deg);
  color: #000000;
}

.custom-select-dropdown {
  position: absolute;
  top: calc(100% + calc(4px * var(--u, 1)));
  left: 0;
  width: 100%;
  background: #FFFFFF;
  border: 1px solid #e5e5e5;
  border-radius: 0;
  box-shadow: none;
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: selectDropdownFade 0.15s ease;
}

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

.custom-select-wrapper.open .custom-select-dropdown {
  display: flex;
}

.custom-select-search-box {
  display: flex;
  align-items: center;
  padding: calc(8px * var(--u, 1)) calc(12px * var(--u, 1));
  border-bottom: 1px solid #f4f4f4;
  background: #fafafa;
  gap: calc(8px * var(--u, 1));
}

.custom-select-search-box svg {
  width: calc(15px * var(--u, 1));
  height: calc(15px * var(--u, 1));
  color: #9a9a9a;
  flex-shrink: 0;
}

.custom-select-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: var(--fs-body);
  color: #000000;
  outline: none;
  font-family: inherit;
  padding: 0;
}

.custom-select-options-list {
  max-height: calc(230px * var(--u, 1));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(4px * var(--u, 1)) 0;
}

.custom-select-options-list::-webkit-scrollbar {
  width: calc(5px * var(--u, 1));
}

.custom-select-options-list::-webkit-scrollbar-thumb {
  background: #d4d4d4;
  border-radius: 0;
}

.custom-select-options-list::-webkit-scrollbar-thumb:hover {
  background: #9a9a9a;
}

.custom-select-option {
  padding: calc(10px * var(--u, 1)) calc(16px * var(--u, 1));
  font-size: var(--fs-body);
  color: #000000;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  user-select: none;
}

.custom-select-option:hover,
.custom-select-option.highlighted {
  background: #fafafa;
  color: #000000;
  font-weight: 600;
}

.custom-select-option.selected {
  background: #fafafa;
  color: #000000;
  font-weight: 700;
}

.custom-select-empty {
  padding: calc(16px * var(--u, 1));
  text-align: center;
  font-size: var(--fs-body);
  color: #9a9a9a;
}
