/* Custom Select Component Styles - Matches preset-custom-select design */

.custom-select {
  position: relative;
  width: 100%;
  font-family: inherit;
}

.custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.6rem 0.9rem;
  background: transparent;
  border: 0.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #1e293b;
  cursor: pointer;
  text-align: left;
  gap: 8px;
  box-shadow: 0 1px 4px rgba(15,23,42,0.06);
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: inherit;
}

.custom-select-trigger:hover {
  border-color: #93c5fd;
  box-shadow: 0 2px 8px rgba(59,130,246,0.12);
  background: transparent;
}

.custom-select-trigger:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-select.open .custom-select-trigger {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15), 0 2px 8px rgba(59,130,246,0.1);
}

.custom-select-value {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #ffffff;
  font-size: var(--fs-sm);
  text-align: center;

}

.custom-select-trigger.has-value .custom-select-value {
  color: #ffffff;
  text-align: center;
  font-weight: 700;
}

.custom-select-arrow {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: #64748b;
  transition: transform 0.2s ease;
}

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

/* Dropdown */
.custom-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  z-index: 99999;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.13), 0 2px 8px rgba(15,23,42,0.06);
  padding: 6px;
  max-height: 450px;
  overflow-y: auto;
  transform-origin: top center;
}

.custom-select.open .custom-select-dropdown {
  display: block;
  animation: dropdownFadeIn 0.15s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: 450;
  color: #1e293b;
  cursor: pointer;
  transition: background 0.1s;
}

.custom-select-option:hover:not(.disabled) {
  background: #f1f5f9;
}

.custom-select-option.selected {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.custom-select-option.disabled {
  opacity: 0.7;
  cursor: not-allowed;
  color: #64748b;
}

.custom-select-option.disabled:hover {
  background: transparent;
}

.option-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-select-lock {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
}

.option-badge {
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
  text-transform: uppercase;
  margin-left: 4px;
}

.option-badge.easy,
.option-badge.beginner {
  background: rgba(34,197,94,0.13);
  color: #15803d;
}

.option-badge.medium,
.option-badge.intermediate {
  background: rgba(251,191,36,0.18);
  color: #b45309;
}

.option-badge.hard,
.option-badge.advanced {
  background: rgba(239,68,68,0.13);
  color: #b91c1c;
}

/* Scrollbar styling */
.custom-select-dropdown::-webkit-scrollbar {
  width: 6px;
}

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

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

.custom-select-dropdown::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}
