.code-input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--surface-2-border);
  border-radius: 10px;
  background: var(--surface-2);
  transition: $transition-fast;
  max-width: 180px;
  @include shadow-inset;
  position: relative;
  cursor: text;

  &:focus-within {
    background: #ffffff;
    border-color: var(--pico-primary);
    box-shadow: 
      inset 0 2px 4px rgba(0, 0, 0, 0.08),
      inset 0 1px 2px rgba(0, 0, 0, 0.06),
      0 0 0 3px rgba(var(--pico-primary-rgb), 0.15);
    
    @include dark-mode {
      background: #252932;
    }
  }

  &:hover:not(:focus-within) {
    background: var(--pico-card-background-color);
    border-color: var(--pico-card-border-color);
    box-shadow: 
      inset 0 2px 4px rgba(0, 0, 0, 0.06),
      inset 0 1px 2px rgba(0, 0, 0, 0.04),
      0 1px 0 rgba(255, 255, 255, 0.5);
  }
}

.code-prefix {
  font-family: $font-mono;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--pico-primary);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
  opacity: 0.85;
  transition: opacity 0.2s ease;
  position: relative;
  padding-right: 8px;
  margin-right: 2px;
  pointer-events: none;

  &::after {
    content: '';
    position: absolute;
    right: 0;
    top: -10px;
    bottom: -10px;
    width: 1.5px;
    background: linear-gradient(180deg, 
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.15) 50%,
      rgba(0, 0, 0, 0) 100%
    );
    opacity: 0.5;
    transition: opacity 0.2s ease;
    pointer-events: none;
    
    @include dark-mode {
      background: linear-gradient(180deg, 
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0) 100%
      );
    }
  }

  .code-input-container:focus-within & {
    opacity: 1;

    &::after {
      opacity: 0.7;
    }
  }
}

.code-input {
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: $font-mono;
  font-size: 17px;
  letter-spacing: 2px;
  font-weight: 500;
  color: var(--text-strong);
  background: transparent !important;
  flex: 1;
  min-width: 0;
  box-shadow: none !important;
  transition: color 0.2s ease;

  &::placeholder {
    color: var(--text-muted-strong);
    font-weight: 400;
    letter-spacing: 2px;
    opacity: 0.7;
  }

  &::selection {
    background: rgba(var(--pico-primary-rgb), 0.2);
  }
}

