:host {
  display: inline-block;
}

:host.app-select-host--full-width {
  display: block;
  width: 100%;
}

.app-select-wrap {
  position: relative;
  width: 100%;
}

.app-select-arrow {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary, #6b7280);
  pointer-events: none;
}

.app-select {
  width: 100%;
  appearance: none;
  padding-right: 36px;
  border: 1px solid var(--border-color, #e4e4e7);
  border-radius: var(--radius-md, 6px);
  background: var(--bg-primary, #fff);
  color: var(--text-primary, #1f322d);
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast, 120ms ease),
    box-shadow var(--transition-fast, 120ms ease);

  &:hover:not(:disabled) {
    border-color: var(--primary-color, #2f6e5d);
  }

  &:focus-visible {
    outline: none;
    border-color: var(--primary-color, #2f6e5d);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary-color, #2f6e5d) 25%, transparent);
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.6;
  }
}

.app-select--sm {
  height: 32px;
  padding: 0 var(--space-sm, 0.5rem);
  font-size: var(--font-size-sm, 0.8125rem);
}

.app-select--md {
  height: 40px;
  padding: 0 var(--space-md, 1rem);
  font-size: var(--font-size-md, 0.9375rem);
}

.app-select--lg {
  height: 48px;
  padding: 0 var(--space-lg, 1.5rem);
  font-size: var(--font-size-lg, 1rem);
}

.app-select-description {
  display: block;
  font-weight: var(--font-weight-normal, 400);
  font-size: var(--font-size-xs, 0.75rem);
  line-height: var(--line-height-normal, 1.5);
  color: var(--text-secondary, #6b7280);
  margin-top: var(--space-xs, 0.25rem);
}

@media (prefers-reduced-motion: reduce) {
  .app-select {
    transition: none;
  }
}
