/* ============================================
   Shared Select Component - Figma Design
   ============================================ */

/* Form Select Container */
.form-select-container {
  position: relative;
  width: 100% !important;
  flex-shrink: 0;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px; /* var(--spacing-md, 8px) */
  align-items: center;
  background: var(--color-bg-white);
  border: 1px solid #d5d7da; /* var(--colors/border/border-primary, #d5d7da) */
  border-radius: 8px; /* var(--radius-md, 8px) */
  box-shadow: 0px 1px 2px 0px rgba(10, 13, 18, 0.05); /* var(--shadow-xs) */
  padding: 10px 14px; /* py-[10px] px-[14px] */
  box-sizing: border-box;
}

.form-select-content {
  width: 100%;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  gap: 0; /* var(--spacing-md, 0px) */
  align-items: center;
  position: relative;
  order: 2;
}

.form-select {
  width: 100% !important;
  padding: 0;
  background: transparent;
  border: none;
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 24px; /* var(--line-height/text-md, 24px) */
  font-weight: normal;
  color: var(--color-text-primary);
  text-align: right;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  transition: none;
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  outline: none;
  box-sizing: border-box;
}

.form-select::placeholder {
  color: #717680; /* var(--colors/text/text-placeholder, #717680) */
}

.form-select:focus {
  outline: none;
}

.form-select-container:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(1, 145, 71, 0.1);
}

.form-select:not(:invalid) {
  color: var(--color-text-primary);
}

.form-select option {
  padding: 8px;
  text-align: right;
  color: var(--color-text-primary);
  background: var(--color-bg-white);
}

.form-select option:first-child {
  color: #717680; /* var(--colors/text/text-placeholder, #717680) */
}

/* Chevron Down Icon - Exact Figma Structure */
.form-select-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  overflow: hidden;
  pointer-events: none;
  order: 1;
}

.chevron-down-wrapper {
  position: absolute;
  bottom: 37.5%;
  left: 25%;
  right: 25%;
  top: 37.5%;
}

.chevron-down-inner {
  position: absolute;
  top: -16.67%;
  right: -8.33%;
  bottom: -16.67%;
  left: -8.33%;
}

.chevron-down-icon {
  width: 100%;
  height: 100%;
  display: block;
  max-width: none;
}
